help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: register use


From: Kevin Rodgers
Subject: Re: register use
Date: Thu, 12 Sep 2002 17:44:29 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

Greg Hill wrote:

You could make your own interactive M-x command called set-reg-string to prompt you in the minibuffer for a register name and a string to be stored in that register by adding this to your .emacs file:

  (defun set-reg-string (reg string)
    (interactive "cRegister: \nsString: ")
    (set-register reg string))


Or just make set-register interactive via advice.el:


(defadvice set-register (before interactive activate)
  "Now an `interactive' command."
  (interactive "cRegister: \nsString: "))

Or you could allow the user to enter any Emacs Lisp form (including
a string constant) to be evalutated, which is more congruent with
the original function:

(defadvice set-register (before interactive activate)
  "Now an `interactive' command."
  (interactive "cRegister: \nXValue: "))

--
Kevin Rodgers <kevinr@ihs.com>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]