\f
* Incompatible Lisp Changes in Emacs 28.1
+** 'facemenu-color-alist' is now obsolete, and is not used.
+
+** 'facemenu.el' is no longer preloaded.
+To use functions/variables from the package, you now have to say
+'(require 'facemenu)' or similar.
+
** 'pcomplete-ignore-case' is now an obsolete alias of 'completion-ignore-case'.
** 'completions-annotations' face is not used when the caller puts own face.
(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
(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
(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.
resulting color name in the echo area."
(interactive "i\np\ni\np") ; Always convert to RGB interactively.
(let* ((completion-ignore-case t)
- (colors (or facemenu-color-alist
- (append '("foreground at point" "background at point")
- (if allow-empty-name '(""))
- (if (display-color-p)
- (defined-colors-with-face-attributes)
- (defined-colors)))))
+ (colors (append '("foreground at point" "background at point")
+ (if allow-empty-name '(""))
+ (if (display-color-p)
+ (defined-colors-with-face-attributes)
+ (defined-colors))))
(color (completing-read
(or prompt "Color (name or #RGB triplet): ")
;; Completing function for reading colors, accepting
(load "startup")
(load "term/tty-colors")
(load "font-core")
-(load "facemenu")
(load "emacs-lisp/syntax")
(load "font-lock")
(load "jit-lock")
(concat msg ": ")))))
\f
(eval-when-compile (require 'cl-lib))
+(require 'facemenu)
(defvar msb-menu-cond)
(defvar gud-perldb-history)
(require 'dom)
(require 'seq)
+(require 'facemenu)
(eval-when-compile (require 'subr-x))
(eval-when-compile
(require 'skeleton)
(mapcar #'length (defined-colors))))
:tag "Color"
:value "black"
- :completions (or facemenu-color-alist (defined-colors))
+ :completions (defined-colors)
:sample-face-get 'widget-color-sample-face-get
:notify 'widget-color-notify
:match #'widget-color-match
:tag " Choose " :action 'widget-color--choose-action)
(widget-insert " "))
+(declare-function list-colors-display "facemenu")
+
(defun widget-color--choose-action (widget &optional _event)
+ (require 'facemenu)
(list-colors-display
nil nil
(let ((cbuf (current-buffer))
(list (cons 'foreground-color value))
'default)))
+(declare-function facemenu-read-color "facemenu")
+
(defun widget-color-action (widget &optional event)
"Prompt for a color."
+ (require 'facemenu)
(let* ((tag (widget-apply widget :menu-tag-get))
(prompt (concat tag ": "))
(answer (facemenu-read-color prompt)))