bug#4356: 23.1.50; expand-abbrev changes point erroneously
Vincent Belaïche <[email protected]>
| Newsgroups | gmane.emacs.bugs,gmane.emacs.pretest.bugs |
|---|---|
| Message-ID | <[email protected]> |
Here is the bug description. I found this editing some Visual Basic file with using http://www.emacswiki.org/emacs/visual-basic-mode.el If for instance I type <RET> after (--!-- showing point when I type <RET>): MyVar = MyFun(1,True)--!-- Then in visual basic mode visual-basic-newline-and-indent is called, which in turn calls (expand-abbrev). After (expand-abbrev) is called, point will be moved as follows: MyVar = MyFun(1,True--!--) because `True' is one abbreviation. I have patched visual-basic mode, so that a save-excursion encloses the call of expand-abbrev, otherwise I would get: MyVar = MyFun(1,True --!--) which is not wanted. Stefan Monnier ([email protected]) confirmed this is a bug of expand-abbrev, and asked me to repport it. The wanted behaviour would be that after expanding `True', point would come back to after the `)' where it originally was. BR, Vincent. ----------------------------------------------------------------------- If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. If you would like to further debug the crash, please read the file d:/Programme/GNU/Emacs/etc/DEBUG for instructions. In GNU Emacs 23.1.50.1 (i386-mingw-nt5.0.2195) of 2009-07-25 on COCOTTE Windowing system distributor `Microsoft Corp.', version 5.0.2195 configured using `configure --with-gcc (3.4)' 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: FRA value of $XMODIFIERS: nil locale-coding-system: cp1252 default-enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: recentf-mode: t mail-abbrevs-mode: t iswitchb-mode: t tooltip-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 global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: <left> <return> C-x 1 <down> <down> C-SPC <end> <left> <C-insert> C-x b * s c <tab> ( r e q u i r e SPC ' c a l c - e x t ) <return> ( l a t SPC ( <backspace> <backspace> <backspace> <backspace> e t SPC ( c a l c - c o m m a n d ) <C-left> <C-left> C-h f C-g C-h v c a l c - c <tab> o <tab> <backspace> <backspace> <backspace> <tab> <backspace> <backspace> <backspace> <backspace> <backspace> C-g <end> <return> <tab> ( c a l c - r a d i x SPC 1 <backspace> 7 ) <return> <tab> ( c a l c - e v a l SPC 1 0 à ) <backspace> <backspace> ) <left> <left> <left> " " SPC <left> <left> $ <end> ) M-x e v a l - b u f <tab> <return> C-x C-e <C-left> <C-left> <C-left> C-h f <return> C-h i m d <backspace> c a l <tab> <return> C-x 1 <C-end> <up> <up> <up> <up> <up> <up> <right> <right> <right> <down> <return> C-s c a l c <kp-subtract> e v <C-end> <up> <C-home> m e v a l <return> C-x b <return> <end> <C-left> <C-left> <C-right> <right> <right> <delete> <kp-1> <kp-0> <right> <delete> <delete> <delete> <end> C-x C-e <up> <up> <up> <down> <up> <return> C-y <up> <home> C-k C-k <down> <up> <tab> <down> C-k C-k C-k C-k <tab> <end> <backspace> <home> ( m e s s a g z e SPC <backspace> <backspace> <backspace> e SPC " 1 0 SPC e n SPC b a s e SPC 7 = % s " SPC <end> ) M-x <up> <return> <up> <up> <home> C-SPC <C-end> <C-insert> <help-echo> M-x r e p o r <tab> b <tab> <tab> e m <tab> <return> Recent messages: Composing main Info directory...done Mark set Mark saved where search started Mark set [2 times] Number radix is 7 "7#13" Mark set 10 en base 7=7#13 Mark set Making completion list... Load-path shadows: d:/Programme/GNU/emacs-extension/cedet/speedbar/speedbar hides d:/Programme/GNU/Emacs/lisp/speedbar d:/Programme/GNU/emacs-extension/cedet/speedbar/sb-image hides d:/Programme/GNU/Emacs/lisp/sb-image d:/Programme/GNU/emacs-extension/cedet/common/ezimage hides d:/Programme/GNU/Emacs/lisp/ezimage d:/Programme/GNU/emacs-extension/cedet/speedbar/dframe hides d:/Programme/GNU/Emacs/lisp/dframe c:/Documents and Settings/Vincent/Application Data/.emacs.d/etc/custom hides d:/Programme/GNU/Emacs/lisp/custom