|
From: | Andreas Roehler |
Subject: | Re: backward-up-list |
Date: | Mon, 16 Oct 2006 21:17:53 +0200 |
User-agent: | Thunderbird 1.5.0.4 (X11/20060516) |
Stefan Monnier schrieb:
(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. Stefan
Thanks. 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. Cheers a nonbelieving snail
[Prev in Thread] | Current Thread | [Next in Thread] |