Tweak `which-function-mode' setup code
This commit is contained in:
parent
1aabe90518
commit
547fc0031e
@ -4801,7 +4801,9 @@ true in case document headlines contain links. The code in listing
|
||||
#+caption: Setup ~which-function-mode~.
|
||||
#+name: lst:setup-which-function-mode
|
||||
#+begin_src emacs-lisp -n :results silent
|
||||
(setopt which-func-modes '(emacs-lisp-mode org-mode pdf-view-mode))
|
||||
(with-eval-after-load 'which-func
|
||||
(setopt which-func-modes
|
||||
'(emacs-lisp-mode org-mode pdf-view-mode)))
|
||||
|
||||
;; It looks like `python-mode' does nothing when they it is an element
|
||||
;; of `which-func-modes'.
|
||||
@ -4842,7 +4844,7 @@ Return the document title when point is above the first headline."
|
||||
|
||||
(defun which-func-pdf-view-function ()
|
||||
"Return the title of the current headline.
|
||||
Return \"Front Matter\" when point is above the first headline."
|
||||
Return \"Front Matter\" when current page is above the first headline."
|
||||
(interactive) ;; Keep this function interactive for fixing.
|
||||
(when (eq major-mode 'pdf-view-mode)
|
||||
(let* ((current-page (pdf-view-current-page))
|
||||
|
Loading…
Reference in New Issue
Block a user