From: Eric Hanchrow <offby1@blarg.net>
Subject: [patch] abbrev.el (write-abbrev-file): Write table entries in alphabetical order by table name.
Date: Thu, 14 Apr 2005 11:50:09 -0700 [thread overview]
Message-ID: <8764yp19cu.fsf@offby1.atm01.sea.blarg.net> (raw)
The motivation for this should be clear from the comment.
* abbrev.el (write-abbrev-file): Write table entries in
alphabetical order by table name.
--- abbrev.el 11 Apr 2005 11:13:44 -0700 1.39
+++ abbrev.el 14 Apr 2005 11:40:56 -0700
@@ -221,7 +221,20 @@
(let ((coding-system-for-write 'emacs-mule))
(with-temp-file file
(insert ";;-*-coding: emacs-mule;-*-\n")
- (dolist (table abbrev-table-name-list)
+ (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-list abbrev-table-name-list)
+ (lambda (s1 s2)
+ (string< (symbol-name s1)
+ (symbol-name s2))))
+
+ )
(insert-abbrev-table-description table nil)))))
\f
(defun add-mode-abbrev (arg)
--
If you're trying to choose between two theories and one gives
you an excuse for being lazy, the other one is probably right.
-- Paul Graham
reply other threads:[~2005-04-14 18:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8764yp19cu.fsf@offby1.atm01.sea.blarg.net \
--to=offby1@blarg.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).