Skip to content

Commit

Permalink
Enable HyRolo's extended reveal-mode used in *HyRolo* buffer
Browse files Browse the repository at this point in the history
hypb:add-to-invisibility-spec: Add and use wherever
'add-to-invisbility-spec' was.

hyrolo.el (hyrolo-file-suffix-regexp): Allow for suffix .outl
to invoke outline mode in addition to .otl.
  • Loading branch information
rswgnu committed Jan 23, 2024
1 parent 3d80bcb commit 68564a0
Show file tree
Hide file tree
Showing 5 changed files with 224 additions and 78 deletions.
13 changes: 13 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
2024-01-23 Bob Weiner <[email protected]>

* hyrolo.el (hyrolo-reveal-ignore-this-command, hyrolo-reveal-open-new-overlays,
hyrolo-reveal-close-old-overlays, reveal-post-command):
Enable Hyperbole extended version of 'reveal-mode' that supports 'org-fold'.

2024-01-21 Bob Weiner <[email protected]>

* hypb.el (hypb:add-to-invisibility-spec): Add and use wherever
'add-to-invisbility-spec' was.

* hload-path.el (auto-mode-alist):
hyrolo.el (hyrolo-file-suffix-regexp): Allow for suffix .outl to invoke outline
mode in addition to .otl.

* hmouse-tag.el (smart-emacs-lisp-mode-p ,smart-lisp-mode-p): Change to use
'derived-mode-p' rather than checking for 'major-mode' matches directly.
(smart-emacs-lisp-mode-p): Add optional 'skip-identifier-flag'.
Expand Down
4 changes: 2 additions & 2 deletions hload-path.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 29-Jun-16 at 14:39:33
;; Last-Mod: 24-Dec-23 at 00:41:54 by Bob Weiner
;; Last-Mod: 21-Jan-24 at 23:38:30 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
Expand Down Expand Up @@ -69,7 +69,7 @@ directory separator character.")
;;; Emacs Outline settings for .otl files
;;; ************************************************************************

(add-to-list 'auto-mode-alist '("\\.otl\\'" . outline-mode))
(add-to-list 'auto-mode-alist '("\\.ou?tl\\'" . outline-mode))

;;; ************************************************************************
;;; Hyperbole test importation settings
Expand Down
19 changes: 18 additions & 1 deletion hypb.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 6-Oct-91 at 03:42:38
;; Last-Mod: 20-Jan-24 at 20:22:08 by Mats Lidell
;; Last-Mod: 21-Jan-24 at 23:24:46 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
Expand Down Expand Up @@ -120,6 +120,23 @@ It must end with a space."
;;; Public functions
;;; ************************************************************************

;; Adapted from "subr.el" but doesn't add if ELEMENT already exists
(defun hypb:add-to-invisibility-spec (element)
"Add ELEMENT to `buffer-invisibility-spec'.
See documentation for `buffer-invisibility-spec' for the kind of elements
that can be added.
If `buffer-invisibility-spec' isn't a list before calling this
function, `buffer-invisibility-spec' will afterwards be a list
with the value `(t ELEMENT)'. This means that if text exists
that invisibility values that aren't either `t' or ELEMENT, that
text will become visible."
(if (eq buffer-invisibility-spec t)
(setq buffer-invisibility-spec (list t)))
(unless (member element buffer-invisibility-spec)
(setq buffer-invisibility-spec
(cons element buffer-invisibility-spec))))

;;;###autoload
(defun hypb:activate-interaction-log-mode ()
"Configure and enable the interaction-log package for use with Hyperbole.
Expand Down
Loading

0 comments on commit 68564a0

Please sign in to comment.