;; Please send me a word to give me your feeling about this feature or
;; to explain me how you use it (your expansions table for example) using
;; the function expand-submit-report.
+;;; Code:
\f
;;; Constants:
-(defvar expand-load-hook nil
- "Hooks run when `expand.el' is loaded.")
+(defgroup expand nil
+ "Make abbreviations more usable."
+ :group 'abbrev)
+
+(defcustom expand-load-hook nil
+ "Hooks run when `expand.el' is loaded."
+ :type 'hook
+ :group 'expand)
-(defvar expand-expand-hook nil
- "Hooks run when an abbrev made by `expand-add-abbrevs' is expanded.")
+(defcustom expand-expand-hook nil
+ "Hooks run when an abbrev made by `expand-add-abbrevs' is expanded."
+ :type 'hook
+ :group 'expand)
-(defvar expand-jump-hook nil
- "Hooks run by `expand-jump-to-previous-slot' and `expand-jump-to-next-slot'.")
+(defcustom expand-jump-hook nil
+ "Hooks run by `expand-jump-to-previous-slot' and `expand-jump-to-next-slot'."
+ :type 'hook
+ :group 'expand)
;;; Samples:
(put 'expand-abbrev-hook 'no-self-insert t)
(defun expand-abbrev-hook ()
"Abbrev hook used to do the expansion job of expand abbrevs.
-See `expand-add-abbrevs'."
+See `expand-add-abbrevs'. Value is non-nil if expansion was done."
;; Expand only at the end of a line if we are near a word that has
;; an abbrev built from expand-add-abbrev.
(if (and (eolp)
expand-pos (expand-list-to-markers expand-list)
expand-list nil)))
(run-hooks 'expand-expand-hook)
- t))))
- )
+ t)
+ nil))
+ nil))
(defun expand-do-expansion ()
(delete-backward-char (length last-abbrev-text))