emacs: Don't record undo information for search or show buffers.
authorAustin Clements <amdragon@MIT.EDU>
Mon, 21 Nov 2011 01:00:55 +0000 (20:00 -0500)
committerDavid Bremner <bremner@debian.org>
Thu, 24 Nov 2011 12:31:44 +0000 (08:31 -0400)
There's no reason to record undo information for read-only,
programmatically-constructed buffers.  The undo list just chews up
memory keeping track of our calls to insert.

emacs/notmuch-show.el
emacs/notmuch.el

index a7f326311a91bb840f5d7c2111503dc0e189fd5d..7be88f828b97ad927ab20d4763914dd03b8ed645 100644 (file)
@@ -843,6 +843,8 @@ buffer."
         (inhibit-read-only t))
     (switch-to-buffer buffer)
     (notmuch-show-mode)
+    ;; Don't track undo information for this buffer
+    (set 'buffer-undo-list t)
 
     (setq notmuch-show-thread-id thread-id)
     (setq notmuch-show-parent-buffer parent-buffer)
index c1827cc2691f66cb0f566668fede9116bfb62776..a8e4d6225963d25aaeba2c7b3484461264b71869 100644 (file)
@@ -920,6 +920,8 @@ The optional parameters are used as follows:
   (let ((buffer (get-buffer-create (notmuch-search-buffer-title query))))
     (switch-to-buffer buffer)
     (notmuch-search-mode)
+    ;; Don't track undo information for this buffer
+    (set 'buffer-undo-list t)
     (set 'notmuch-search-query-string query)
     (set 'notmuch-search-oldest-first oldest-first)
     (set 'notmuch-search-target-thread target-thread)