[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/abbrev.el,v
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/abbrev.el,v |
Date: |
Sun, 18 Nov 2007 19:32:55 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 07/11/18 19:32:55
Index: abbrev.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/abbrev.el,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -b -r1.63 -r1.64
--- abbrev.el 16 Nov 2007 18:27:06 -0000 1.63
+++ abbrev.el 18 Nov 2007 19:32:53 -0000 1.64
@@ -83,10 +83,8 @@
(defun kill-all-abbrevs ()
"Undefine all defined abbrevs."
(interactive)
- (let ((tables abbrev-table-name-list))
- (while tables
- (clear-abbrev-table (symbol-value (car tables)))
- (setq tables (cdr tables)))))
+ (dolist (tablesym abbrev-table-name-list)
+ (clear-abbrev-table (symbol-value tablesym))))
(defun copy-abbrev-table (table)
"Make a new abbrev-table with the same abbrevs as TABLE."
@@ -106,10 +104,8 @@
(interactive)
(push-mark
(save-excursion
- (let ((tables abbrev-table-name-list))
- (while tables
- (insert-abbrev-table-description (car tables) t)
- (setq tables (cdr tables))))
+ (dolist (tablesym abbrev-table-name-list)
+ (insert-abbrev-table-description tablesym t))
(point))))
(defun list-abbrevs (&optional local)
@@ -131,18 +127,17 @@
found))
(defun prepare-abbrev-list-buffer (&optional local)
- (save-excursion
- (let ((table local-abbrev-table))
- (set-buffer (get-buffer-create "*Abbrevs*"))
+ (with-current-buffer (get-buffer-create "*Abbrevs*")
(erase-buffer)
(if local
- (insert-abbrev-table-description (abbrev-table-name table) t)
+ (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))))
+ (current-buffer)))
(defun edit-abbrevs-mode ()
"Major mode for editing the list of abbrev definitions.
@@ -524,8 +519,14 @@
(defun clear-abbrev-table (table)
"Undefine all abbrevs in abbrev table TABLE, leaving it empty."
(setq abbrevs-changed t)
+ (let* ((sym (intern-soft "" table)))
(dotimes (i (length table))
- (aset table i 0)))
+ (aset table i 0))
+ ;; Preserve the table's properties.
+ (assert sym)
+ (intern sym table)
+ (abbrev-table-put table :abbrev-table-modiff
+ (1+ (abbrev-table-get table :abbrev-table-modiff)))))
(defun define-abbrev (table name expansion &optional hook &rest props)
"Define an abbrev in TABLE named NAME, to expand to EXPANSION and call HOOK.
- [Emacs-diffs] Changes to emacs/lisp/abbrev.el,v, Stefan Monnier, 2007/11/03
- [Emacs-diffs] Changes to emacs/lisp/abbrev.el,v, Juanma Barranquero, 2007/11/04
- [Emacs-diffs] Changes to emacs/lisp/abbrev.el,v, Stefan Monnier, 2007/11/04
- [Emacs-diffs] Changes to emacs/lisp/abbrev.el,v, Stefan Monnier, 2007/11/09
- [Emacs-diffs] Changes to emacs/lisp/abbrev.el,v, Stefan Monnier, 2007/11/16
- [Emacs-diffs] Changes to emacs/lisp/abbrev.el,v,
Stefan Monnier <=