aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier2014-12-05 15:30:09 -0500
committerStefan Monnier2014-12-05 15:30:09 -0500
commit4fda400e58339cdf962b5679bf05ebe62c6189c5 (patch)
tree8588108b9046f7ec6747112cd30509466ea49459 /lisp
parent0d7b2c96d388f5a9b539df3cb7f4ef115e7010b7 (diff)
parentc1c2cee7c5ae1eff6edb198814423e55cb11cc73 (diff)
downloademacs-4fda400e58339cdf962b5679bf05ebe62c6189c5.tar.gz
emacs-4fda400e58339cdf962b5679bf05ebe62c6189c5.zip
Merge from emacs-24
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/progmodes/sh-script.el4
-rw-r--r--lisp/simple.el4
3 files changed, 14 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b4e51a6eebb..79ee9d75906 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,15 @@
12014-12-05 Stefan Monnier <monnier@iro.umontreal.ca> 12014-12-05 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * progmodes/sh-script.el (sh-smie-sh-rules): Go back to the beginning
4 of the whole pipe when indenting an opening keyword after a |.
5 Generalize this treatment to opening keywords like "while" (bug#18031).
6
72014-12-05 Stefan Monnier <monnier@iro.umontreal.ca>
82014-12-05 Stefan Monnier <monnier@iro.umontreal.ca>
9
10 * simple.el (newline): Place the hook buffer-locally,
11 to make sure it's first.
12
3 * progmodes/prog-mode.el (prettify-symbols--compose-symbol): 13 * progmodes/prog-mode.el (prettify-symbols--compose-symbol):
4 Fix handling of symbols with different syntax at beginning/end or with 14 Fix handling of symbols with different syntax at beginning/end or with
5 symbol rather than word syntax. 15 symbol rather than word syntax.
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 5631358b472..524749d6266 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -2014,12 +2014,12 @@ May return nil if the line should not be treated as continued."
2014 (and (numberp indent) (numberp initial) 2014 (and (numberp indent) (numberp initial)
2015 (<= indent initial))))) 2015 (<= indent initial)))))
2016 `(column . ,(+ initial sh-indentation))) 2016 `(column . ,(+ initial sh-indentation)))
2017 (`(:before . ,(or `"(" `"{" `"[")) 2017 (`(:before . ,(or `"(" `"{" `"[" "while" "if" "for" "case"))
2018 (if (not (smie-rule-prev-p "&&" "||" "|")) 2018 (if (not (smie-rule-prev-p "&&" "||" "|"))
2019 (when (smie-rule-hanging-p) 2019 (when (smie-rule-hanging-p)
2020 (smie-rule-parent)) 2020 (smie-rule-parent))
2021 (unless (smie-rule-bolp) 2021 (unless (smie-rule-bolp)
2022 (smie-backward-sexp 'halfexp) 2022 (while (equal "|" (nth 2 (smie-backward-sexp 'halfexp))))
2023 `(column . ,(smie-indent-virtual))))) 2023 `(column . ,(smie-indent-virtual)))))
2024 ;; FIXME: Maybe this handling of ;; should be made into 2024 ;; FIXME: Maybe this handling of ;; should be made into
2025 ;; a smie-rule-terminator function that takes the substitute ";" as arg. 2025 ;; a smie-rule-terminator function that takes the substitute ";" as arg.
diff --git a/lisp/simple.el b/lisp/simple.el
index 900828aad1c..9f447988a2f 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -440,12 +440,12 @@ A non-nil INTERACTIVE argument means to run the `post-self-insert-hook'."
440 (self-insert-command (prefix-numeric-value arg))) 440 (self-insert-command (prefix-numeric-value arg)))
441 (unwind-protect 441 (unwind-protect
442 (progn 442 (progn
443 (add-hook 'post-self-insert-hook postproc) 443 (add-hook 'post-self-insert-hook postproc nil t)
444 (self-insert-command (prefix-numeric-value arg))) 444 (self-insert-command (prefix-numeric-value arg)))
445 ;; We first used let-binding to protect the hook, but that was naive 445 ;; We first used let-binding to protect the hook, but that was naive
446 ;; since add-hook affects the symbol-default value of the variable, 446 ;; since add-hook affects the symbol-default value of the variable,
447 ;; whereas the let-binding might only protect the buffer-local value. 447 ;; whereas the let-binding might only protect the buffer-local value.
448 (remove-hook 'post-self-insert-hook postproc))) 448 (remove-hook 'post-self-insert-hook postproc t)))
449 (cl-assert (not (member postproc post-self-insert-hook))) 449 (cl-assert (not (member postproc post-self-insert-hook)))
450 (cl-assert (not (member postproc (default-value 'post-self-insert-hook)))))) 450 (cl-assert (not (member postproc (default-value 'post-self-insert-hook))))))
451 nil) 451 nil)