From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Custom and defvaralias. Date: Thu, 10 Feb 2005 21:14:57 -0600 (CST) Message-ID: <200502110314.j1B3EvU08371@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1108091754 19269 80.91.229.6 (11 Feb 2005 03:15:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 11 Feb 2005 03:15:54 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 11 04:15:46 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CzRHV-0001Pr-00 for ; Fri, 11 Feb 2005 04:15:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CzRWM-0008Qe-2w for ged-emacs-devel@m.gmane.org; Thu, 10 Feb 2005 22:31:06 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CzRVx-0008Jn-Ak for emacs-devel@gnu.org; Thu, 10 Feb 2005 22:30:41 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CzRVw-0008JO-FP for emacs-devel@gnu.org; Thu, 10 Feb 2005 22:30:40 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CzRVw-0008JJ-9p for emacs-devel@gnu.org; Thu, 10 Feb 2005 22:30:40 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CzRIH-00079h-HU for emacs-devel@gnu.org; Thu, 10 Feb 2005 22:16:33 -0500 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id j1B3GX9N010079 for ; Thu, 10 Feb 2005 21:16:33 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j1B3EvU08371; Thu, 10 Feb 2005 21:14:57 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:33237 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:33237 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)) ============================================================