diff options
Diffstat (limited to 'lisp/help-mode.el')
| -rw-r--r-- | lisp/help-mode.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/help-mode.el b/lisp/help-mode.el index f15ae633edc..47fa3590177 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el | |||
| @@ -501,9 +501,13 @@ buffer after following a reference. INTERACTIVE-P is non-nil if the | |||
| 501 | calling command was invoked interactively. In this case the stack of | 501 | calling command was invoked interactively. In this case the stack of |
| 502 | items for help buffer \"back\" buttons is cleared. | 502 | items for help buffer \"back\" buttons is cleared. |
| 503 | 503 | ||
| 504 | This should be called very early, before the output buffer is cleared, | 504 | This function also re-enables the major mode of the buffer, thus |
| 505 | because we want to record the \"previous\" position of point so we can | 505 | resetting local variables to the values set by the mode and running the |
| 506 | restore it properly when going back." | 506 | mode hooks. |
| 507 | |||
| 508 | So this should be called very early, before the output buffer is | ||
| 509 | cleared, also because we want to record the \"previous\" position of | ||
| 510 | point so we can restore it properly when going back." | ||
| 507 | (with-current-buffer (help-buffer) | 511 | (with-current-buffer (help-buffer) |
| 508 | ;; Re-enable major mode, killing all unrelated local vars. | 512 | ;; Re-enable major mode, killing all unrelated local vars. |
| 509 | (funcall major-mode) | 513 | (funcall major-mode) |