aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2022-07-30 12:50:47 +0200
committerLars Ingebrigtsen2022-07-30 12:50:47 +0200
commit30f598bcc1371dbf27ea034d260fe35baf0905f9 (patch)
treea8d6ec50410208b531ee3b464be3ccf6271b03f3
parent2539039335709ccf64f4792882a0e74a0715f1fa (diff)
downloademacs-30f598bcc1371dbf27ea034d260fe35baf0905f9.tar.gz
emacs-30f598bcc1371dbf27ea034d260fe35baf0905f9.zip
Adjust outline--use-buttons-p to buffer-match-p change
* lisp/outline.el (outline-minor-mode-use-buttons): Adjust doc string. (outline--use-buttons-p): No longer any need to special-case t/nil.
-rw-r--r--lisp/outline.el9
1 files changed, 3 insertions, 6 deletions
diff --git a/lisp/outline.el b/lisp/outline.el
index a68f648bd82..6837722e644 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -283,13 +283,13 @@ This option is only in effect when `outline-minor-mode-cycle' is non-nil."
283 283
284(defcustom outline-minor-mode-use-buttons '(derived-mode . special-mode) 284(defcustom outline-minor-mode-use-buttons '(derived-mode . special-mode)
285 "Whether to display clickable buttons on the headings. 285 "Whether to display clickable buttons on the headings.
286The value should be a `buffer-match-p' condition, or nil to 286The value should be a `buffer-match-p' condition.
287disable in all buffers and t to enable in all buffers.
288 287
289These buttons can be used to hide and show the body under the heading. 288These buttons can be used to hide and show the body under the heading.
290Note that this feature is not meant to be used in editing 289Note that this feature is not meant to be used in editing
291buffers (yet) -- that will be amended in a future version." 290buffers (yet) -- that will be amended in a future version."
292 :type 'boolean 291 :type 'boolean
292 ;; FIXME -- is there a `buffer-match-p' defcustom type somewhere?
293 :safe #'booleanp 293 :safe #'booleanp
294 :version "29.1") 294 :version "29.1")
295 295
@@ -478,10 +478,7 @@ See the command `outline-mode' for more information on this mode."
478 478
479(defun outline--use-buttons-p () 479(defun outline--use-buttons-p ()
480 (and outline-minor-mode 480 (and outline-minor-mode
481 outline-minor-mode-use-buttons 481 (buffer-match-p outline-minor-mode-use-buttons (current-buffer))))
482 (or (eq outline-minor-mode-use-buttons t)
483 (buffer-match-p outline-minor-mode-use-buttons
484 (current-buffer)))))
485 482
486(defvar-local outline-heading-alist () 483(defvar-local outline-heading-alist ()
487 "Alist associating a heading for every possible level. 484 "Alist associating a heading for every possible level.