[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fri, 13 Mar 2009 21:24:37 +0100
Gnus/5.110009 (No Gnus v0.9) Emacs/23.0.90 (gnu/linux)
Leo <address@hidden> writes:
> On 2009-03-04 15:22 +0000, Leo wrote:
>> But according to the manual, it seems this is only possible by defining
>> the abbreviation with a 'no-self-insert hook. This is not an option to
>> me as I want my function to be general for all abbreviations.
>> Any idea how to get this done?
> Any elisp gurus that can offer some help to question? Thank you.
;;; For Emacs 23
(fset 'my-no-self-insert 'my-no-self-insert-hook)
(put 'my-no-self-insert-hook 'no-self-insert t)
(defun my-abbrev-expand-function (expander)
;; The normal expansion.
;; Return a symbol whose symbol-function has a non-nil
;; `no-self-insert' property.
(add-hook 'abbrev-expand-functions 'my-abbrev-expand-function)
Note that no-self-insert interacts strangely with RET.