X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/4fc35edd5fcdfe258c04cfed707753fdd8795a72..cfb35800a8765b3458751bd6992a348f97843894:/lisp/emacs-lisp/lisp.el?ds=sidebyside diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 214bed7622..67d14872b3 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -263,7 +263,7 @@ This command assumes point is not in a string or comment." (backward-up-list arg) (kill-sexp) (insert current-sexp)) - (error "Not at a sexp")))) + (user-error "Not at a sexp")))) (defvar beginning-of-defun-function nil "If non-nil, function for `beginning-of-defun-raw' to call. @@ -714,7 +714,8 @@ character." (condition-case data ;; Buffer can't have more than (point-max) sexps. (scan-sexps (point-min) (point-max)) - (scan-error (goto-char (nth 2 data)) + (scan-error (push-mark) + (goto-char (nth 2 data)) ;; Could print (nth 1 data), which is either ;; "Containing expression ends prematurely" or ;; "Unbalanced parentheses", but those may not be so