diff options
| author | Wilfred Hughes <me@wilfred.me.uk> | 2019-02-16 17:27:42 +0000 |
|---|---|---|
| committer | Wilfred Hughes <me@wilfred.me.uk> | 2019-02-16 17:30:05 +0000 |
| commit | 2d23a267b316adcd7754ab1fbb4154b9cb2bfbcb (patch) | |
| tree | 0f6dd26b0e5c8924676d538b58d1a625350c578a /helpful.el | |
| parent | b80701b193bddfffdacd2ab065749cc63d0e45d0 (diff) | |
Fix viewing the value of inhibit-read-only
Fixes #189
Diffstat (limited to 'helpful.el')
| -rw-r--r-- | helpful.el | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1846,7 +1846,12 @@ state of the current symbol." (cl-assert (not (null helpful--sym))) (unless (buffer-live-p helpful--associated-buffer) (setq helpful--associated-buffer nil)) - (-let* ((inhibit-read-only t) + (-let* ((val + ;; Look at the value before setting `inhibit-read-only', so + ;; users can see the correct value of that variable. + (unless helpful--callable-p + (helpful--sym-value helpful--sym helpful--associated-buffer))) + (inhibit-read-only t) (start-line (line-number-at-pos)) (start-column (current-column)) (primitive-p (helpful--primitive-p helpful--sym helpful--callable-p)) @@ -1885,7 +1890,6 @@ state of the current symbol." (when (not helpful--callable-p) (helpful--insert-section-break) (let* ((sym helpful--sym) - (val (helpful--sym-value sym helpful--associated-buffer)) (multiple-views-p (or (stringp val) (keymapp val) |
