diff options
| author | Chong Yidong | 2012-04-09 20:36:01 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-04-09 20:36:01 +0800 |
| commit | b4d3bc10dc84f6b01a2b6b215d0e489555aa6edd (patch) | |
| tree | efc38746407c5604b926f192b6f1339dbac410d1 /lisp | |
| parent | 9e40dda4c65e2b5a3dba82c180a20bb5c4687540 (diff) | |
| download | emacs-b4d3bc10dc84f6b01a2b6b215d0e489555aa6edd.tar.gz emacs-b4d3bc10dc84f6b01a2b6b215d0e489555aa6edd.zip | |
Remove defining user variables via * in docstring.
* lisp/apropos.el (apropos-variable):
* lisp/files-x.el (read-file-local-variable):
* lisp/simple.el (set-variable):
* lisp/woman.el (woman-mini-help):
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Callers changed.
* lisp/custom.el (custom-variable-p): Return nil for non-symbol
arguments instead of signaling an error.
(user-variable-p): Obsolete alias for custom-variable-p.
* lisp/erc/erc.el (erc-cmd-SET): Call custom-variable-p instead of
user-variable-p.
* src/callint.c (Finteractive, Fcall_interactively):
* src/minibuf.c (Fread_variable): Callers changed.
* src/eval.c (Fuser_variable_p, user_variable_p_eh)
(lisp_indirect_variable): Functions deleted.
(Fdefvar): Caller changed.
* doc/lispref/commands.texi (Interactive Codes):
* doc/lispref/help.texi (Accessing Documentation):
* doc/lispref/minibuf.texi (High-Level Completion): Callers changed.
* doc/lispref/customize.texi (Variable Definitions): Remove user-variable-p.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 12 | ||||
| -rw-r--r-- | lisp/apropos.el | 2 | ||||
| -rw-r--r-- | lisp/custom.el | 10 | ||||
| -rw-r--r-- | lisp/emacs-lisp/byte-opt.el | 2 | ||||
| -rw-r--r-- | lisp/erc/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/erc/erc.el | 2 | ||||
| -rw-r--r-- | lisp/files-x.el | 2 | ||||
| -rw-r--r-- | lisp/simple.el | 2 | ||||
| -rw-r--r-- | lisp/skeleton.el | 2 | ||||
| -rw-r--r-- | lisp/woman.el | 4 |
10 files changed, 31 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ed4470b998a..8c3093aa2c2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2012-04-09 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * custom.el (custom-variable-p): Return nil for non-symbol | ||
| 4 | arguments instead of signaling an error. | ||
| 5 | (user-variable-p): Obsolete alias for custom-variable-p. | ||
| 6 | |||
| 7 | * apropos.el (apropos-variable): | ||
| 8 | * files-x.el (read-file-local-variable): | ||
| 9 | * simple.el (set-variable): | ||
| 10 | * woman.el (woman-mini-help): | ||
| 11 | * emacs-lisp/byte-opt.el (side-effect-free-fns): Callers changed. | ||
| 12 | |||
| 1 | 2012-04-09 Glenn Morris <rgm@gnu.org> | 13 | 2012-04-09 Glenn Morris <rgm@gnu.org> |
| 2 | 14 | ||
| 3 | * startup.el (normal-top-level): Don't look for leim-list.el | 15 | * startup.el (normal-top-level): Don't look for leim-list.el |
diff --git a/lisp/apropos.el b/lisp/apropos.el index 423656c21fa..56b27e9b9b4 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el | |||
| @@ -466,7 +466,7 @@ normal variables." | |||
| 466 | #'(lambda (symbol) | 466 | #'(lambda (symbol) |
| 467 | (and (boundp symbol) | 467 | (and (boundp symbol) |
| 468 | (get symbol 'variable-documentation))) | 468 | (get symbol 'variable-documentation))) |
| 469 | 'user-variable-p))) | 469 | 'custom-variable-p))) |
| 470 | 470 | ||
| 471 | ;; For auld lang syne: | 471 | ;; For auld lang syne: |
| 472 | ;;;###autoload | 472 | ;;;###autoload |
diff --git a/lisp/custom.el b/lisp/custom.el index bffd30bff21..d8909f8be92 100644 --- a/lisp/custom.el +++ b/lisp/custom.el | |||
| @@ -599,15 +599,17 @@ If NOSET is non-nil, don't bother autoloading LOAD when setting the variable." | |||
| 599 | (put symbol 'custom-autoload (if noset 'noset t)) | 599 | (put symbol 'custom-autoload (if noset 'noset t)) |
| 600 | (custom-add-load symbol load)) | 600 | (custom-add-load symbol load)) |
| 601 | 601 | ||
| 602 | ;; This test is also in the C code of `user-variable-p'. | ||
| 603 | (defun custom-variable-p (variable) | 602 | (defun custom-variable-p (variable) |
| 604 | "Return non-nil if VARIABLE is a customizable variable. | 603 | "Return non-nil if VARIABLE is a customizable variable. |
| 605 | A customizable variable is either (i) a variable whose property | 604 | A customizable variable is either (i) a variable whose property |
| 606 | list contains a non-nil `standard-value' or `custom-autoload' | 605 | list contains a non-nil `standard-value' or `custom-autoload' |
| 607 | property, or (ii) an alias for another customizable variable." | 606 | property, or (ii) an alias for another customizable variable." |
| 608 | (setq variable (indirect-variable variable)) | 607 | (when (symbolp variable) |
| 609 | (or (get variable 'standard-value) | 608 | (setq variable (indirect-variable variable)) |
| 610 | (get variable 'custom-autoload))) | 609 | (or (get variable 'standard-value) |
| 610 | (get variable 'custom-autoload)))) | ||
| 611 | |||
| 612 | (define-obsolete-function-alias 'user-variable-p 'custom-variable-p "24.2") | ||
| 611 | 613 | ||
| 612 | (defun custom-note-var-changed (variable) | 614 | (defun custom-note-var-changed (variable) |
| 613 | "Inform Custom that VARIABLE has been set (changed). | 615 | "Inform Custom that VARIABLE has been set (changed). |
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 78ac29d89df..3b324a09659 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el | |||
| @@ -1237,7 +1237,7 @@ | |||
| 1237 | string-to-multibyte | 1237 | string-to-multibyte |
| 1238 | tan truncate | 1238 | tan truncate |
| 1239 | unibyte-char-to-multibyte upcase user-full-name | 1239 | unibyte-char-to-multibyte upcase user-full-name |
| 1240 | user-login-name user-original-login-name user-variable-p | 1240 | user-login-name user-original-login-name custom-variable-p |
| 1241 | vconcat | 1241 | vconcat |
| 1242 | window-buffer window-dedicated-p window-edges window-height | 1242 | window-buffer window-dedicated-p window-edges window-height |
| 1243 | window-hscroll window-minibuffer-p window-width | 1243 | window-hscroll window-minibuffer-p window-width |
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index af853c4e230..34aa015d7ac 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-04-09 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * erc.el (erc-cmd-SET): Call custom-variable-p instead of | ||
| 4 | user-variable-p. | ||
| 5 | |||
| 1 | 2012-02-08 Glenn Morris <rgm@gnu.org> | 6 | 2012-02-08 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * erc-backend.el (erc-coding-system-precedence): | 8 | * erc-backend.el (erc-coding-system-precedence): |
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index b95d42b154a..63777fb3897 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el | |||
| @@ -2616,7 +2616,7 @@ VALUE is computed by evaluating the rest of LINE in Lisp." | |||
| 2616 | (if (consp val) | 2616 | (if (consp val) |
| 2617 | (concat "\n" (pp-to-string val)) | 2617 | (concat "\n" (pp-to-string val)) |
| 2618 | (format " %S\n" val))))) | 2618 | (format " %S\n" val))))) |
| 2619 | (apropos-internal "^erc-" 'user-variable-p)))) | 2619 | (apropos-internal "^erc-" 'custom-variable-p)))) |
| 2620 | (current-buffer)) t) | 2620 | (current-buffer)) t) |
| 2621 | (t nil))) | 2621 | (t nil))) |
| 2622 | (defalias 'erc-cmd-VAR 'erc-cmd-SET) | 2622 | (defalias 'erc-cmd-VAR 'erc-cmd-SET) |
diff --git a/lisp/files-x.el b/lisp/files-x.el index b4a04401a77..e28e2ba83e3 100644 --- a/lisp/files-x.el +++ b/lisp/files-x.el | |||
| @@ -49,7 +49,7 @@ Intended to be used in the `interactive' spec of | |||
| 49 | (format "%s: " prompt)) | 49 | (format "%s: " prompt)) |
| 50 | obarray | 50 | obarray |
| 51 | (lambda (sym) | 51 | (lambda (sym) |
| 52 | (or (user-variable-p sym) | 52 | (or (custom-variable-p sym) |
| 53 | (get sym 'safe-local-variable) | 53 | (get sym 'safe-local-variable) |
| 54 | (memq sym '(mode eval coding unibyte)))) | 54 | (memq sym '(mode eval coding unibyte)))) |
| 55 | nil nil nil default nil)) | 55 | nil nil nil default nil)) |
diff --git a/lisp/simple.el b/lisp/simple.el index 8b04534455d..64356ce8aa7 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -5983,7 +5983,7 @@ in the definition is used to check that VALUE is valid. | |||
| 5983 | With a prefix argument, set VARIABLE to VALUE buffer-locally." | 5983 | With a prefix argument, set VARIABLE to VALUE buffer-locally." |
| 5984 | (interactive | 5984 | (interactive |
| 5985 | (let* ((default-var (variable-at-point)) | 5985 | (let* ((default-var (variable-at-point)) |
| 5986 | (var (if (user-variable-p default-var) | 5986 | (var (if (custom-variable-p default-var) |
| 5987 | (read-variable (format "Set variable (default %s): " default-var) | 5987 | (read-variable (format "Set variable (default %s): " default-var) |
| 5988 | default-var) | 5988 | default-var) |
| 5989 | (read-variable "Set variable: "))) | 5989 | (read-variable "Set variable: "))) |
diff --git a/lisp/skeleton.el b/lisp/skeleton.el index 0f28d32293b..5838915b1f5 100644 --- a/lisp/skeleton.el +++ b/lisp/skeleton.el | |||
| @@ -456,7 +456,7 @@ automatically, and you are prompted to fill in the variable parts."))) | |||
| 456 | ;; obarray | 456 | ;; obarray |
| 457 | ;; (lambda (symbol) | 457 | ;; (lambda (symbol) |
| 458 | ;; (or (eq symbol 'eval) | 458 | ;; (or (eq symbol 'eval) |
| 459 | ;; (user-variable-p symbol))) | 459 | ;; (custom-variable-p symbol))) |
| 460 | ;; t) | 460 | ;; t) |
| 461 | ;; comment-start str ": " | 461 | ;; comment-start str ": " |
| 462 | ;; (read-from-minibuffer "Expression: " nil read-expression-map nil | 462 | ;; (read-from-minibuffer "Expression: " nil read-expression-map nil |
diff --git a/lisp/woman.el b/lisp/woman.el index 4ecf7c8891d..c76399a96e5 100644 --- a/lisp/woman.el +++ b/lisp/woman.el | |||
| @@ -1987,7 +1987,7 @@ Optional argument REDRAW, if non-nil, forces mode line to be updated." | |||
| 1987 | (lambda (symbol) | 1987 | (lambda (symbol) |
| 1988 | (and | 1988 | (and |
| 1989 | (or (commandp symbol) | 1989 | (or (commandp symbol) |
| 1990 | (user-variable-p symbol)) | 1990 | (custom-variable-p symbol)) |
| 1991 | (not (get symbol 'apropos-inhibit)))))) | 1991 | (not (get symbol 'apropos-inhibit)))))) |
| 1992 | ;; Find documentation strings: | 1992 | ;; Find documentation strings: |
| 1993 | (let ((p apropos-accumulator) | 1993 | (let ((p apropos-accumulator) |
| @@ -1999,7 +1999,7 @@ Optional argument REDRAW, if non-nil, forces mode line to be updated." | |||
| 1999 | (if (setq doc (documentation symbol t)) | 1999 | (if (setq doc (documentation symbol t)) |
| 2000 | (substring doc 0 (string-match "\n" doc)) | 2000 | (substring doc 0 (string-match "\n" doc)) |
| 2001 | "(not documented)")) | 2001 | "(not documented)")) |
| 2002 | (if (user-variable-p symbol) ; 3. variable doc | 2002 | (if (custom-variable-p symbol) ; 3. variable doc |
| 2003 | (if (setq doc (documentation-property | 2003 | (if (setq doc (documentation-property |
| 2004 | symbol 'variable-documentation t)) | 2004 | symbol 'variable-documentation t)) |
| 2005 | (substring doc 0 (string-match "\n" doc)))))) | 2005 | (substring doc 0 (string-match "\n" doc)))))) |