Hi Eric,
[...]
> I also used this feature in senator's extension to hippie expand.
> This way if you type:
>
> funcall(boo
>
> and hit hippie-expand, the old behavior was to mark everything as
> unmatched syntax starting with the function you were in. Bad bad
> bad. Now a quick use of the lexical safety macro puts the buffer
> into the 'unparseable' state, so all searches use the cache. Once an
> element is found as replacement, the buffer reverts to being merely
> out of date. Nifty.
[...]
I encountered a little problem with the senator's extension to hippie
expand when semantic-lex throws a lexical error. In some cases the
point is not preserved by `semantic-lex-catch-errors' and hippie
expand fails to try other completion methods.
The following patch seemed to have fixed the issue. However I am not
sure it is the right thing to do. What do you think? Can I commit
it?
David
Index: semantic-lex.el
===================================================================
RCS file: /cvsroot/cedet/cedet/semantic/semantic-lex.el,v
retrieving revision 1.26
diff -c -r1.26 semantic-lex.el
*** semantic-lex.el 3 Jan 2004 20:48:54 -0000 1.26
--- semantic-lex.el 8 Jan 2004 15:40:23 -0000
***************
*** 1223,1229 ****
(lambda (syntax start end) (throw ',symbol syntax)))
ret)
(setq ret (catch ',symbol
! (progn
,@forms
nil)))
;; Great Sadness. Assume that FORMS execute within the
--- 1223,1229 ----
(lambda (syntax start end) (throw ',symbol syntax)))
ret)
(setq ret (catch ',symbol
! (save-excursion
,@forms
nil)))
;; Great Sadness. Assume that FORMS execute within the
|