[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/progmodes/sh-script.el,v
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/progmodes/sh-script.el,v |
Date: |
Sat, 30 Sep 2006 09:38:46 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Eli Zaretskii <eliz> 06/09/30 09:38:45
Index: sh-script.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/sh-script.el,v
retrieving revision 1.186
retrieving revision 1.187
diff -u -b -r1.186 -r1.187
--- sh-script.el 8 Aug 2006 15:09:25 -0000 1.186
+++ sh-script.el 30 Sep 2006 09:38:45 -0000 1.187
@@ -2473,7 +2473,7 @@
(skip-chars-backward " \t;")
(unless (looking-at "\\s-*;;")
(skip-chars-backward "^)}];\"'`({[")
- (setq c (char-before))))
+ (setq c (char-before))
(sh-debug "stopping at %d c is %s start=%d min-point=%d"
(point) c start min-point)
(if (< (point) min-point)
@@ -2485,21 +2485,30 @@
((or (eq c ?\n)
(eq c nil)
(eq c ?\;))
- (save-excursion
- ;; skip forward over white space newline and \ at eol
+ (let (done kwd next
+ (boundary (point)))
(skip-chars-forward " \t\n\\\\")
+ (while (and (not done) (not (eobp)))
+ (if next (setq boundary next))
+ ;; skip forward over white space newline and \ at eol
(sh-debug "Now at %d start=%d" (point) start)
(if (>= (point) start)
(progn
(sh-debug "point: %d >= start: %d" (point) start)
nil)
- (sh-get-word))
- ))
+ (setq kwd (sh-get-word))
+ (unless (eobp) (forward-char 1))
+ (if (member kwd (sh-feature sh-leading-keywords))
+ (setq next (point))
+ (setq done t)))
+ (skip-chars-forward " \t\n\\\\"))
+ (goto-char boundary)
+ kwd))
(t
;; c -- return a string
(char-to-string c)
))
- )))
+ )))))
(defun sh-this-is-a-continuation ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/progmodes/sh-script.el,v,
Eli Zaretskii <=