diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-03-18 05:55:16 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-03-18 05:55:16 +0100 |
commit | 6a75b6fcb10725fb1e352dec506b84e795baa7c8 (patch) | |
tree | 76e677f5f5cb941d8554e03eb3b1064933b9b311 /lisp/facemenu.el | |
parent | 1e9c9ebee3e13773400fe93bf26db923a880be6d (diff) | |
download | emacs-6a75b6fcb10725fb1e352dec506b84e795baa7c8.tar.gz |
Don't pre-load facemenu
* lisp/facemenu.el (facemenu-add-face-function): Move to avoid a
compilation warning.
(facemenu-color-alist): Made obsolete.
* lisp/faces.el (read-color): Don't use it.
* lisp/loadup.el ("emacs-lisp/syntax"): Don't load facemenu.
* lisp/wid-edit.el (color): Don't use facemenu-color-alist.
(widget-color--choose-action): Require facemenu.
(widget-color-action): Ditto.
* lisp/progmodes/cperl-mode.el (facemenu): Require.
* lisp/textmodes/sgml-mode.el (facemenu): Require.
Diffstat (limited to 'lisp/facemenu.el')
-rw-r--r-- | lisp/facemenu.el | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/facemenu.el b/lisp/facemenu.el index 6290b02add2..2d06658b55c 100644 --- a/lisp/facemenu.el +++ b/lisp/facemenu.el @@ -169,6 +169,14 @@ it will remove any faces not explicitly in the list." (defalias 'facemenu-background-menu facemenu-background-menu) (put 'facemenu-background-menu 'menu-enable '(facemenu-enable-faces-p)) +(defcustom facemenu-add-face-function nil + "Function called at beginning of text to change or nil. +This function is passed the FACE to set and END of text to change, and must +return a string which is inserted. It may set `facemenu-end-add-face'." + :type '(choice (const :tag "None" nil) + function) + :group 'facemenu) + ;;; Condition for enabling menu items that set faces. (defun facemenu-enable-faces-p () ;; Enable the facemenu if facemenu-add-face-function is defined @@ -260,14 +268,6 @@ requested in `facemenu-keybindings'.") (defalias 'facemenu-keymap facemenu-keymap) -(defcustom facemenu-add-face-function nil - "Function called at beginning of text to change or nil. -This function is passed the FACE to set and END of text to change, and must -return a string which is inserted. It may set `facemenu-end-add-face'." - :type '(choice (const :tag "None" nil) - function) - :group 'facemenu) - (defcustom facemenu-end-add-face nil "String to insert or function called at end of text to change or nil. This function is passed the FACE to set, and must return a string which is @@ -291,6 +291,7 @@ May also be t meaning to use `facemenu-add-face-function'." (defvar facemenu-color-alist nil "Alist of colors, used for completion. If this is nil, then the value of (defined-colors) is used.") +(make-obsolete-variable 'facemenu-color-alist nil "28.1") (defun facemenu-update () "Add or update the \"Face\" menu in the menu bar. |