mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-24 20:08:10 +01:00
Revert "emacs: notmuch-search: avoid wiping out buffer-local variables"
This reverts commit f9fbd1ee3b
.
Emacs provides a mechanism for avoiding wiping out buffer-local
variables: marking them as "permanent local", which essentially
means "don't wip out the local value when enabling major-mode".
(put 'the-variable 'permanent-local t)
See (info "(elisp)Creating Buffer-Local").
Whether refreshing the buffer contents should involve re-enable the
mode is a different question, which should not be decided based on
the fact that we want keep the value of some random variable, not
least because some other (e.g. cache) variables are likely expected
to be wiped.
This commit is contained in:
parent
1331888374
commit
0251cab3ab
1 changed files with 1 additions and 5 deletions
|
@ -994,11 +994,7 @@ the configured default sort order."
|
||||||
(if no-display
|
(if no-display
|
||||||
(set-buffer buffer)
|
(set-buffer buffer)
|
||||||
(pop-to-buffer-same-window buffer))
|
(pop-to-buffer-same-window buffer))
|
||||||
;; avoid wiping out third party buffer-local variables in the case
|
(notmuch-search-mode)
|
||||||
;; where we're just refreshing or changing the sort order of an
|
|
||||||
;; existing search results buffer
|
|
||||||
(unless (eq major-mode 'notmuch-search-mode)
|
|
||||||
(notmuch-search-mode))
|
|
||||||
;; Don't track undo information for this buffer
|
;; Don't track undo information for this buffer
|
||||||
(set 'buffer-undo-list t)
|
(set 'buffer-undo-list t)
|
||||||
(set 'notmuch-search-query-string query)
|
(set 'notmuch-search-query-string query)
|
||||||
|
|
Loading…
Reference in a new issue