[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: doc-view.el --- View PDF/PostStript/DVI files in Emacs
From: |
Tassilo Horn |
Subject: |
Re: doc-view.el --- View PDF/PostStript/DVI files in Emacs |
Date: |
Thu, 30 Aug 2007 09:51:55 +0200 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) |
Tassilo Horn <tassilo@member.fsf.org> writes:
> I think I have to create a function that changes to defparameter,
> evaluates the sexp and changes back to defvar...
Done!
--8<---------------cut here---------------start------------->8---
(defun th-eval-last-defvar-as-defparameter (ARG)
"Eval the `defvar' before point as if it was a `defparameter'."
(interactive "P")
(save-excursion
(let ((sexp (buffer-substring-no-properties
(point)
(progn
(backward-sexp)
(point)))))
(with-temp-buffer
(insert sexp)
(goto-char (point-min))
(condition-case nil
(progn
(search-forward "(defvar ")
(replace-match "(defparameter ")
(goto-char (point-max))
(eval-last-sexp ARG))
(error (message "The sexp before point must be a defvar
form!")))))))
--8<---------------cut here---------------end--------------->8---
Now it's bound to `C-x C-v'. Hopefully this was my last defparameter
checkin.
Bye,
Tassilo
--
People say that if you play Microsoft CD's backwards, you hear satanic
things, but that's nothing, because if you play them forwards, they
install Windows.
- Re: doc-view.el now allows searching, (continued)
- Message not available
- Re: doc-view.el now allows searching, Tassilo Horn, 2007/08/31
- Message not available
- Re: doc-view.el now allows searching, Tassilo Horn, 2007/08/31
- Re: doc-view.el now allows searching, Bill Clementson, 2007/08/31
- Message not available
- Re: doc-view.el now allows searching, Tassilo Horn, 2007/08/31
- Re: doc-view.el now allows searching, Bill Clementson, 2007/08/31
- Message not available
- Re: doc-view.el --- View PDF/PostStript/DVI files in Emacs, Tassilo Horn, 2007/08/30
- Re: doc-view.el --- View PDF/PostStript/DVI files in Emacs,
Tassilo Horn <=
- Re: doc-view.el --- View PDF/PostStript/DVI files in Emacs, Daniel Jensen, 2007/08/30
- Re: doc-view.el --- View PDF/PostStript/DVI files in Emacs, Tassilo Horn, 2007/08/30
- Re: doc-view.el --- View PDF/PostStript/DVI files in Emacs, Xavier Maillard, 2007/08/29
- Message not available
- Re: doc-view.el --- View PDF/PostStript/DVI files in Emacs, Joost Kremers, 2007/08/29
- Re: doc-view.el --- View PDF/PostStript/DVI files in Emacs, Xavier Maillard, 2007/08/30