Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2026-06-18 Bob Weiner <rsw@gnu.org>

* hywiki.el (hywiki-include-special-modes): Add to recognize HyWikiWords in
particular special major modes, like eww and elfeed ones.
(hywiki-potential-buffer-p): Use above setting in this function.

2026-06-16 Bob Weiner <rsw@gnu.org>

* test/demo-tests.el (fast-demo-display-kotl-starting-from-cell): Fix to
Expand Down
21 changes: 15 additions & 6 deletions hywiki.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 21-Apr-24 at 22:41:13
;; Last-Mod: 15-Jun-26 at 18:10:04 by Bob Weiner
;; Last-Mod: 18-Jun-26 at 09:15:55 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
Expand Down Expand Up @@ -314,7 +314,9 @@ Group 1 is the entire HyWikiWord#section:Lnum:Cnum expression.")
#'hywiki--clear-buttonize-characters-cache)

(defcustom hywiki-exclude-major-modes nil
"List of major modes to exclude from HyWikiWord highlighting and recognition."
"List of major modes to exclude from HyWikiWord highlighting and recognition.
Any `special' major mode, like Dired, is automatically excluded unless
included in the list, `hywiki-include-special-modes'."
:type '(list symbol)
:group 'hyperbole-hywiki)

Expand All @@ -323,6 +325,14 @@ Group 1 is the entire HyWikiWord#section:Lnum:Cnum expression.")
:type '(list symbol)
:group 'hyperbole-hywiki)

(defcustom hywiki-include-special-modes
'(elfeed-search-mode elfeed-show-mode eww-mode kotl-mode)
"List of `special' major modes to include in HyWikiWord highlighting and recognition.
By default, all special modes, like Dired, are excluded. A major mode
included here will override its inclusion in `hywiki-exclude-major-modes'."
:type '(list symbol)
:group 'hyperbole-hywiki)

(defcustom hywiki-mode-lighter " HyWiki"
"String to display in mode line when the HyWiki global minor mode is enabled.
Use nil for no HyWiki mode indicator."
Expand Down Expand Up @@ -1184,12 +1194,11 @@ Exclude the minibuffer if selected and return nil."
Always exclude minibuffers.
This does not mean `hywiki-mode' is presently active in that buffer;
use `hywiki-active-in-current-buffer-p' for that."

(and (not (minibufferp))
;; (not (and (boundp 'edebug-active) edebug-active))
(not (apply #'derived-mode-p hywiki-exclude-major-modes))
(or (derived-mode-p 'kotl-mode)
(not (eq (get major-mode 'mode-class) 'special)))))
(or (apply #'derived-mode-p hywiki-include-special-modes)
(and (not (eq (get major-mode 'mode-class) 'special))
(not (apply #'derived-mode-p hywiki-exclude-major-modes))))))

(defun hywiki-add-activity (wikiword)
"Make WIKIWORD resume a prompted for activity.
Expand Down