From: Eli Zaretskii Date: Sat, 24 Mar 2007 16:39:43 +0000 (+0000) Subject: Change example to always enable abbrev-mode, and remove redundant `function'. X-Git-Tag: emacs-pretest-22.0.97~199 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bab818545b8baf63aa4cb432e13c682e4a7cc829;p=emacs.git Change example to always enable abbrev-mode, and remove redundant `function'. (expand-abbrev-hook): Add autoload cookie. --- diff --git a/lisp/expand.el b/lisp/expand.el index ebcf90ccfc2..c34c18b4483 100644 --- a/lisp/expand.el +++ b/lisp/expand.el @@ -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 @@ This variable is local to a buffer.") '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."