[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/abbrev.el
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/abbrev.el |
Date: |
Sat, 23 Apr 2005 08:32:53 -0400 |
Index: emacs/lisp/abbrev.el
diff -c emacs/lisp/abbrev.el:1.39 emacs/lisp/abbrev.el:1.40
*** emacs/lisp/abbrev.el:1.39 Sun Apr 10 23:25:56 2005
--- emacs/lisp/abbrev.el Sat Apr 23 12:32:53 2005
***************
*** 92,102 ****
(interactive)
(push-mark
(save-excursion
! (let ((tables abbrev-table-name-list))
! (while tables
! (insert-abbrev-table-description (car tables) t)
! (setq tables (cdr tables))))
! (point))))
(defun list-abbrevs (&optional local)
"Display a list of defined abbrevs.
--- 92,102 ----
(interactive)
(push-mark
(save-excursion
! (let ((tables abbrev-table-name-list))
! (while tables
! (insert-abbrev-table-description (car tables) t)
! (setq tables (cdr tables))))
! (point))))
(defun list-abbrevs (&optional local)
"Display a list of defined abbrevs.
***************
*** 168,190 ****
(interactive "P")
(if arg (kill-all-abbrevs))
(save-excursion
! (goto-char (point-min))
! (while (and (not (eobp)) (re-search-forward "^(" nil t))
! (let* ((buf (current-buffer))
! (table (read buf))
! abbrevs name hook exp count sys)
! (forward-line 1)
! (while (progn (forward-line 1)
! (not (eolp)))
! (setq name (read buf) count (read buf))
! (if (equal count '(sys))
! (setq sys t count (read buf)))
! (setq exp (read buf))
! (skip-chars-backward " \t\n\f")
! (setq hook (if (not (eolp)) (read buf)))
! (skip-chars-backward " \t\n\f")
! (setq abbrevs (cons (list name exp hook count sys) abbrevs)))
! (define-abbrev-table table abbrevs)))))
(defun read-abbrev-file (&optional file quietly)
"Read abbrev definitions from file written with `write-abbrev-file'.
--- 168,190 ----
(interactive "P")
(if arg (kill-all-abbrevs))
(save-excursion
! (goto-char (point-min))
! (while (and (not (eobp)) (re-search-forward "^(" nil t))
! (let* ((buf (current-buffer))
! (table (read buf))
! abbrevs name hook exp count sys)
! (forward-line 1)
! (while (progn (forward-line 1)
! (not (eolp)))
! (setq name (read buf) count (read buf))
! (if (equal count '(sys))
! (setq sys t count (read buf)))
! (setq exp (read buf))
! (skip-chars-backward " \t\n\f")
! (setq hook (if (not (eolp)) (read buf)))
! (skip-chars-backward " \t\n\f")
! (setq abbrevs (cons (list name exp hook count sys) abbrevs)))
! (define-abbrev-table table abbrevs)))))
(defun read-abbrev-file (&optional file quietly)
"Read abbrev definitions from file written with `write-abbrev-file'.
***************
*** 201,207 ****
Optional argument FILE is the name of the file to read;
it defaults to the value of `abbrev-file-name'.
Does not display any message."
! ;(interactive "fRead abbrev file: ")
(read-abbrev-file file t))
(defun write-abbrev-file (&optional file)
--- 201,207 ----
Optional argument FILE is the name of the file to read;
it defaults to the value of `abbrev-file-name'.
Does not display any message."
! ;(interactive "fRead abbrev file: ")
(read-abbrev-file file t))
(defun write-abbrev-file (&optional file)
***************
*** 221,227 ****
(let ((coding-system-for-write 'emacs-mule))
(with-temp-file file
(insert ";;-*-coding: emacs-mule;-*-\n")
! (dolist (table abbrev-table-name-list)
(insert-abbrev-table-description table nil)))))
(defun add-mode-abbrev (arg)
--- 221,237 ----
(let ((coding-system-for-write 'emacs-mule))
(with-temp-file file
(insert ";;-*-coding: emacs-mule;-*-\n")
! (dolist (table
! ;; We sort the table in order to ease the automatic
! ;; merging of different versions of the user's abbrevs
! ;; file. This is useful, for example, for when the
! ;; user keeps their home directory in a revision
! ;; control system, and is therefore keeping multiple
! ;; slightly-differing copies loosely synchronized.
! (sort (copy-sequence abbrev-table-name-list)
! (lambda (s1 s2)
! (string< (symbol-name s1)
! (symbol-name s2)))))
(insert-abbrev-table-description table nil)))))
(defun add-mode-abbrev (arg)