Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2017-06-26 23:40:35 +02:00
commit 87a6e3970a
1 changed files with 6 additions and 8 deletions

View File

@ -1127,8 +1127,8 @@ 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 nil, just use the standard three dots. When a non-empty string,
use that string instead.
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
@ -1136,10 +1136,10 @@ effective."
:group 'org-startup
:type '(choice (const :tag "Default" nil)
(string :tag "String" :value "...#"))
:safe #'string-or-null-p)
:safe (lambda (v) (and (string-or-null-p v) (not (equal "" v)))))
(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.")
(defgroup org-keywords nil
"Keywords in Org mode."
@ -5475,15 +5475,13 @@ The following commands are available:
(setq-local outline-regexp org-outline-regexp)
(setq-local outline-level 'org-outline-level)
(setq bidi-paragraph-direction 'left-to-right)
(when (and org-ellipsis
(fboundp 'set-display-table-slot) (boundp 'buffer-display-table)
(fboundp 'make-glyph-code))
(when (and (stringp org-ellipsis) (not (equal "" org-ellipsis)))
(unless org-display-table
(setq org-display-table (make-display-table)))
(set-display-table-slot
org-display-table 4
(vconcat (mapcar (lambda (c) (make-glyph-code c 'org-ellipsis))
(if (stringp org-ellipsis) org-ellipsis "..."))))
org-ellipsis)))
(setq buffer-display-table org-display-table))
(org-set-regexps-and-options)
(org-set-font-lock-defaults)