The example code in expand.el can inadvertently disable abbrev-mode if it was already enabled. This patch also makes expand-abbrev-hook autoloaded, which is useful if you save the new abbrevs and want to avoid marking them as modified by defining them again in future invocations of the hook.
All the best, 2007-03-20 Markus Triska <[EMAIL PROTECTED]> * expand.el: change example to always enable abbrev-mode, make expand-abbrev-hook autoloaded, remove redundant `function' *** expand.el 21 Jan 2007 04:53:11 +0100 1.17 --- expand.el 20 Mar 2007 05:17:25 +0100 *************** *** 51,67 **** ;; ;; and enter Abbrev mode with the following hook : ;; ! ;; (add-hook 'c-mode-hook (function (lambda () ! ;; (expand-add-abbrevs c-mode-abbrev-table c-expand-list) ! ;; (abbrev-mode)))) ;; ;; you can also init some post-process hooks : ;; ;; (add-hook 'expand-load-hook ! ;; (function ! ;; (lambda () ! ;; (add-hook 'expand-expand-hook 'indent-according-to-mode) ! ;; (add-hook 'expand-jump-hook 'indent-according-to-mode)))) ;; ;; Remarks: ;; --- 51,67 ---- ;; ;; and enter Abbrev mode with the following hook : ;; ! ;; (add-hook 'c-mode-hook ! ;; (lambda () ! ;; (expand-add-abbrevs c-mode-abbrev-table c-expand-list) ! ;; (abbrev-mode 1))) ;; ;; you can also init some post-process hooks : ;; ;; (add-hook 'expand-load-hook ! ;; (lambda () ! ;; (add-hook 'expand-expand-hook 'indent-according-to-mode) ! ;; (add-hook 'expand-jump-hook 'indent-according-to-mode))) ;; ;; Remarks: ;; *************** *** 336,341 **** --- 336,342 ---- 'expand-abbrev-hook))) (put 'expand-abbrev-hook 'no-self-insert t) + ;;;###autoload (defun expand-abbrev-hook () "Abbrev hook used to do the expansion job of expand abbrevs. See `expand-add-abbrevs'. Value is non-nil if expansion was done." _______________________________________________ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug