aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-04-18 02:53:46 +0000
committerRichard M. Stallman1997-04-18 02:53:46 +0000
commit9086c73099dc628b81ce321411b03a9a9341fee1 (patch)
tree5a2c80ec547f1116af500028d1e158eac9fafb39
parent4c06ccad37266a33e223410f1fd8bcbd9f988dad (diff)
downloademacs-9086c73099dc628b81ce321411b03a9a9341fee1.tar.gz
emacs-9086c73099dc628b81ce321411b03a9a9341fee1.zip
(facemenu-update): Don't make global bindings here.
Make them at top level. (facemenu-key): Variable deleted. (facemenu-keybindings, facemenu-new-faces-at-end) (facemenu-unlisted-faces, facemenu-remove-face-function): Doc fixes.
-rw-r--r--lisp/facemenu.el22
1 files changed, 9 insertions, 13 deletions
diff --git a/lisp/facemenu.el b/lisp/facemenu.el
index 361eb7a93b5..cb50ef3d01b 100644
--- a/lisp/facemenu.el
+++ b/lisp/facemenu.el
@@ -65,11 +65,10 @@
65;; (italic . [?\H-i]) 65;; (italic . [?\H-i])
66;; (bold-italic . [?\H-l]) 66;; (bold-italic . [?\H-l])
67;; (underline . [?\H-u]))) 67;; (underline . [?\H-u])))
68;; (facemenu-update)
68;; (setq facemenu-keymap global-map) 69;; (setq facemenu-keymap global-map)
69;; (setq facemenu-key nil)
70;; (define-key global-map [?\H-c] 'facemenu-set-foreground) ; set fg color 70;; (define-key global-map [?\H-c] 'facemenu-set-foreground) ; set fg color
71;; (define-key global-map [?\H-C] 'facemenu-set-background) ; set bg color 71;; (define-key global-map [?\H-C] 'facemenu-set-background) ; set bg color
72;; (require 'facemenu)
73;; 72;;
74;; The order of the faces that appear in the menu and their keybindings can be 73;; The order of the faces that appear in the menu and their keybindings can be
75;; controlled by setting the variables `facemenu-keybindings' and 74;; controlled by setting the variables `facemenu-keybindings' and
@@ -98,9 +97,10 @@
98;;; Provide some binding for startup: 97;;; Provide some binding for startup:
99;;;###autoload (define-key global-map "\M-g" 'facemenu-keymap) 98;;;###autoload (define-key global-map "\M-g" 'facemenu-keymap)
100;;;###autoload (autoload 'facemenu-keymap "facemenu" "Keymap for face-changing commands." t 'keymap) 99;;;###autoload (autoload 'facemenu-keymap "facemenu" "Keymap for face-changing commands." t 'keymap)
101 100
102(defvar facemenu-key "\M-g" 101;; Global bindings:
103 "Prefix key to use for facemenu commands.") 102(define-key global-map [C-down-mouse-2] 'facemenu-menu)
103(define-key global-map "\M-g" 'facemenu-keymap)
104 104
105(defvar facemenu-keybindings 105(defvar facemenu-keybindings
106 '((default . "d") 106 '((default . "d")
@@ -111,7 +111,7 @@
111 "Alist of interesting faces and keybindings. 111 "Alist of interesting faces and keybindings.
112Each element is itself a list: the car is the name of the face, 112Each element is itself a list: the car is the name of the face,
113the next element is the key to use as a keyboard equivalent of the menu item; 113the next element is the key to use as a keyboard equivalent of the menu item;
114the binding is made in facemenu-keymap. 114the binding is made in `facemenu-keymap'.
115 115
116The faces specifically mentioned in this list are put at the top of 116The faces specifically mentioned in this list are put at the top of
117the menu, in the order specified. All other faces which are defined, 117the menu, in the order specified. All other faces which are defined,
@@ -122,13 +122,13 @@ If you change this variable after loading facemenu.el, you will need to call
122`facemenu-update' to make it take effect.") 122`facemenu-update' to make it take effect.")
123 123
124(defvar facemenu-new-faces-at-end t 124(defvar facemenu-new-faces-at-end t
125 "Where in the menu to insert newly-created faces. 125 "*Where in the menu to insert newly-created faces.
126This should be nil to put them at the top of the menu, or t to put them 126This should be nil to put them at the top of the menu, or t to put them
127just before \"Other\" at the end.") 127just before \"Other\" at the end.")
128 128
129(defvar facemenu-unlisted-faces 129(defvar facemenu-unlisted-faces
130 '(modeline region secondary-selection highlight scratch-face) 130 '(modeline region secondary-selection highlight scratch-face)
131 "List of faces not to include in the Face menu. 131 "*List of faces not to include in the Face menu.
132You can set this list before loading facemenu.el, or add a face to it before 132You can set this list before loading facemenu.el, or add a face to it before
133creating that face if you do not want it to be listed. If you change the 133creating that face if you do not want it to be listed. If you change the
134variable so as to eliminate faces that have already been added to the menu, 134variable so as to eliminate faces that have already been added to the menu,
@@ -253,7 +253,7 @@ This function is passed the FACE to set, and must return a string which is
253inserted.") 253inserted.")
254 254
255(defvar facemenu-remove-face-function nil 255(defvar facemenu-remove-face-function nil
256 "When non-`nil' function called to remove faces. 256 "When non-nil, this is a function called to remove faces.
257This function is passed the START and END of text to change. 257This function is passed the START and END of text to change.
258May also be `t' meaning to use `facemenu-add-face-function'.") 258May also be `t' meaning to use `facemenu-add-face-function'.")
259 259
@@ -269,10 +269,6 @@ If null, `facemenu-read-color' will set it.")
269You can call this to update things if you change any of the menu configuration 269You can call this to update things if you change any of the menu configuration
270variables." 270variables."
271 (interactive) 271 (interactive)
272
273 ;; Global bindings:
274 (define-key global-map [C-down-mouse-2] 'facemenu-menu)
275 (if facemenu-key (define-key global-map facemenu-key 'facemenu-keymap))
276 272
277 ;; Add each defined face to the menu. 273 ;; Add each defined face to the menu.
278 (facemenu-iterate 'facemenu-add-new-face 274 (facemenu-iterate 'facemenu-add-new-face