emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r108571: Various minor variable/hook


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r108571: Various minor variable/hook cleanups.
Date: Tue, 12 Jun 2012 13:47:14 +0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108571
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Tue 2012-06-12 13:47:14 +0800
message:
  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.
modified:
  lisp/ChangeLog
  lisp/emacs-lisp/edebug.el
  lisp/emacs-lisp/eieio.el
  lisp/erc/ChangeLog
  lisp/erc/erc-dcc.el
  lisp/nxml/nxml-glyph.el
  lisp/nxml/nxml-mode.el
  lisp/progmodes/cwarn.el
  lisp/progmodes/pascal.el
  lisp/textmodes/bibtex.el
  lisp/url/ChangeLog
  lisp/url/url-handlers.el
  lisp/url/url-nfs.el
  lisp/url/url-vars.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-06-12 01:03:10 +0000
+++ b/lisp/ChangeLog    2012-06-12 05:47:14 +0000
@@ -1,3 +1,21 @@
+2012-06-12  Chong Yidong  <address@hidden>
+
+       * 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  <address@hidden>
 
        * help-mode.el (help-bookmark-make-record, help-bookmark-jump):

=== modified file 'lisp/emacs-lisp/edebug.el'
--- a/lisp/emacs-lisp/edebug.el 2012-06-07 19:25:48 +0000
+++ b/lisp/emacs-lisp/edebug.el 2012-06-12 05:47:14 +0000
@@ -3055,7 +3055,6 @@
       (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 @@
 
 ;;; 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)

=== modified file 'lisp/emacs-lisp/eieio.el'
--- a/lisp/emacs-lisp/eieio.el  2012-04-20 05:47:55 +0000
+++ b/lisp/emacs-lisp/eieio.el  2012-06-12 05:47:14 +0000
@@ -2044,7 +2044,7 @@
 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.")
 

=== modified file 'lisp/erc/ChangeLog'
--- a/lisp/erc/ChangeLog        2012-06-10 13:20:58 +0000
+++ b/lisp/erc/ChangeLog        2012-06-12 05:47:14 +0000
@@ -1,3 +1,8 @@
+2012-06-12  Chong Yidong  <address@hidden>
+
+       * 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  <address@hidden>
 
        * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face)

=== modified file 'lisp/erc/erc-dcc.el'
--- a/lisp/erc/erc-dcc.el       2012-05-14 15:42:23 +0000
+++ b/lisp/erc/erc-dcc.el       2012-06-12 05:47:14 +0000
@@ -627,7 +627,7 @@
 
 ;;;###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 @@
   (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 @@
           (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)

=== modified file 'lisp/nxml/nxml-glyph.el'
--- a/lisp/nxml/nxml-glyph.el   2012-04-09 13:05:48 +0000
+++ b/lisp/nxml/nxml-glyph.el   2012-06-12 05:47:14 +0000
@@ -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 @@
    (#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 @@
 (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 @@
 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)))

=== modified file 'lisp/nxml/nxml-mode.el'
--- a/lisp/nxml/nxml-mode.el    2012-04-19 17:20:26 +0000
+++ b/lisp/nxml/nxml-mode.el    2012-06-12 05:47:14 +0000
@@ -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)
 

=== modified file 'lisp/progmodes/cwarn.el'
--- a/lisp/progmodes/cwarn.el   2012-04-09 13:05:48 +0000
+++ b/lisp/progmodes/cwarn.el   2012-06-12 05:47:14 +0000
@@ -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))

=== modified file 'lisp/progmodes/pascal.el'
--- a/lisp/progmodes/pascal.el  2012-04-27 02:48:38 +0000
+++ b/lisp/progmodes/pascal.el  2012-06-12 05:47:14 +0000
@@ -232,10 +232,10 @@
   :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")
 

=== modified file 'lisp/textmodes/bibtex.el'
--- a/lisp/textmodes/bibtex.el  2012-04-09 13:05:48 +0000
+++ b/lisp/textmodes/bibtex.el  2012-06-12 05:47:14 +0000
@@ -916,8 +916,10 @@
   :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 @@
   :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.

=== modified file 'lisp/url/ChangeLog'
--- a/lisp/url/ChangeLog        2012-06-10 13:20:58 +0000
+++ b/lisp/url/ChangeLog        2012-06-12 05:47:14 +0000
@@ -1,3 +1,9 @@
+2012-06-12  Chong Yidong  <address@hidden>
+
+       * 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  <address@hidden>
 
        * url-http.el (url-http-codes): Fix mal-formed defconst.

=== modified file 'lisp/url/url-handlers.el'
--- a/lisp/url/url-handlers.el  2012-04-09 13:05:48 +0000
+++ b/lisp/url/url-handlers.el  2012-06-12 05:47:14 +0000
@@ -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 @@
 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

=== modified file 'lisp/url/url-nfs.el'
--- a/lisp/url/url-nfs.el       2012-04-09 13:05:48 +0000
+++ b/lisp/url/url-nfs.el       2012-06-12 05:47:14 +0000
@@ -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*")

=== modified file 'lisp/url/url-vars.el'
--- a/lisp/url/url-vars.el      2012-05-10 06:27:12 +0000
+++ b/lisp/url/url-vars.el      2012-06-12 05:47:14 +0000
@@ -375,8 +375,10 @@
 (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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]