aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/emacs-lisp/lisp-mode.el17
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 4c9a39fe174..45d5a0b410c 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -181,22 +181,23 @@
181 nil))) 181 nil)))
182 res)) 182 res))
183 183
184(defun lisp--el-non-funcall-position-p (&optional pos) 184(defun lisp--el-non-funcall-position-p (pos)
185 "Heuristically determine whether POS is an evaluated position." 185 "Heuristically determine whether POS is an evaluated position."
186 (setf pos (or pos (point)))
187 (save-match-data 186 (save-match-data
188 (save-excursion 187 (save-excursion
189 (ignore-errors 188 (ignore-errors
190 (goto-char pos) 189 (goto-char pos)
191 (or (eql (char-before) ?\') 190 (or (eql (char-before) ?\')
192 (let ((parent 191 (let* ((ppss (syntax-ppss))
193 (progn 192 (paren-posns (nth 9 ppss))
194 (up-list -1) 193 (parent
195 (cond 194 (when paren-posns
195 (goto-char (car (last paren-posns))) ;(up-list -1)
196 (cond
196 ((ignore-errors 197 ((ignore-errors
197 (and (eql (char-after) ?\() 198 (and (eql (char-after) ?\()
198 (progn 199 (when (cdr paren-posns)
199 (up-list -1) 200 (goto-char (car (last paren-posns 2)))
200 (looking-at "(\\_<let\\*?\\_>")))) 201 (looking-at "(\\_<let\\*?\\_>"))))
201 (goto-char (match-end 0)) 202 (goto-char (match-end 0))
202 'let) 203 'let)