aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilfred Hughes <me@wilfred.me.uk>2019-05-16 20:54:56 +0100
committerWilfred Hughes <me@wilfred.me.uk>2019-05-16 20:54:56 +0100
commitf61d0a060ad54bdf0c305afe1e362518f64463dd (patch)
tree2e8870bacd95b62ba70b118149d1ad0c189c20e8
parent53ae44bd2384de5e2513496ccf6ca2fce6767299 (diff)
Disable major mode change hooks when finding definitions
Fixes #208
-rw-r--r--CHANGELOG.md3
-rw-r--r--helpful.el3
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b982385..cf35f3c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,9 @@ Fixed a crash on keyboard macros in keymaps.
String values are now shown as literals by default.
+Fixed an issue with modes that override after-change-major-mode-hook,
+such as `global-hi-lock-mode`.
+
# v0.16
Improved wording when looking at aliases.
diff --git a/helpful.el b/helpful.el
index fc845f0..cd4784a 100644
--- a/helpful.el
+++ b/helpful.el
@@ -1317,8 +1317,9 @@ buffer."
(buf nil)
(pos nil)
(opened nil)
- ;; Skip running find-file-hook since it may prompt the user.
+ ;; Skip running hooks that may prompt the user.
(find-file-hook nil)
+ (after-change-major-mode-hook nil)
;; If we end up opening a buffer, don't bother with file
;; variables. It prompts the user, and we discard the buffer
;; afterwards anyway.