emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r114743: * lisp/emacs-lisp/smie.el (smie-rule-parent


From: Stefan Monnier
Subject: [Emacs-diffs] trunk r114743: * lisp/emacs-lisp/smie.el (smie-rule-parent): Fix opener-test.
Date: Tue, 22 Oct 2013 15:46:01 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114743
revision-id: address@hidden
parent: address@hidden
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Tue 2013-10-22 11:45:56 -0400
message:
  * lisp/emacs-lisp/smie.el (smie-rule-parent): Fix opener-test.
  * lisp/progmodes/ruby-mode.el (ruby-smie-rules):
  Remove corresponding workaround.  Fix indentation rule of ";" so it
  also applies when ";" is the parent.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/emacs-lisp/smie.el        smie.el-20100517192034-xap3ihmey43772vj-1
  lisp/progmodes/ruby-mode.el    
rubymode.el-20091113204419-o5vbwnq5f7feedwu-8804
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-10-22 08:07:51 +0000
+++ b/lisp/ChangeLog    2013-10-22 15:45:56 +0000
@@ -1,10 +1,18 @@
+2013-10-22  Stefan Monnier  <address@hidden>
+
+
+       * emacs-lisp/smie.el (smie-rule-parent): Fix opener-test.
+       * progmodes/ruby-mode.el (ruby-smie-rules):
+       Remove corresponding workaround.  Fix indentation rule of ";" so it
+       also applies when ";" is the parent.
+
 2013-10-22  Xue Fuqiao  <address@hidden>
 
        * frame.el (display-screens, display-pixel-height)
        (display-pixel-width, display-mm-width, display-backing-store)
        (display-save-under, display-planes, display-color-cells)
-       (display-visual-class, display-monitor-attributes-list): Mention
-       the optional ‘display’ argument in doc strings.
+       (display-visual-class, display-monitor-attributes-list):
+       Mention the optional ‘display’ argument in doc strings.
 
 2013-10-22  Michael Gauland  <address@hidden>
 

=== modified file 'lisp/emacs-lisp/smie.el'
--- a/lisp/emacs-lisp/smie.el   2013-10-11 00:45:03 +0000
+++ b/lisp/emacs-lisp/smie.el   2013-10-22 15:45:56 +0000
@@ -1242,7 +1242,8 @@
              ;; rules-function, so it gives it a chance to tweak
              ;; indentation (e.g. by forcing indentation relative to
              ;; its own parent, as in fn a => fn b => fn c =>).
-             (if (or (listp (car smie--parent)) (smie-indent--hanging-p))
+             (if (or (not (numberp (car smie--parent)))
+                    (smie-indent--hanging-p))
                  (smie-indent-virtual) (current-column))))))
 
 (defvar smie-rule-separator-outdent 2)

=== modified file 'lisp/progmodes/ruby-mode.el'
--- a/lisp/progmodes/ruby-mode.el       2013-10-21 22:25:59 +0000
+++ b/lisp/progmodes/ruby-mode.el       2013-10-22 15:45:56 +0000
@@ -444,23 +444,13 @@
     ;; should be aligned with the first.
     (`(:elem . args) (if (looking-at "\\s\"") 0))
     ;; (`(:after . ",") (smie-rule-separator kind))
-    (`(:after . ";")
+    (`(:before . ";")
      (cond
       ((smie-rule-parent-p "def" "begin" "do" "class" "module" "for"
                            "while" "until" "unless"
                            "if" "then" "elsif" "else" "when"
-                           "rescue" "ensure")
+                           "rescue" "ensure" "{")
        (smie-rule-parent ruby-indent-level))
-      ((and (smie-rule-parent-p "{")
-            (save-excursion
-              (goto-char (1+ (cadr (smie-indent--parent))))
-              (ruby-smie--opening-pipe-p)
-              (forward-char -1)
-              ;; Can't delegate to `smie-rule-parent' because it
-              ;; short-circuits to `current-column' when the parent
-              ;; token is of paren syntax class and not hanging.
-              (cons 'column (+ (smie-indent-virtual)
-                               ruby-indent-level)))))
       ;; For (invalid) code between switch and case.
       ;; (if (smie-parent-p "switch") 4)
       (t 0)))


reply via email to

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