emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r112767: * lisp/emacs-lisp/smie.el (s


From: Leo Liu
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r112767: * lisp/emacs-lisp/smie.el (smie-highlight-matching-block): Always turn
Date: Wed, 29 May 2013 14:50:48 +0800
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 112767
committer: Leo Liu <address@hidden>
branch nick: trunk
timestamp: Wed 2013-05-29 14:50:48 +0800
message:
  * lisp/emacs-lisp/smie.el (smie-highlight-matching-block): Always turn
  off the highlight first.
  
  * lisp/progmodes/octave.el (octave-indent-comment): Tweak regexps.
  (octave-help): Small simplification.
  
  * test/indent/octave.m: Tweak.
modified:
  lisp/ChangeLog
  lisp/emacs-lisp/smie.el
  lisp/progmodes/octave.el
  test/ChangeLog
  test/indent/octave.m
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-05-29 06:44:19 +0000
+++ b/lisp/ChangeLog    2013-05-29 06:50:48 +0000
@@ -1,3 +1,11 @@
+2013-05-29  Leo Liu  <address@hidden>
+
+       * progmodes/octave.el (octave-indent-comment): Tweak regexps.
+       (octave-help): Small simplification.
+
+       * emacs-lisp/smie.el (smie-highlight-matching-block): Always turn
+       off the highlight first.
+
 2013-05-29  Glenn Morris  <address@hidden>
 
        * progmodes/idlwave.el (idlwave-scan-user-lib-files)

=== modified file 'lisp/emacs-lisp/smie.el'
--- a/lisp/emacs-lisp/smie.el   2013-05-24 19:37:55 +0000
+++ b/lisp/emacs-lisp/smie.el   2013-05-29 06:50:48 +0000
@@ -1060,10 +1060,10 @@
                            beg end (current-buffer))
              (overlay-put smie--highlight-matching-block-overlay
                           'face 'smie-matching-block-highlight))))
-      (save-excursion
-        (condition-case nil
-            (if (nth 8 (syntax-ppss))
-                (overlay-put smie--highlight-matching-block-overlay 'face nil)
+      (overlay-put smie--highlight-matching-block-overlay 'face nil)
+      (unless (nth 8 (syntax-ppss))
+        (save-excursion
+          (condition-case nil
               (let ((token
                      (or (funcall beg-of-tok)
                          (funcall beg-of-tok
@@ -1082,11 +1082,8 @@
                   (let ((beg (point))
                         (opener (funcall smie-forward-token-function)))
                     (when (assoc opener smie-closer-alist)
-                      (funcall highlight beg (point)))))
-                 (t (overlay-put smie--highlight-matching-block-overlay
-                                 'face nil)))))
-          (scan-error
-           (overlay-put smie--highlight-matching-block-overlay 'face nil)))))))
+                      (funcall highlight beg (point)))))))
+            (scan-error)))))))
 
 (defvar smie--highlight-matching-block-timer nil)
 

=== modified file 'lisp/progmodes/octave.el'
--- a/lisp/progmodes/octave.el  2013-05-27 05:08:04 +0000
+++ b/lisp/progmodes/octave.el  2013-05-29 06:50:48 +0000
@@ -446,11 +446,11 @@
     (back-to-indentation)
     (cond
      ((octave-in-string-or-comment-p) nil)
-     ((looking-at-p "\\s<\\{3,\\}")
+     ((looking-at-p "\\(\\s<\\)\\1\\{2,\\}")
       0)
      ;; Exclude %{, %} and %!.
      ((and (looking-at-p "\\s<\\(?:[^{}!]\\|$\\)")
-           (not (looking-at-p "\\s<\\s<")))
+           (not (looking-at-p "\\(\\s<\\)\\1")))
       (comment-choose-indent)))))
 
 
@@ -1637,8 +1637,7 @@
         ;; Make 'See also' clickable
         (with-syntax-table octave-mode-syntax-table
           (when (re-search-forward "^\\s-*See also:" nil t)
-            (let ((end (or (save-excursion (re-search-forward "^\\s-*$" nil t))
-                           (point-max))))
+            (let ((end (save-excursion (re-search-forward "^\\s-*$" nil t))))
               (while (re-search-forward "\\_<\\(?:\\sw\\|\\s_\\)+\\_>" end t)
                 (make-text-button (match-beginning 0)
                                   ;; If the match ends with . exclude it.

=== modified file 'test/ChangeLog'
--- a/test/ChangeLog    2013-05-26 07:54:01 +0000
+++ b/test/ChangeLog    2013-05-29 06:50:48 +0000
@@ -1,3 +1,7 @@
+2013-05-29  Leo Liu  <address@hidden>
+
+       * indent/octave.m: Tweak.
+
 2013-05-26  Aidan Gauland  <address@hidden>
 
        * tests/eshell.el: Rewrite tests using ERT.

=== modified file 'test/indent/octave.m'
--- a/test/indent/octave.m      2013-05-25 02:03:03 +0000
+++ b/test/indent/octave.m      2013-05-29 06:50:48 +0000
@@ -2311,7 +2311,7 @@
       ext(end) = [];
     else
       isglob = false;          # I am a test
-                               # me too
+                               #%% me too
 ### I shall align to column 0
     endif
     pos = findstr (nm, ext);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]