[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
self-insert-command advice is not called when command is run
From: |
M Jared Finder |
Subject: |
self-insert-command advice is not called when command is run |
Date: |
Sat, 18 Mar 2006 17:58:09 -0800 |
If self-insert-command has any advice, that advice is not run when
self-insert-command is called by pressing a key. I need this feature for
balanced-mode, which advices self-insert-command to always insert balanced
sexps. (You can see balanced-mode at <http://hpalace.com/tmp/balanced+.el>.
Sample code to reproduce this:
(defadvice self-insert-command (around bug-report)
(message "Advice called!")
ad-do-it)
(ad-activate 'self-insert-command)
;; then hit any normal key.
-- MJF
In GNU Emacs 22.0.50.1 (i486-pc-linux-gnu, GTK+ Version 2.8.13)
of 2006-03-15 on pacem, modified by Debian
X server distributor `The X.Org Foundation', version 11.0.60900000
configured using `configure '--build' 'i486-linux-gnu' '--host'
'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib'
'--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info'
'--mandir=/usr/share/man' '--with-pop=yes'
'--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/22.0.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/22.0.50/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/22.0.50/leim'
'--with-x=yes' '--with-x-toolkit=gtk' 'CFLAGS=-DDEBIAN -g -O2
-Wno-pointer-sign' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: nil
locale-coding-system: nil
default-enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
auto-compression-mode: t
tool-bar-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
line-number-mode: t
Recent input:
<menu> r e p o r t SPC e m <tab> <return>
Recent messages:
(emacs-snapshot -Q)
For information about the GNU Project and its goals, type C-h C-p.
Loading emacsbug...
Loading regexp-opt...done
Loading emacsbug...done
- self-insert-command advice is not called when command is run,
M Jared Finder <=