瀏覽代碼

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 8 年之前
父節點
當前提交
191fe8209f
共有 1 個文件被更改,包括 6 次插入7 次删除
  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
   "The ellipsis to use in the Org mode outline.
+
 When nil, just use the standard three dots.
 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).
 Changing this requires executing \\[org-mode] in a buffer to become
 effective."
   :group 'org-startup
   :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
   "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)))
     (set-display-table-slot
      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))
   (org-set-regexps-and-options)
   (org-set-font-lock-defaults)