>> This might make it safe most of the time, but I think there will still >> be cases of strings where it gets fooled.
> The idea is not to use a heuristic to figure out what the user wants, but > to > setup a convention that the user can follow. > It might work. The paren-after-newline convention for starting a > function works well, and I guess people would adapt to this one too. > Want to try it? How 'bout the patch below? Stefan --- sh-script.el 04 jui 2005 14:42:24 -0400 1.160 +++ sh-script.el 11 jui 2005 17:24:12 -0400 @@ -2033,11 +2033,20 @@ ;; Continuation lines are handled specially (if (sh-this-is-a-continuation) (progn + (setq result + (if (save-excursion + (beginning-of-line) + (not (memq (char-before (- (point) 2)) '(?\s ?\t)))) + ;; By convention, if the continuation \ is not + ;; preceded by a SPC or a TAB it means that the line + ;; is cut at a place where spaces cannot be freely + ;; added/removed. I.e. do not indent the line. + (list '(= nil)) ;; We assume the line being continued is already ;; properly indented... ;; (setq prev-line-end (sh-prev-line)) (setq align-point (sh-prev-line nil)) - (setq result (list '(+ sh-indent-for-continuation))) + (list '(+ sh-indent-for-continuation)))) (setq have-result t)) (beginning-of-line) (skip-chars-forward " \t") _______________________________________________ Emacs-pretest-bug mailing list Emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug