|
From: | Juri Linkov |
Subject: | Re: master 6458e16: New mode outline-cycle-minor-mode with Orgmode-like TAB cycling on headings |
Date: | Thu, 04 Mar 2021 20:17:28 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
>>> One example (mostly for demonstration purposes) currently is >>> in etc/compilation.txt. whose Local Variables contains just: >>> >>> ;;; eval: (outline-cycle-highlight-minor-mode) >>> >>> Initially I implemented this only with variables and without modes >>> like you suggested: >>> >>> ;;; outline-minor-mode-cycle: t >>> ;;; outline-minor-mode-highlight: t >>> ;;; eval: (outline-minor-mode 1) >>> >>> But then thought that maybe with a mode would be more concise and >>> convenient. > > Can't you add setting the variables to the minor-mode hooks? It's easier to set them using minor-mode like (add-hook 'emacs-lisp-mode-hook 'outline-cycle-highlight-minor-mode) than using lambda (add-hook 'emacs-lisp-mode-hook (lambda () (setq-local outline-minor-mode-cycle t) (setq-local outline-minor-mode-highlight t) (outline-minor-mode 1))) > I haven't tried your code, but there are occasions in which > outline-minor-mode is used to section the buffer on syntactic elements > that are already fontified (on function declarations, for example). What > does happen then when outline-minor-mode-highlight is t? I think these > would be cases in which outline-minor-mode-highlight nil would be better. outline-minor-mode-highlight already works surprisingly well, and doesn't override faces added by major mode.
[Prev in Thread] | Current Thread | [Next in Thread] |