aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/nxml
diff options
context:
space:
mode:
authorChong Yidong2012-06-12 13:47:14 +0800
committerChong Yidong2012-06-12 13:47:14 +0800
commitf1a4e679f3b0696089b4fd73717307ba5d23e1cf (patch)
treedc44016b20723e38247300b6c6eaec3cd4e98761 /lisp/nxml
parentbf67e61f291a82a9e90a7918f5188714853f0094 (diff)
downloademacs-f1a4e679f3b0696089b4fd73717307ba5d23e1cf.tar.gz
emacs-f1a4e679f3b0696089b4fd73717307ba5d23e1cf.zip
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.
Diffstat (limited to 'lisp/nxml')
-rw-r--r--lisp/nxml/nxml-glyph.el31
-rw-r--r--lisp/nxml/nxml-mode.el6
2 files changed, 21 insertions, 16 deletions
diff --git a/lisp/nxml/nxml-glyph.el b/lisp/nxml/nxml-glyph.el
index 6e15e5d4ce0..86b14e66398 100644
--- a/lisp/nxml/nxml-glyph.el
+++ b/lisp/nxml/nxml-glyph.el
@@ -25,7 +25,7 @@
25;; The entry point to this file is `nxml-glyph-display-string'. 25;; The entry point to this file is `nxml-glyph-display-string'.
26;; The current implementation is heuristic due to a lack of 26;; The current implementation is heuristic due to a lack of
27;; Emacs primitives necessary to implement it properly. The user 27;; Emacs primitives necessary to implement it properly. The user
28;; can tweak the heuristics using `nxml-glyph-set-hook'. 28;; can tweak the heuristics using `nxml-glyph-set-functions'.
29 29
30;;; Code: 30;;; Code:
31 31
@@ -332,21 +332,26 @@ This repertoire is supported for the following fonts:
332 (#xFB01 . #xFB02)] 332 (#xFB01 . #xFB02)]
333 "Glyph set corresponding to Windows Glyph List 4.") 333 "Glyph set corresponding to Windows Glyph List 4.")
334 334
335(defvar nxml-glyph-set-hook nil 335(defvar nxml-glyph-set-functions nil
336 "Hook for determining the set of glyphs in a face. 336 "Abnormal hook for determining the set of glyphs in a face.
337The hook will receive a single argument FACE. If it can determine 337Each function in this hook is called in turn, unless one of them
338the set of glyphs representable by FACE, it must set the variable 338returns non-nil. Each function is called with a single argument
339`nxml-glyph-set' and return non-nil. Otherwise, it must return nil. 339FACE. If it can determine the set of glyphs representable by
340The hook will be run until success. The constants 340FACE, it must set the variable `nxml-glyph-set' and return
341`nxml-ascii-glyph-set', `nxml-latin1-glyph-set', 341non-nil. Otherwise, it must return nil.
342
343The constants `nxml-ascii-glyph-set', `nxml-latin1-glyph-set',
342`nxml-misc-fixed-1-glyph-set', `nxml-misc-fixed-2-glyph-set', 344`nxml-misc-fixed-1-glyph-set', `nxml-misc-fixed-2-glyph-set',
343`nxml-misc-fixed-3-glyph-set' and `nxml-wgl4-glyph-set' are 345`nxml-misc-fixed-3-glyph-set' and `nxml-wgl4-glyph-set' are
344predefined for use by `nxml-glyph-set-hook'.") 346predefined for use by `nxml-glyph-set-functions'.")
347
348(define-obsolete-variable-alias 'nxml-glyph-set-hook
349 'nxml-glyph-set-functions "24.2")
345 350
346(defvar nxml-glyph-set nil 351(defvar nxml-glyph-set nil
347 "Used by `nxml-glyph-set-hook' to return set of glyphs in a FACE. 352 "Used by `nxml-glyph-set-functions' to return set of glyphs in a FACE.
348This should dynamically bound by any function that runs 353This should dynamically bound by any function that runs
349`nxml-glyph-set-hook'. The value must be either nil representing an 354`nxml-glyph-set-functions'. The value must be either nil representing an
350empty set or a vector. Each member of the vector is either a single 355empty set or a vector. Each member of the vector is either a single
351integer or a cons (FIRST . LAST) representing the range of integers 356integer or a cons (FIRST . LAST) representing the range of integers
352from FIRST to LAST. An integer represents a glyph with that Unicode 357from FIRST to LAST. An integer represents a glyph with that Unicode
@@ -367,7 +372,7 @@ code-point. The vector must be ordered.")
367(defun nxml-terminal-set-glyph-set (face) 372(defun nxml-terminal-set-glyph-set (face)
368 (setq nxml-glyph-set nxml-ascii-glyph-set)) 373 (setq nxml-glyph-set nxml-ascii-glyph-set))
369 374
370(add-hook 'nxml-glyph-set-hook 375(add-hook 'nxml-glyph-set-functions
371 (or (cdr (assq window-system 376 (or (cdr (assq window-system
372 '((x . nxml-x-set-glyph-set) 377 '((x . nxml-x-set-glyph-set)
373 (w32 . nxml-w32-set-glyph-set) 378 (w32 . nxml-w32-set-glyph-set)
@@ -381,7 +386,7 @@ code-point. The vector must be ordered.")
381FACE gives the face that will be used for displaying the string. 386FACE gives the face that will be used for displaying the string.
382Return nil if the face cannot display a glyph for N." 387Return nil if the face cannot display a glyph for N."
383 (let ((nxml-glyph-set nil)) 388 (let ((nxml-glyph-set nil))
384 (run-hook-with-args-until-success 'nxml-glyph-set-hook face) 389 (run-hook-with-args-until-success 'nxml-glyph-set-functions face)
385 (and nxml-glyph-set 390 (and nxml-glyph-set
386 (nxml-glyph-set-contains-p n nxml-glyph-set) 391 (nxml-glyph-set-contains-p n nxml-glyph-set)
387 (let ((ch (decode-char 'ucs n))) 392 (let ((ch (decode-char 'ucs n)))
diff --git a/lisp/nxml/nxml-mode.el b/lisp/nxml/nxml-mode.el
index 5adafc3845c..934dabee90d 100644
--- a/lisp/nxml/nxml-mode.el
+++ b/lisp/nxml/nxml-mode.el
@@ -54,9 +54,9 @@
54 54
55(defcustom nxml-char-ref-display-glyph-flag t 55(defcustom nxml-char-ref-display-glyph-flag t
56 "Non-nil means display glyph following character reference. 56 "Non-nil means display glyph following character reference.
57The glyph is displayed in face `nxml-glyph'. The hook 57The glyph is displayed in face `nxml-glyph'. The abnormal hook
58`nxml-glyph-set-hook' can be used to customize for which characters 58`nxml-glyph-set-functions' can be used to change the characters
59glyphs are displayed." 59for which glyphs are displayed."
60 :group 'nxml 60 :group 'nxml
61 :type 'boolean) 61 :type 'boolean)
62 62