Commit 7790a270 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* 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.
parent a034ece0
2013-10-22 Stefan Monnier <monnier@iro.umontreal.ca>
* 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 <xfq.free@gmail.com>
* 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 <mikelygee@amuri.net>
......
......@@ -1242,7 +1242,8 @@ Only meaningful when called from within `smie-rules-function'."
;; 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)
......
......@@ -444,23 +444,13 @@ explicitly declared in magic comment."
;; 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)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment