aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2007-03-24 16:39:43 +0000
committerEli Zaretskii2007-03-24 16:39:43 +0000
commitbab818545b8baf63aa4cb432e13c682e4a7cc829 (patch)
tree65764019bc5ba04b2d8358ff428f21b5b3436140
parent9de5eb68fb459d091fb66f58a1ecfa3c37d13388 (diff)
downloademacs-bab818545b8baf63aa4cb432e13c682e4a7cc829.tar.gz
emacs-bab818545b8baf63aa4cb432e13c682e4a7cc829.zip
Change example to always enable abbrev-mode, and remove redundant `function'.
(expand-abbrev-hook): Add autoload cookie.
-rw-r--r--lisp/expand.el15
1 files changed, 8 insertions, 7 deletions
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 @@
51;; 51;;
52;; and enter Abbrev mode with the following hook : 52;; and enter Abbrev mode with the following hook :
53;; 53;;
54;; (add-hook 'c-mode-hook (function (lambda () 54;; (add-hook 'c-mode-hook
55;; (expand-add-abbrevs c-mode-abbrev-table c-expand-list) 55;; (lambda ()
56;; (abbrev-mode)))) 56;; (expand-add-abbrevs c-mode-abbrev-table c-expand-list)
57;; (abbrev-mode 1)))
57;; 58;;
58;; you can also init some post-process hooks : 59;; you can also init some post-process hooks :
59;; 60;;
60;; (add-hook 'expand-load-hook 61;; (add-hook 'expand-load-hook
61;; (function 62;; (lambda ()
62;; (lambda () 63;; (add-hook 'expand-expand-hook 'indent-according-to-mode)
63;; (add-hook 'expand-expand-hook 'indent-according-to-mode) 64;; (add-hook 'expand-jump-hook 'indent-according-to-mode)))
64;; (add-hook 'expand-jump-hook 'indent-according-to-mode))))
65;; 65;;
66;; Remarks: 66;; Remarks:
67;; 67;;
@@ -336,6 +336,7 @@ This variable is local to a buffer.")
336 'expand-abbrev-hook))) 336 'expand-abbrev-hook)))
337 337
338(put 'expand-abbrev-hook 'no-self-insert t) 338(put 'expand-abbrev-hook 'no-self-insert t)
339;;;###autoload
339(defun expand-abbrev-hook () 340(defun expand-abbrev-hook ()
340 "Abbrev hook used to do the expansion job of expand abbrevs. 341 "Abbrev hook used to do the expansion job of expand abbrevs.
341See `expand-add-abbrevs'. Value is non-nil if expansion was done." 342See `expand-add-abbrevs'. Value is non-nil if expansion was done."