[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/hyperbole 96b7ce0f45 04/15: (kotl-mode:pre-self-insert-co
|
From: |
Stefan Monnier |
|
Subject: |
[elpa] scratch/hyperbole 96b7ce0f45 04/15: (kotl-mode:pre-self-insert-command): Use buffer-locally at top-level |
|
Date: |
Sun, 21 May 2023 18:50:53 -0400 (EDT) |
branch: scratch/hyperbole
commit 96b7ce0f455a9f66442103d22f586b01e468f107
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
(kotl-mode:pre-self-insert-command): Use buffer-locally at top-level
* kotl/kotl-mode.el (kotl-mode): Don't impose our `pre-command-hook` on
all buffers.
(kotl-mode:pre-self-insert-command): Remove now-redundant test that
we're in a Kotl buffer. Remove also `hyperb:stack-frame` test which
seems to have been added while debugging a problem around May 2021.
---
kotl/kotl-mode.el | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/kotl/kotl-mode.el b/kotl/kotl-mode.el
index bf4138284e..5f54f1cca8 100644
--- a/kotl/kotl-mode.el
+++ b/kotl/kotl-mode.el
@@ -109,7 +109,7 @@ It provides the following keys:
;;
;; Prevent insertion of characters outside of editable bounds,
;; e.g. after the mouse sets point to a non-editable position
- (add-hook 'pre-command-hook #'kotl-mode:pre-self-insert-command)
+ (add-hook 'pre-command-hook #'kotl-mode:pre-self-insert-command nil t)
;;
;; Ensure that outline structure data is saved when save-buffer is called
;; from save-some-buffers, {C-x s}.
@@ -3293,10 +3293,14 @@ newlines at end of tree."
Mouse may have moved point outside of an editable area.
`kotl-mode' adds this function to `pre-command-hook'."
(when (and (memq this-command '(self-insert-command
orgtbl-self-insert-command))
- (eq major-mode 'kotl-mode)
(not (kview:valid-position-p))
;; Prevent repeatedly moving point to valid position when moving
trees
- (not (hyperb:stack-frame '(kcell-view:to-label-end))))
+ ;; FIXME: This may have been useful in some older version of
+ ;; the code but now that it runs from a `pre-command-hook',
+ ;; `kcell-view:to-label-end' can never be in the call
+ ;; stack (except of course during debugging and such).
+ ;;(not (hyperb:stack-frame '(kcell-view:to-label-end)))
+ )
(when (not (kview:valid-position-p))
(kotl-mode:to-valid-position))))
- [elpa] branch scratch/hyperbole created (now 91a371631a), Stefan Monnier, 2023/05/21
- [elpa] scratch/hyperbole aaaf6cfeea 01/15: * hload-path.el (hyperb:dir): Use `macroexp-file-name`, Stefan Monnier, 2023/05/21
- [elpa] scratch/hyperbole ab2ca7fdf5 05/15: Get rid of `hyperb:stack-frame`, Stefan Monnier, 2023/05/21
- [elpa] scratch/hyperbole 91a371631a 15/15: * hyrolo.el: A few cosmetic tweaks, Stefan Monnier, 2023/05/21
- [elpa] scratch/hyperbole c4c9abe70f 03/15: Try and avoid using `hyperb:stack-frame`, Stefan Monnier, 2023/05/21
- [elpa] scratch/hyperbole 96b7ce0f45 04/15: (kotl-mode:pre-self-insert-command): Use buffer-locally at top-level,
Stefan Monnier <=
- [elpa] scratch/hyperbole 9a148b300e 02/15: * hversion.el (hyperb:path-being-loaded): Delete function, Stefan Monnier, 2023/05/21
- [elpa] scratch/hyperbole 7927b78a42 06/15: Fix compilation of test file, Stefan Monnier, 2023/05/21
- [elpa] scratch/hyperbole 30fbe524e5 07/15: (kview:char-visible-p): Delete function, Stefan Monnier, 2023/05/21
- [elpa] scratch/hyperbole d9a32c26f3 08/15: * hact.el: Fix broken lexical-binding cookie, Stefan Monnier, 2023/05/21
- [elpa] scratch/hyperbole 8763db49e1 10/15: hyperbole-autoloads.el: Remove needless definitions, Stefan Monnier, 2023/05/21
- [elpa] scratch/hyperbole 1ee361c05d 11/15: * hycontrol.el (hycontrol-windows-mode-map): Don't autoload, Stefan Monnier, 2023/05/21
- [elpa] scratch/hyperbole 04f3fdc53d 14/15: Fix a few minor miscompilations and warnings, Stefan Monnier, 2023/05/21
- [elpa] scratch/hyperbole 0670cc54b0 09/15: * hyperbole.el: Preload `kotl-autoloads`, Stefan Monnier, 2023/05/21
- [elpa] scratch/hyperbole 967814d82e 13/15: (man-show): Fix miscompilation, Stefan Monnier, 2023/05/21
- [elpa] scratch/hyperbole 3252a81433 12/15: * hui-select.el: Fix a few warnings and improve some docstrings, Stefan Monnier, 2023/05/21