* Custom and defvaralias.
@ 2005-02-11 3:14 Luc Teirlinck
2005-02-12 8:38 ` Richard Stallman
0 siblings, 1 reply; 2+ messages in thread
From: Luc Teirlinck @ 2005-02-11 3:14 UTC (permalink / raw
Custom currently does not recognize variable aliases. We are planning
on replacing the user option `blink-cursor' with `blink-cursor-mode'
to get rid of a bug, get rid of no longer needed duplication and be
more standard. We plan to keep `blink-cursor' as an alias. So people
who have `(setq blink-cursor nil)' in their .emacs will be safe. But,
without the patch below, people who set blink-cursor to nil in their
custom-set-variables form risk being tortured by a blinking cursor.
The small patch below makes Custom take aliases into account. It
assumes, for correctness, that if foo is defcustomed, it can occur as
second, but not as first argument to defvaralias. Defcustoming a
variable just to make it an alias for another variable would not make
any sense.
Note that the patch below _only_ ensures that the option gets recognized
_in the `custom-set-variables' form_. If you do:
M-x customize-option RET blink-cursor RET
you will see (_not_ now, after a change is installed):
blink-cursor-
After saving your next option (any option), the blink-cursor in the
custom-set-variables form will automatically get corrected to
blink-cursor-mode. (Again, _not_ now. After all relevant changes
have been installed.)
I can install if desired.
===File ~/custom.el-diff====================================
*** custom.el 10 Feb 2005 09:52:54 -0600 1.79
--- custom.el 10 Feb 2005 20:04:47 -0600
***************
*** 777,783 ****
(while args
(let ((entry (car args)))
(if (listp entry)
! (let* ((symbol (nth 0 entry))
(value (nth 1 entry))
(now (nth 2 entry))
(requests (nth 3 entry))
--- 777,783 ----
(while args
(let ((entry (car args)))
(if (listp entry)
! (let* ((symbol (indirect-variable (nth 0 entry)))
(value (nth 1 entry))
(now (nth 2 entry))
(requests (nth 3 entry))
***************
*** 809,815 ****
(message "Warning: old format `custom-set-variables'")
(ding)
(sit-for 2)
! (let ((symbol (nth 0 args))
(value (nth 1 args)))
(put symbol 'saved-value (list value))
(custom-push-theme 'theme-value symbol theme 'set value))
--- 809,815 ----
(message "Warning: old format `custom-set-variables'")
(ding)
(sit-for 2)
! (let ((symbol (indirect-variable (nth 0 args)))
(value (nth 1 args)))
(put symbol 'saved-value (list value))
(custom-push-theme 'theme-value symbol theme 'set value))
============================================================
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Custom and defvaralias.
2005-02-11 3:14 Custom and defvaralias Luc Teirlinck
@ 2005-02-12 8:38 ` Richard Stallman
0 siblings, 0 replies; 2+ messages in thread
From: Richard Stallman @ 2005-02-12 8:38 UTC (permalink / raw
Cc: emacs-devel
We certainly want this feature. Please install your patch.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-02-12 8:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-11 3:14 Custom and defvaralias Luc Teirlinck
2005-02-12 8:38 ` Richard Stallman
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).