diff --git a/lisp/outline.el b/lisp/outline.el index ab37e398e9..efebd46d69 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -315,7 +315,8 @@ outline-open '((image "outline-open.svg" "outline-open.pbm" :height 15) (emoji "🔽") (symbol " ▼ ") - (text " v ")) + (ascii " v ") + (text " open ")) "Icon used for buttons for opened sections in outline buffers." :version "29.1" :help-echo "Close this section") @@ -324,7 +325,8 @@ outline-close '((image "outline-close.svg" "outline-close.pbm" :height 15) (emoji "▶️") (symbol " ▶ ") - (text " > ")) + (ascii " > ") + (text " close ")) "Icon used for buttons for closed sections in outline buffers." :version "29.1" :help-echo "Open this section") @@ -333,7 +335,8 @@ outline-close-rtl '((image "outline-close.svg" "outline-close.pbm" :height 15 :rotation 180) (emoji "◀️") (symbol " ◀ ") - (text " < ")) + (ascii " < ") + (text " close ")) "Right-to-left icon used for buttons in closed outline sections." :version "29.1") diff --git a/lisp/emacs-lisp/icons.el b/lisp/emacs-lisp/icons.el index ccc3657793..732b2181bb 100644 --- a/lisp/emacs-lisp/icons.el +++ b/lisp/emacs-lisp/icons.el @@ -42,7 +42,7 @@ icon-button :version "29.1" :group 'customize) -(defcustom icon-preference '(image emoji symbol text) +(defcustom icon-preference '(image emoji symbol ascii text) "List of icon types to use, in order of preference. Emacs will choose the icon of the highest preference possible on the current display, and \"degrade\" gracefully to an icon @@ -52,6 +52,7 @@ icon-preference :type '(repeat (choice (const :tag "Images" image) (const :tag "Colorful Emojis" emoji) (const :tag "Monochrome Symbols" symbol) + (const :tag "ASCII art" ascii) (const :tag "Text Only" text)))) (defmacro define-icon (name parent specification documentation &rest keywords) @@ -61,7 +62,7 @@ define-icon SPECIFICATION is an alist of entries where the first element is the type, and the rest are icons of that type. Valid types are -`image', `emoji', `symbol' and `text'. +`image', `emoji', `symbol', 'ascii' and `text'. KEYWORDS specify additional information. Valid keywords are: @@ -221,6 +222,9 @@ icons--create (and (cl-every #'char-displayable-p icon) icon)) +(cl-defmethod icons--create ((_type (eql 'ascii)) icon _keywords) + icon) + (cl-defmethod icons--create ((_type (eql 'text)) icon _keywords) icon)