emacs-devel
[Top][All Lists]
Advanced

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

Re: an easier way to edit variables


From: Ivan Shmakov
Subject: Re: an easier way to edit variables
Date: Wed, 14 Jan 2015 15:54:44 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

>>>>> João Távora <address@hidden> writes:

[…]

 > M-: (setq find-the-variables-name-again )
 > Multiple C-x o to go to the *Help* window.
 > Scroll around until I find the form that I want to change.
 > Copy that to the kill ring.

        Actually, I think it’d be nice to have /both/ a key binding for
        the above (say, ‘E’) /and/ a separate key binding (say, ‘e’) to
        call customize-variable, – if the variable is indeed declared
        customizable.  The code for the latter would probably be just a
        few lines long, and the formed could use something like:

(let ((eval-expression-minibuffer-setup-hook
       (cons (lambda ()
               (insert (format "(setq %S %S)"
                               variable-name
                               ;; FIXME: double-check the following
                               (if (consp variable-value)
                                   (list 'quote variable-value)
                                 variable-value))))
             eval-expression-minibuffer-setup-hook)))
  (call-interactively 'eval-expression))

[…]

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A



reply via email to

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