Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2017-06-26 23:40:35 +02:00
commit 87a6e3970a

View file

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