summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2012-06-12 13:47:14 +0800
committerChong Yidong <cyd@gnu.org>2012-06-12 13:47:14 +0800
commitf1a4e679f3b0696089b4fd73717307ba5d23e1cf (patch)
treedc44016b20723e38247300b6c6eaec3cd4e98761
parentbf67e61f291a82a9e90a7918f5188714853f0094 (diff)
Various minor variable/hook cleanups.
* lisp/emacs-lisp/edebug.el (edebug-inhibit-emacs-lisp-mode-bindings): Rename from gud-inhibit-global-bindings. * lisp/emacs-lisp/eieio.el (eieio-pre-method-execution-hooks): Doc fix. * lisp/erc/erc-dcc.el (erc-dcc-chat-filter-functions): Rename from erc-dcc-chat-filter-hook, since this is an abnormal hook. * lisp/nxml/nxml-glyph.el (nxml-glyph-set-functions): Rename abnormal hook from nxml-glyph-set-hook. * lisp/progmodes/cwarn.el (cwarn-mode): Remove redundant variable declaration. * lisp/progmodes/pascal.el (pascal-toggle-completions): Doc fix. * lisp/textmodes/bibtex.el (bibtex-string-file-path, bibtex-file-path): Convert to defcustom. * lisp/url/url-handlers.el (url-handler-regexp): * lisp/url/url-nfs.el (url-nfs-automounter-directory-spec): * lisp/url/url-vars.el (url-load-hook): Convert to defcustom.
-rw-r--r--lisp/ChangeLog18
-rw-r--r--lisp/emacs-lisp/edebug.el13
-rw-r--r--lisp/emacs-lisp/eieio.el2
-rw-r--r--lisp/erc/ChangeLog5
-rw-r--r--lisp/erc/erc-dcc.el15
-rw-r--r--lisp/nxml/nxml-glyph.el31
-rw-r--r--lisp/nxml/nxml-mode.el6
-rw-r--r--lisp/progmodes/cwarn.el6
-rw-r--r--lisp/progmodes/pascal.el8
-rw-r--r--lisp/textmodes/bibtex.el12
-rw-r--r--lisp/url/ChangeLog6
-rw-r--r--lisp/url/url-handlers.el42
-rw-r--r--lisp/url/url-nfs.el7
-rw-r--r--lisp/url/url-vars.el6
14 files changed, 114 insertions, 63 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0618a7a14b..e452e96fce 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,21 @@
+2012-06-12 Chong Yidong <cyd@gnu.org>
+
+ * emacs-lisp/edebug.el (edebug-inhibit-emacs-lisp-mode-bindings):
+ Rename from gud-inhibit-global-bindings.
+
+ * emacs-lisp/eieio.el (eieio-pre-method-execution-hooks): Doc fix.
+
+ * nxml/nxml-glyph.el (nxml-glyph-set-functions): Rename abnormal
+ hook from nxml-glyph-set-hook.
+
+ * progmodes/cwarn.el (cwarn-mode): Remove redundant variable
+ declaration.
+
+ * progmodes/pascal.el (pascal-toggle-completions): Doc fix.
+
+ * textmodes/bibtex.el (bibtex-string-file-path, bibtex-file-path):
+ Convert to defcustom.
+
2012-06-12 Drew Adams <drew.adams@oracle.com>
* help-mode.el (help-bookmark-make-record, help-bookmark-jump):
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 8c6738ca6a..28b768a14b 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -3055,7 +3055,6 @@ Otherwise, toggle for all windows."
(edebug-toggle-save-selected-window)
(edebug-toggle-save-all-windows)))
-
(defun edebug-where ()
"Show the debug windows and where we stopped in the program."
(interactive)
@@ -3735,12 +3734,16 @@ This prints the value into current buffer."
;;; Edebug Minor Mode
-;; FIXME eh?
-(defvar gud-inhibit-global-bindings
- "Non-nil means don't do global rebindings of C-x C-a subcommands.")
+(defvar edebug-inhibit-emacs-lisp-mode-bindings nil
+ "If non-nil, inhibit Edebug bindings on the C-x C-a key.
+By default, loading the `edebug' library causes these bindings to
+be installed in `emacs-lisp-mode-map'.")
+
+(define-obsolete-variable-alias 'gud-inhibit-global-bindings
+ 'edebug-inhibit-emacs-lisp-mode-bindings "24.2")
;; Global GUD bindings for all emacs-lisp-mode buffers.
-(unless gud-inhibit-global-bindings
+(unless edebug-inhibit-emacs-lisp-mode-bindings
(define-key emacs-lisp-mode-map "\C-x\C-a\C-s" 'edebug-step-mode)
(define-key emacs-lisp-mode-map "\C-x\C-a\C-n" 'edebug-next-mode)
(define-key emacs-lisp-mode-map "\C-x\C-a\C-c" 'edebug-go-mode)
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index 768eba58ee..1efb74e713 100644
--- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -2044,7 +2044,7 @@ During executions, the list is first generated, then as each next method
is called, the next method is popped off the stack.")
(defvar eieio-pre-method-execution-hooks nil
- "Hooks run just before a method is executed.
+ "Abnormal hook run just before an EIEIO method is executed.
The hook function must accept one argument, the list of forms
about to be executed.")
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index d8cca31499..fbc5baa6a7 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,8 @@
+2012-06-12 Chong Yidong <cyd@gnu.org>
+
+ * erc-dcc.el (erc-dcc-chat-filter-functions): Rename from
+ erc-dcc-chat-filter-hook, since this is an abnormal hook.
+
2012-06-08 Chong Yidong <cyd@gnu.org>
* erc.el (erc-direct-msg-face, erc-header-line, erc-input-face)
diff --git a/lisp/erc/erc-dcc.el b/lisp/erc/erc-dcc.el
index d1ef1a9954..66256ee270 100644
--- a/lisp/erc/erc-dcc.el
+++ b/lisp/erc/erc-dcc.el
@@ -627,7 +627,7 @@ separated by a space."
;;;###autoload
(defvar erc-ctcp-query-DCC-hook '(erc-ctcp-query-DCC)
- "Hook variable for CTCP DCC queries")
+ "Hook variable for CTCP DCC queries.")
(defvar erc-dcc-query-handler-alist
'(("SEND" . erc-dcc-handle-ctcp-send)
@@ -1099,8 +1099,13 @@ Possible values are: ask, auto, ignore."
(pcomplete-here '("auto" "ask" "ignore")))
(defalias 'pcomplete/erc-mode/SREQ 'pcomplete/erc-mode/CREQ)
-(defvar erc-dcc-chat-filter-hook '(erc-dcc-chat-parse-output)
- "Hook to run after doing parsing (and possible insertion) of DCC messages.")
+(defvar erc-dcc-chat-filter-functions '(erc-dcc-chat-parse-output)
+ "Abnormal hook run after parsing (and maybe inserting) a DCC message.
+Each function is called with two arguments: the ERC process and
+the unprocessed output.")
+
+(define-obsolete-variable-alias 'erc-dcc-chat-filter-hook
+ 'erc-dcc-chat-filter-functions "24.2")
(defvar erc-dcc-chat-mode-map
(let ((map (make-sparse-keymap)))
@@ -1195,8 +1200,8 @@ other client."
(set-buffer (process-buffer proc))
(setq erc-dcc-unprocessed-output
(concat erc-dcc-unprocessed-output str))
- (run-hook-with-args 'erc-dcc-chat-filter-hook proc
- erc-dcc-unprocessed-output))
+ (run-hook-with-args 'erc-dcc-chat-filter-functions
+ proc erc-dcc-unprocessed-output))
(set-buffer orig-buffer))))
(defun erc-dcc-chat-parse-output (proc str)
diff --git a/lisp/nxml/nxml-glyph.el b/lisp/nxml/nxml-glyph.el
index 6e15e5d4ce..86b14e6639 100644
--- a/lisp/nxml/nxml-glyph.el
+++ b/lisp/nxml/nxml-glyph.el
@@ -25,7 +25,7 @@
;; The entry point to this file is `nxml-glyph-display-string'.
;; The current implementation is heuristic due to a lack of
;; Emacs primitives necessary to implement it properly. The user
-;; can tweak the heuristics using `nxml-glyph-set-hook'.
+;; can tweak the heuristics using `nxml-glyph-set-functions'.
;;; Code:
@@ -332,21 +332,26 @@ This repertoire is supported for the following fonts:
(#xFB01 . #xFB02)]
"Glyph set corresponding to Windows Glyph List 4.")
-(defvar nxml-glyph-set-hook nil
- "Hook for determining the set of glyphs in a face.
-The hook will receive a single argument FACE. If it can determine
-the set of glyphs representable by FACE, it must set the variable
-`nxml-glyph-set' and return non-nil. Otherwise, it must return nil.
-The hook will be run until success. The constants
-`nxml-ascii-glyph-set', `nxml-latin1-glyph-set',
+(defvar nxml-glyph-set-functions nil
+ "Abnormal hook for determining the set of glyphs in a face.
+Each function in this hook is called in turn, unless one of them
+returns non-nil. Each function is called with a single argument
+FACE. If it can determine the set of glyphs representable by
+FACE, it must set the variable `nxml-glyph-set' and return
+non-nil. Otherwise, it must return nil.
+
+The constants `nxml-ascii-glyph-set', `nxml-latin1-glyph-set',
`nxml-misc-fixed-1-glyph-set', `nxml-misc-fixed-2-glyph-set',
`nxml-misc-fixed-3-glyph-set' and `nxml-wgl4-glyph-set' are
-predefined for use by `nxml-glyph-set-hook'.")
+predefined for use by `nxml-glyph-set-functions'.")
+
+(define-obsolete-variable-alias 'nxml-glyph-set-hook
+ 'nxml-glyph-set-functions "24.2")
(defvar nxml-glyph-set nil
- "Used by `nxml-glyph-set-hook' to return set of glyphs in a FACE.
+ "Used by `nxml-glyph-set-functions' to return set of glyphs in a FACE.
This should dynamically bound by any function that runs
-`nxml-glyph-set-hook'. The value must be either nil representing an
+`nxml-glyph-set-functions'. The value must be either nil representing an
empty set or a vector. Each member of the vector is either a single
integer or a cons (FIRST . LAST) representing the range of integers
from FIRST to LAST. An integer represents a glyph with that Unicode
@@ -367,7 +372,7 @@ code-point. The vector must be ordered.")
(defun nxml-terminal-set-glyph-set (face)
(setq nxml-glyph-set nxml-ascii-glyph-set))
-(add-hook 'nxml-glyph-set-hook
+(add-hook 'nxml-glyph-set-functions
(or (cdr (assq window-system
'((x . nxml-x-set-glyph-set)
(w32 . nxml-w32-set-glyph-set)
@@ -381,7 +386,7 @@ code-point. The vector must be ordered.")
FACE gives the face that will be used for displaying the string.
Return nil if the face cannot display a glyph for N."
(let ((nxml-glyph-set nil))
- (run-hook-with-args-until-success 'nxml-glyph-set-hook face)
+ (run-hook-with-args-until-success 'nxml-glyph-set-functions face)
(and nxml-glyph-set
(nxml-glyph-set-contains-p n nxml-glyph-set)
(let ((ch (decode-char 'ucs n)))
diff --git a/lisp/nxml/nxml-mode.el b/lisp/nxml/nxml-mode.el
index 5adafc3845..934dabee90 100644
--- a/lisp/nxml/nxml-mode.el
+++ b/lisp/nxml/nxml-mode.el
@@ -54,9 +54,9 @@
(defcustom nxml-char-ref-display-glyph-flag t
"Non-nil means display glyph following character reference.
-The glyph is displayed in face `nxml-glyph'. The hook
-`nxml-glyph-set-hook' can be used to customize for which characters
-glyphs are displayed."
+The glyph is displayed in face `nxml-glyph'. The abnormal hook
+`nxml-glyph-set-functions' can be used to change the characters
+for which glyphs are displayed."
:group 'nxml
:type 'boolean)
diff --git a/lisp/progmodes/cwarn.el b/lisp/progmodes/cwarn.el
index 3e99f3c917..09c7e90880 100644
--- a/lisp/progmodes/cwarn.el
+++ b/lisp/progmodes/cwarn.el
@@ -119,12 +119,6 @@
:version "21.1"
:group 'faces)
-(defvar cwarn-mode nil
- "Non-nil when Cwarn mode is active.
-
-Never set this variable directly, use the command `cwarn-mode'
-instead.")
-
(defcustom cwarn-configuration
'((c-mode (not reference))
(c++-mode t))
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el
index 62ba9418ce..ce37fc2c57 100644
--- a/lisp/progmodes/pascal.el
+++ b/lisp/progmodes/pascal.el
@@ -232,10 +232,10 @@ will do all lineups."
:group 'pascal)
(defvar pascal-toggle-completions nil
- "Non-nil meant \\<pascal-mode-map>\\[pascal-complete-word] would try all possible completions one by one.
-Repeated use of \\[pascal-complete-word] would show you all of them.
-Normally, when there is more than one possible completion,
-it displays a list of all possible completions.")
+ "If non-nil, `pascal-complete-word' tries all possible completions.
+Repeated use of \\[pascal-complete-word] then shows all
+completions in turn, instead of displaying a list of all possible
+completions.")
(make-obsolete-variable 'pascal-toggle-completions
'completion-cycle-threshold "24.1")
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el
index 87a32ad47a..31656918fa 100644
--- a/lisp/textmodes/bibtex.el
+++ b/lisp/textmodes/bibtex.el
@@ -916,8 +916,10 @@ to the directories specified in `bibtex-string-file-path'."
:group 'bibtex
:type '(repeat file))
-(defvar bibtex-string-file-path (getenv "BIBINPUTS")
- "Colon separated list of paths to search for `bibtex-string-files'.")
+(defcustom bibtex-string-file-path (getenv "BIBINPUTS")
+ "Colon-separated list of paths to search for `bibtex-string-files'."
+ :group 'bibtex
+ :type 'string)
(defcustom bibtex-files nil
"List of BibTeX files that are searched for entry keys.
@@ -930,8 +932,10 @@ See also `bibtex-search-entry-globally'."
:type '(repeat (choice (const :tag "bibtex-file-path" bibtex-file-path)
directory file)))
-(defvar bibtex-file-path (getenv "BIBINPUTS")
- "Colon separated list of paths to search for `bibtex-files'.")
+(defcustom bibtex-file-path (getenv "BIBINPUTS")
+ "Colon separated list of paths to search for `bibtex-files'."
+ :group 'bibtex
+ :type 'string)
(defcustom bibtex-search-entry-globally nil
"If non-nil, interactive calls of `bibtex-search-entry' search globally.
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index 40295f6e1d..32015db840 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,9 @@
+2012-06-12 Chong Yidong <cyd@gnu.org>
+
+ * url-handlers.el (url-handler-regexp):
+ * url-nfs.el (url-nfs-automounter-directory-spec):
+ * url-vars.el (url-load-hook): Convert to defcustom.
+
2012-05-25 Leo Liu <sdl.web@gmail.com>
* url-http.el (url-http-codes): Fix mal-formed defconst.
diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el
index d00a1174cd..dc412c2d16 100644
--- a/lisp/url/url-handlers.el
+++ b/lisp/url/url-handlers.el
@@ -90,13 +90,24 @@
;; verify-visited-file-modtime
;; write-region
-(defvar url-handler-regexp
- "\\`\\(https?\\|ftp\\|file\\|nfs\\)://"
- "A regular expression for matching URLs handled by `file-name-handler-alist'.
-Some valid URL protocols just do not make sense to visit interactively
-\(about, data, info, irc, mailto, etc\). This regular expression
-avoids conflicts with local files that look like URLs \(Gnus is
-particularly bad at this\).")
+;;;###autoload
+(defcustom url-handler-regexp "\\`\\(https?\\|ftp\\|file\\|nfs\\)://"
+ "Regular expression for URLs handled by `url-handler-mode'.
+When URL Handler mode is enabled, this regular expression is
+added to `file-name-handler-alist'.
+
+Some valid URL protocols just do not make sense to visit
+interactively \(about, data, info, irc, mailto, etc\). This
+regular expression avoids conflicts with local files that look
+like URLs \(Gnus is particularly bad at this\)."
+ :group 'url
+ :type 'regexp
+ :set (lambda (symbol value)
+ (let ((enable url-handler-mode))
+ (url-handler-mode 0)
+ (set-default symbol value)
+ (if enable
+ (url-handler-mode)))))
;;;###autoload
(define-minor-mode url-handler-mode
@@ -105,16 +116,13 @@ With a prefix argument ARG, enable URL Handler mode if ARG is
positive, and disable it otherwise. If called from Lisp, enable
the mode if ARG is omitted or nil."
:global t :group 'url
- (if (not (boundp 'file-name-handler-alist))
- ;; Can't be turned ON anyway.
- (setq url-handler-mode nil)
- ;; Remove old entry, if any.
- (setq file-name-handler-alist
- (delq (rassq 'url-file-handler file-name-handler-alist)
- file-name-handler-alist))
- (if url-handler-mode
- (push (cons url-handler-regexp 'url-file-handler)
- file-name-handler-alist))))
+ ;; Remove old entry, if any.
+ (setq file-name-handler-alist
+ (delq (rassq 'url-file-handler file-name-handler-alist)
+ file-name-handler-alist))
+ (if url-handler-mode
+ (push (cons url-handler-regexp 'url-file-handler)
+ file-name-handler-alist)))
(defun url-run-real-handler (operation args)
(let ((inhibit-file-name-handlers (cons 'url-file-handler
diff --git a/lisp/url/url-nfs.el b/lisp/url/url-nfs.el
index bfab147f26..cb5695b554 100644
--- a/lisp/url/url-nfs.el
+++ b/lisp/url/url-nfs.el
@@ -27,8 +27,7 @@
(require 'url-parse)
(require 'url-file)
-(defvar url-nfs-automounter-directory-spec
- "file:/net/%h%f"
+(defcustom url-nfs-automounter-directory-spec "file:/net/%h%f"
"How to invoke the NFS automounter. Certain % sequences are recognized.
%h -- the hostname of the NFS server
@@ -38,7 +37,9 @@
%f -- the filename on the remote server
%% -- a literal %
-Each can be used any number of times.")
+Each can be used any number of times."
+ :group 'url
+ :type 'string)
(defun url-nfs-unescape (format host port user pass file)
(with-current-buffer (get-buffer-create " *nfs-parse*")
diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el
index 6aa14b8bae..11546e1158 100644
--- a/lisp/url/url-vars.el
+++ b/lisp/url/url-vars.el
@@ -375,8 +375,10 @@ Currently supported methods:
(modify-syntax-entry ?> ")<" url-parse-syntax-table)
(modify-syntax-entry ?/ " " url-parse-syntax-table)
-(defvar url-load-hook nil
- "Hooks to be run after initializing the URL library.")
+(defcustom url-load-hook nil
+ "Hook run after initializing the URL library."
+ :group 'url
+ :type 'hook)
;;; Make OS/2 happy - yeeks
;; (defvar tcp-binary-process-input-services nil