all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* saved user abbrevs and system abbrevs
@ 2006-11-29 21:05 Glenn Morris
  2006-11-30 19:48 ` Richard Stallman
  2006-12-01 20:50 ` Stuart D. Herring
  0 siblings, 2 replies; 6+ messages in thread
From: Glenn Morris @ 2006-11-29 21:05 UTC (permalink / raw)



Emacs 22 will introduce the concept of "user" and "system" abbrevs.
Only user abbrevs get saved into the abbrev-file. Reading the abbrev
file (happens at startup now) defines any saved abbrev-tables, and
populates them with the saved user abbrevs.

Most (all?) modes that define (system) abbrevs do it this way:

(defvar foo-abbrev-table
  (define-abbrev-table 'foo-abbrev-table nil)
  (define-abbrev foo-abbrev-table "foo" "foobar" nil 0 t)
  ...)

If foo-abbrev-table is already defined when the mode is loaded, the
system abbrevs don't get added.

The net result of this is that if a user saves an abbrev, when they
restart Emacs and load the appropriate mode, the system abbrevs do not
get defined.


Does anyone see a better fix than changing each mode that defines
abbrevs to use something like this:

(defvar foo-abbrev-table nil)

;; Do not override any user abbrev for "foo".
(unless (abbrev-expansion "foo" foo-abbrev-table)
  (define-abbrev foo-abbrev-table "foo" "foobar" nil 0 t))

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-12-02  0:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-29 21:05 saved user abbrevs and system abbrevs Glenn Morris
2006-11-30 19:48 ` Richard Stallman
2006-12-01  2:54   ` Glenn Morris
2006-12-01 22:02     ` Richard Stallman
2006-12-01 20:50 ` Stuart D. Herring
2006-12-02  0:04   ` Glenn Morris

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.