]> git.eshelyaron.com Git - emacs.git/commitdiff
Abbrev.el fix for bug #7733. (tiny change)
authorBrent Goodrick <bgoodr@gmail.com>
Mon, 3 Jan 2011 06:13:35 +0000 (22:13 -0800)
committerGlenn Morris <rgm@gnu.org>
Mon, 3 Jan 2011 06:13:35 +0000 (22:13 -0800)
* lisp/abbrev.el (prepare-abbrev-list-buffer): If listing local abbrev
table, get the value before switching to the output buffer.

lisp/ChangeLog
lisp/abbrev.el

index 1f522ff4b069871da8cb09b4d18ad996676fd0e7..751049488ea01e16c8c364cd0c00761f9ae85d64 100644 (file)
@@ -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).
index 779787e0d7d4773ac93f2687adf3a763a3ebc650..4ce4d82c7c2ea9271e3d128d83bc4619c2baef76 100644 (file)
@@ -125,17 +125,18 @@ Otherwise display all abbrevs."
     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.