Re: self-insert-command advice is not called when command is run
self-insert-command is handled specially by the command loop. Is it actually useful nowadays? Couldn't we get rid of this optimization? I am not sure. Yes, computers are faster. But this is the most common command in Emacs--most of the keystrokes are this command. Yes, but AFAIK it only needs to go as fast as the user, so if a naive implementation is fast enough there is 0 benefit to any optimization (unless you consider the issue of throughput on multiuser systems, but I suspect that it's not really relevant these days). Stefan ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
Re: self-insert-command advice is not called when command is run
Oops! This bug was my mistake. Ignore it please; I had mistakenly deleted the remapping from self-insert-command to balanced-self-insert-command, which was put in explicitly to handle this case. -- MJF ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
Re: self-insert-command advice is not called when command is run
self-insert-command is handled specially by the command loop. Is it actually useful nowadays? Couldn't we get rid of this optimization? I am not sure. Yes, computers are faster. But this is the most common command in Emacs--most of the keystrokes are this command. However, it would be ok to verify that the command has not been redefined from its normal value, before executing it directly. That way the optimization would still apply in normal circumstances. ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
Re: self-insert-command advice is not called when command is run
self-insert-command is handled specially by the command loop. ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
Re: self-insert-command advice is not called when command is run
Richard Stallman wrote: self-insert-command is handled specially by the command loop. This is a recent change; builds from March 1st did not exhibit this behavior. In addition, remapping self-insert-command to (lambda () (interactive) (call-interactively 'self-insert-command)) fixes the problem. I think it's a bug if the command loop's interactive call of self-insert-command does not act the same as an explicit call of (call-interactively 'self-insert-command). -- MJF ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
Re: self-insert-command advice is not called when command is run
Remember that defadvice is not at all guaranteed to work. It is a good debugging tool, and a way for users to add hacks with minimal work in many cases, but it isn't intended as an interface for packages to use. -Miles -- Do not taunt Happy Fun Ball. ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
Re: self-insert-command advice is not called when command is run
self-insert-command is handled specially by the command loop. Is it actually useful nowadays? Couldn't we get rid of this optimization? Stefan ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
self-insert-command advice is not called when command is run
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.6090 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 ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug