>>> (while (in-string-p)
>>> (backward-char 1))
>>
>> That's the way a snail would do it,
>>
>> (goto-char (or (nth 8 (syntax-ppss)) (point)))
>>
>> would be faster and solve the same problem with comments at the same time.
> However, I'm not convinced here.
> in-string-p is very clear and short written.
> (defun in-string-p ()
> (let ((orig (point)))
> (save-excursion
> (beginning-of-defun)
> (nth 3 (parse-partial-sexp (point) orig)))))
> With syntax-ppss there are a lot of lines, hardly to
> follow. Altogether it ends up with the same
> core-function or at least calls it:
> (setq ppss (parse-partial-sexp pt-min pos nil nil ppss))
> So I doubt it being faster.
You seem to have missed the point: my code has no loop.
Stefan
_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug