Mercurial > emacs
changeset 76712:b73b11ebc50c
Change example to always enable abbrev-mode, and remove redundant `function'.
(expand-abbrev-hook): Add autoload cookie.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 24 Mar 2007 16:39:43 +0000 |
parents | ba2df4dce7bc |
children | 5e63c4b27767 |
files | lisp/expand.el |
diffstat | 1 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/expand.el Sat Mar 24 16:24:54 2007 +0000 +++ b/lisp/expand.el Sat Mar 24 16:39:43 2007 +0000 @@ -51,17 +51,17 @@ ;; ;; 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)))) +;; (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 -;; (function -;; (lambda () -;; (add-hook 'expand-expand-hook 'indent-according-to-mode) -;; (add-hook 'expand-jump-hook 'indent-according-to-mode)))) +;; (lambda () +;; (add-hook 'expand-expand-hook 'indent-according-to-mode) +;; (add-hook 'expand-jump-hook 'indent-according-to-mode))) ;; ;; Remarks: ;; @@ -336,6 +336,7 @@ '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."