Browse Source

Make use of `org-ellipsis' face

* lisp/org.el (org-ellipsis): Do not allow to specify a face since
  `org-ellipsis' face can be modified instead.
(org-mode): Use `org-ellipsis', independently on the value of
`org-ellipsis' (the string).

Reported-by: Vasilij Schneidermann <v.schneidermann@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/109543>
Nicolas Goaziou 9 years ago
parent
commit
191fe8209f
1 changed files with 6 additions and 7 deletions
  1. 6 7
      lisp/org.el

+ 6 - 7
lisp/org.el

@@ -1110,16 +1110,17 @@ Or return the original if not disputed."
 
 
 (defcustom org-ellipsis nil
 (defcustom org-ellipsis nil
   "The ellipsis to use in the Org mode outline.
   "The ellipsis to use in the Org mode outline.
+
 When nil, just use the standard three dots.
 When nil, just use the standard three dots.
 When a string, use that string instead.
 When a string, use that string instead.
-When a face, use the standard 3 dots, but with the specified face.
+
 The change affects only Org mode (which will then use its own display table).
 The change affects only Org mode (which will then use its own display table).
 Changing this requires executing \\[org-mode] in a buffer to become
 Changing this requires executing \\[org-mode] in a buffer to become
 effective."
 effective."
   :group 'org-startup
   :group 'org-startup
   :type '(choice (const :tag "Default" nil)
   :type '(choice (const :tag "Default" nil)
-		 (face :tag "Face" :value org-warning)
-		 (string :tag "String" :value "...#")))
+		 (string :tag "String" :value "...#"))
+  :safe #'string-or-null-p)
 
 
 (defvar org-display-table nil
 (defvar org-display-table nil
   "The display table for org-mode, in case `org-ellipsis' is non-nil.")
   "The display table for org-mode, in case `org-ellipsis' is non-nil.")
@@ -5540,10 +5541,8 @@ The following commands are available:
       (setq org-display-table (make-display-table)))
       (setq org-display-table (make-display-table)))
     (set-display-table-slot
     (set-display-table-slot
      org-display-table 4
      org-display-table 4
-     (vconcat (mapcar
-	       (lambda (c) (make-glyph-code c (and (not (stringp org-ellipsis))
-						   org-ellipsis)))
-	       (if (stringp org-ellipsis) org-ellipsis "..."))))
+     (vconcat (mapcar (lambda (c) (make-glyph-code c 'org-ellipsis))
+		      (if (stringp org-ellipsis) org-ellipsis "..."))))
     (setq buffer-display-table org-display-table))
     (setq buffer-display-table org-display-table))
   (org-set-regexps-and-options)
   (org-set-regexps-and-options)
   (org-set-font-lock-defaults)
   (org-set-font-lock-defaults)