summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/smie.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2012-06-23 11:38:23 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2012-06-23 11:38:23 -0400
commitdc5d230cac26a7ad04afd63bfc8db7c3df529fba (patch)
treedbe754c92c664a8bce769174e97e5660380df0c4 /lisp/emacs-lisp/smie.el
parente8c1cabf0330c190594cb77942a5690afee9e926 (diff)
downloademacs-dc5d230cac26a7ad04afd63bfc8db7c3df529fba.tar.gz
Miscellaneous minor cleanups and simplifications.
* lisp/help-fns.el (describe-variable): Don't croak when doc is not found. * lisp/vc/pcvs.el (cvs-retrieve-revision): Avoid toggle-read-only. * lisp/menu-bar.el (menu-bar-line-wrapping-menu): Purecopy a tiny bit more. * lisp/emacs-lisp/syntax.el (syntax-ppss): Simplify with new `if' place. * lisp/emacs-lisp/smie.el (smie-next-sexp): CSE. * lisp/emacs-lisp/macroexp.el (macroexp-let2): Fix edebug spec and avoid ((lambda ..) ..). * lisp/emacs-lisp/eieio.el (eieio-oref, slot-value): Use simpler defsetf.
Diffstat (limited to 'lisp/emacs-lisp/smie.el')
-rw-r--r--lisp/emacs-lisp/smie.el13
1 files changed, 6 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el
index be3a9828491..9fa8a108236 100644
--- a/lisp/emacs-lisp/smie.el
+++ b/lisp/emacs-lisp/smie.el
@@ -708,13 +708,12 @@ Possible return values:
(when (zerop (length token))
(condition-case err
(progn (goto-char pos) (funcall next-sexp 1) nil)
- (scan-error (throw 'return
- (list t (cl-caddr err)
- (buffer-substring-no-properties
- (cl-caddr err)
- (+ (cl-caddr err)
- (if (< (point) (cl-caddr err))
- -1 1)))))))
+ (scan-error
+ (let ((pos (nth 2 err)))
+ (throw 'return
+ (list t pos
+ (buffer-substring-no-properties
+ pos (+ pos (if (< (point) pos) -1 1))))))))
(if (eq pos (point))
;; We did not move, so let's abort the loop.
(throw 'return (list t (point))))))