summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-02-10 17:32:13 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2011-02-10 17:32:13 -0800
commit78998ca9cf65cc65579c8b756d35a2db9d3c8ef7 (patch)
treed897294f854a85c547b4630fcc3d2bab96285a88 /lisp/emacs-lisp
parent2098fd549f4c8a00246324a35de6af8144f5b628 (diff)
parent5708ce5e83340d735ca9b87f028caf0bf5709b6e (diff)
downloademacs-78998ca9cf65cc65579c8b756d35a2db9d3c8ef7.tar.gz
emacs-78998ca9cf65cc65579c8b756d35a2db9d3c8ef7.tar.bz2
emacs-78998ca9cf65cc65579c8b756d35a2db9d3c8ef7.zip
Merge from mainline.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/edebug.el2
-rw-r--r--lisp/emacs-lisp/smie.el16
2 files changed, 13 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index f281521841c..70a7983dbea 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -3394,7 +3394,7 @@ go to the end of the last sexp, or if that is the same point, then step."
;; Return the function symbol, or nil if not instrumented.
(let ((func-marker (get func 'edebug)))
(cond
- ((markerp func-marker)
+ ((and (markerp func-marker) (marker-buffer func-marker))
;; It is uninstrumented, so instrument it.
(with-current-buffer (marker-buffer func-marker)
(goto-char func-marker)
diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el
index 702e8d880ba..e81a8b37981 100644
--- a/lisp/emacs-lisp/smie.el
+++ b/lisp/emacs-lisp/smie.el
@@ -915,7 +915,7 @@ This uses SMIE's tables and is expected to be placed on `post-self-insert-hook'.
;; anything else than this trigger char, lest we'd blink
;; both when inserting the trigger char and when
;; inserting a subsequent trigger char like SPC.
- (or (eq (point) pos)
+ (or (eq (char-before) last-command-event)
(not (memq (char-before)
smie-blink-matching-triggers)))
(or smie-blink-matching-inners
@@ -998,7 +998,10 @@ the beginning of a line."
(unless (numberp (cadr (assoc tok smie-grammar)))
(goto-char pos))
(setq smie--parent
- (smie-backward-sexp 'halfsexp))))))
+ (or (smie-backward-sexp 'halfsexp)
+ (let (res)
+ (while (null (setq res (smie-backward-sexp))))
+ (list nil (point) (nth 2 res)))))))))
(defun smie-rule-parent-p (&rest parents)
"Return non-nil if the current token's parent is among PARENTS.
@@ -1403,6 +1406,10 @@ should not be computed on the basis of the following token."
(and (nth 4 (syntax-ppss))
'noindent))
+(defun smie-indent-inside-string ()
+ (and (nth 3 (syntax-ppss))
+ 'noindent))
+
(defun smie-indent-after-keyword ()
;; Indentation right after a special keyword.
(save-excursion
@@ -1476,8 +1483,9 @@ should not be computed on the basis of the following token."
(defvar smie-indent-functions
'(smie-indent-fixindent smie-indent-bob smie-indent-close
- smie-indent-comment smie-indent-comment-continue smie-indent-comment-close
- smie-indent-comment-inside smie-indent-keyword smie-indent-after-keyword
+ smie-indent-comment smie-indent-comment-continue smie-indent-comment-close
+ smie-indent-comment-inside smie-indent-inside-string
+ smie-indent-keyword smie-indent-after-keyword
smie-indent-exps)
"Functions to compute the indentation.
Each function is called with no argument, shouldn't move point, and should