From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: lekktu@gmail.com, emacs-devel@gnu.org
Subject: Re: Documentation not clear for the Lisp function set-variable
Date: Mon, 4 Jul 2005 20:42:43 -0500 (CDT) [thread overview]
Message-ID: <200507050142.j651ghI15860@raven.dms.auburn.edu> (raw)
In-Reply-To: <E1DpU7a-0004uT-Q2@fencepost.gnu.org> (rms@gnu.org)
Richard Stallman wrote:
Actually, I forgot that, unlike customize-face, customize-variable
does not allow to enter variables that are defvarred or defvaraliased,
rather than defcustomed.
I think that is partly a bug--it should allow an alias if its "real"
name has a defcustom.
If it is a bug, then the following patches fix it. I can install if
desired:
===File ~/custom-diff=======================================
diff -c /home/teirllm/emacscvsdir/emacs/lisp/custom.el.\~1.85.\~ /home/teirllm/emacscvsdir/emacs/lisp/custom.el
*** /home/teirllm/emacscvsdir/emacs/lisp/custom.el.~1.85.~ Sun Jul 3 13:38:33 2005
--- /home/teirllm/emacscvsdir/emacs/lisp/custom.el Mon Jul 4 19:45:29 2005
***************
*** 518,524 ****
;; This test is also in the C code of `user-variable-p'.
(defun custom-variable-p (variable)
! "Return non-nil if VARIABLE is a custom variable."
(or (get variable 'standard-value)
(get variable 'custom-autoload)))
--- 518,526 ----
;; This test is also in the C code of `user-variable-p'.
(defun custom-variable-p (variable)
! "Return non-nil if VARIABLE is a custom variable.
! This recursively follows aliases."
! (setq variable (indirect-variable variable))
(or (get variable 'standard-value)
(get variable 'custom-autoload)))
Diff finished. Mon Jul 4 20:23:04 2005
============================================================
===File ~/cus-edit-diff=====================================
diff -c /home/teirllm/emacscvsdir/emacs/lisp/cus-edit.el.\~1.225.\~ /home/teirllm/emacscvsdir/emacs/lisp/cus-edit.el
*** /home/teirllm/emacscvsdir/emacs/lisp/cus-edit.el.~1.225.~ Sun Jul 3 19:57:02 2005
--- /home/teirllm/emacscvsdir/emacs/lisp/cus-edit.el Mon Jul 4 19:45:23 2005
***************
*** 488,495 ****
(defun custom-variable-prompt ()
"Prompt for a custom variable, defaulting to the variable at point.
Return a list suitable for use in `interactive'."
! (let ((v (variable-at-point))
(enable-recursive-minibuffers t)
val)
(setq val (completing-read
--- 488,497 ----
(defun custom-variable-prompt ()
"Prompt for a custom variable, defaulting to the variable at point.
+ If that variable is an alias, the default is the actual custom variable
+ at the end of the chain of aliases.
Return a list suitable for use in `interactive'."
! (let ((v (indirect-variable (variable-at-point)))
(enable-recursive-minibuffers t)
val)
(setq val (completing-read
***************
*** 1021,1026 ****
--- 1023,1029 ----
(defun customize-option (symbol)
"Customize SYMBOL, which must be a user option variable."
(interactive (custom-variable-prompt))
+ (setq symbol (indirect-variable symbol))
(custom-buffer-create (list (list symbol 'custom-variable))
(format "*Customize Option: %s*"
(custom-unlispify-tag-name symbol))))
***************
*** 1033,1038 ****
--- 1036,1042 ----
"Customize SYMBOL, which must be a user option variable.
Show the buffer in another window, but don't select it."
(interactive (custom-variable-prompt))
+ (setq symbol (indirect-variable symbol))
(custom-buffer-create-other-window
(list (list symbol 'custom-variable))
(format "*Customize Option: %s*" (custom-unlispify-tag-name symbol))))
Diff finished. Mon Jul 4 20:24:04 2005
============================================================
next prev parent reply other threads:[~2005-07-05 1:42 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-19 11:14 Documentation not clear for the Lisp function set-variable Yoni Rabkin
2005-06-20 3:50 ` Richard Stallman
2005-06-20 8:21 ` Yoni Rabkin
2005-06-20 9:07 ` Juanma Barranquero
2005-06-21 2:00 ` Richard Stallman
2005-06-26 23:23 ` Juri Linkov
2005-06-27 13:04 ` Juanma Barranquero
2005-06-27 15:44 ` Juanma Barranquero
2005-06-27 16:09 ` Luc Teirlinck
2005-06-27 18:17 ` Juanma Barranquero
2005-06-27 18:45 ` Luc Teirlinck
2005-06-27 19:30 ` Juanma Barranquero
2005-06-28 18:47 ` Richard M. Stallman
2005-07-04 1:18 ` Luc Teirlinck
2005-07-04 16:48 ` Richard M. Stallman
2005-07-04 17:02 ` David Kastrup
2005-07-05 1:42 ` Luc Teirlinck [this message]
2005-07-05 16:12 ` Richard M. Stallman
2005-07-07 1:54 ` Luc Teirlinck
2005-07-07 21:30 ` Richard M. Stallman
2005-06-28 0:07 ` Juri Linkov
2005-06-28 8:32 ` Juanma Barranquero
2005-06-28 23:45 ` Juri Linkov
2005-06-29 9:14 ` Juanma Barranquero
2005-06-29 23:57 ` Juri Linkov
2005-06-30 8:16 ` Juanma Barranquero
2005-06-30 16:55 ` Luc Teirlinck
2005-06-30 19:34 ` Juanma Barranquero
2005-07-01 23:57 ` Juri Linkov
2005-07-02 4:11 ` Luc Teirlinck
2005-06-28 18:47 ` Richard M. Stallman
2005-06-29 2:32 ` Juanma Barranquero
2005-06-29 20:42 ` Richard M. Stallman
2005-06-27 18:39 ` Eli Zaretskii
2005-06-27 18:49 ` Luc Teirlinck
2005-06-27 21:38 ` Juanma Barranquero
2005-06-28 4:37 ` Eli Zaretskii
2005-06-28 8:33 ` Juanma Barranquero
2005-06-28 4:17 ` Richard M. Stallman
2005-06-28 9:17 ` Juanma Barranquero
2005-06-28 9:26 ` Juanma Barranquero
2005-06-28 16:09 ` Stefan Monnier
2005-06-28 16:19 ` Juanma Barranquero
2005-06-29 3:43 ` Stefan Monnier
2005-06-29 9:18 ` Juanma Barranquero
2005-06-29 3:59 ` Richard M. Stallman
2005-06-27 16:46 ` Richard M. Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200507050142.j651ghI15860@raven.dms.auburn.edu \
--to=teirllm@dms.auburn.edu \
--cc=emacs-devel@gnu.org \
--cc=lekktu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).