aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2009-09-19 19:35:15 +0000
committerChong Yidong2009-09-19 19:35:15 +0000
commit946c009b511d6b459abafb8d2201bb7f526933be (patch)
tree5c928c4f7a9b0d387dee93dcac70204cefa62405
parent3e70541aed3c5ee2ed345ea94b2c61b36c44142d (diff)
downloademacs-946c009b511d6b459abafb8d2201bb7f526933be.tar.gz
emacs-946c009b511d6b459abafb8d2201bb7f526933be.zip
* progmodes/sh-script.el (sh-learn-buffer-indent): Pop to the
indent buffer only if called interactively (Bug#4452).
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/progmodes/sh-script.el9
2 files changed, 10 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8b15bd07573..0d3f8d686dd 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12009-09-19 Chong Yidong <cyd@stupidchicken.com>
2
3 * progmodes/sh-script.el (sh-learn-buffer-indent): Pop to the
4 indent buffer only if called interactively (Bug#4452).
5
12009-09-19 Juanma Barranquero <lekktu@gmail.com> 62009-09-19 Juanma Barranquero <lekktu@gmail.com>
2 Eli Zaretskii <eliz@gnu.org> 7 Eli Zaretskii <eliz@gnu.org>
3 8
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 70b96ba807d..1adea78c2f5 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -2997,7 +2997,8 @@ so that `occur-next' and `occur-prev' will work."
2997 2997
2998Output in buffer \"*indent*\" shows any lines which have conflicting 2998Output in buffer \"*indent*\" shows any lines which have conflicting
2999values of a variable, and the final value of all variables learned. 2999values of a variable, and the final value of all variables learned.
3000This buffer is popped to automatically if there are any discrepancies. 3000When called interactively, pop to this buffer automatically if
3001there are any discrepancies.
3001 3002
3002If no prefix ARG is given, then variables are set to numbers. 3003If no prefix ARG is given, then variables are set to numbers.
3003If a prefix arg is given, then variables are set to symbols when 3004If a prefix arg is given, then variables are set to symbols when
@@ -3209,9 +3210,9 @@ This command can often take a long time to run."
3209 ))) 3210 )))
3210 ;; Are abnormal hooks considered bad form? 3211 ;; Are abnormal hooks considered bad form?
3211 (run-hook-with-args 'sh-learned-buffer-hook learned-var-list) 3212 (run-hook-with-args 'sh-learned-buffer-hook learned-var-list)
3212 (if (or sh-popup-occur-buffer (> num-diffs 0)) 3213 (and (called-interactively-p)
3213 (pop-to-buffer out-buffer)) 3214 (or sh-popup-occur-buffer (> num-diffs 0))
3214 ))) 3215 (pop-to-buffer out-buffer)))))
3215 3216
3216(defun sh-guess-basic-offset (vec) 3217(defun sh-guess-basic-offset (vec)
3217 "See if we can determine a reasonable value for `sh-basic-offset'. 3218 "See if we can determine a reasonable value for `sh-basic-offset'.