changeset 112224:4af12aa726d1

Abbrev.el fix for bug #7733. (tiny change) * lisp/abbrev.el (prepare-abbrev-list-buffer): If listing local abbrev table, get the value before switching to the output buffer.
author Glenn Morris <rgm@gnu.org>
date Sun, 02 Jan 2011 22:13:35 -0800
parents 02196c405b19
children 8abb8860e89c
files lisp/ChangeLog lisp/abbrev.el
diffstat 2 files changed, 17 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun Jan 02 22:49:13 2011 -0500
+++ b/lisp/ChangeLog	Sun Jan 02 22:13:35 2011 -0800
@@ -1,3 +1,8 @@
+2011-01-03  Brent Goodrick  <bgoodr@gmail.com>
+
+	* abbrev.el (prepare-abbrev-list-buffer): If listing local abbrev
+	table, get the value before switching to the output buffer.  (Bug#7733)
+
 2011-01-03  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* progmodes/python.el (python-mode): Don't impose font-lock (bug#3628).
--- a/lisp/abbrev.el	Sun Jan 02 22:49:13 2011 -0500
+++ b/lisp/abbrev.el	Sun Jan 02 22:13:35 2011 -0800
@@ -125,17 +125,18 @@
     found))
 
 (defun prepare-abbrev-list-buffer (&optional local)
-  (with-current-buffer (get-buffer-create "*Abbrevs*")
-    (erase-buffer)
-    (if local
-        (insert-abbrev-table-description
-         (abbrev-table-name local-abbrev-table) t)
-      (dolist (table abbrev-table-name-list)
-        (insert-abbrev-table-description table t)))
-    (goto-char (point-min))
-    (set-buffer-modified-p nil)
-    (edit-abbrevs-mode)
-    (current-buffer)))
+  (let ((local-table local-abbrev-table))
+    (with-current-buffer (get-buffer-create "*Abbrevs*")
+      (erase-buffer)
+      (if local
+          (insert-abbrev-table-description
+           (abbrev-table-name local-table) t)
+        (dolist (table abbrev-table-name-list)
+          (insert-abbrev-table-description table t)))
+      (goto-char (point-min))
+      (set-buffer-modified-p nil)
+      (edit-abbrevs-mode)
+      (current-buffer))))
 
 (defun edit-abbrevs-mode ()
   "Major mode for editing the list of abbrev definitions.