]> git.eshelyaron.com Git - emacs.git/commitdiff
(sh-here-document-word): Document new treatment of leading "-".
authorGlenn Morris <rgm@gnu.org>
Tue, 27 May 2003 18:40:55 +0000 (18:40 +0000)
committerGlenn Morris <rgm@gnu.org>
Tue, 27 May 2003 18:40:55 +0000 (18:40 +0000)
(sh-maybe-here-document): Strip a leading "-" from closing heredoc
delimiter, if present.

lisp/ChangeLog
lisp/progmodes/sh-script.el

index 409fdc5cc7365ee2c19f4e64afeb7dccd2a84ec5..47616ddaded5de4bd50712b2d533f39e9dfbea3c 100644 (file)
@@ -1,3 +1,26 @@
+2003-05-27  Glenn Morris  <gmorris@ast.cam.ac.uk>
+
+       * progmodes/sh-script.el (sh-here-document-word): Document
+       new treatment of leading "-".
+       (sh-maybe-here-document): Strip a leading "-" from closing
+       heredoc delimiter, if present.
+
+       * align.el (align-rules-list): Doc fix.
+
+       * calendar/timeclock.el: Update copyright.
+       (timeclock-ask-before-exiting): Put `timeclock-query-out' on 
+       `kill-emacs-query-functions' rather than `kill-emacs-hook'.
+       (timeclock-mode-string): Doc fix.
+       (timeclock-modeline-display): Doc fix.  Use `global-mode-string'
+       rather than `mode-line-format'.
+       (timeclock-query-out): Doc fix.
+       (timeclock-update-modeline): No need for `let*', so use `let'.
+       Add some help-echo text to `timeclock-mode-string'.
+       (timeclock-mode-string): Give it the risky-local-variable
+       property, so that help-echo text will display.
+       (timeclock-find-discrep): Set `accum' to 0 if
+       `timeclock-discrepancy' is nil.
+       
 2003-05-27  Stefan Monnier  <monnier@cs.yale.edu>
 
        * emacs-lisp/lisp-mode.el (lisp-font-lock-syntactic-face-function):
index f43aca5353642c6857457b39cf3e9ee3f5cc7386..d5193e17e2c9bf934269b0f7c1b4534760564081 100644 (file)
@@ -543,7 +543,13 @@ The actual command ends at the end of the first \\(grouping\\)."
 
 
 (defvar sh-here-document-word "EOF"
-  "Word to delimit here documents.")
+  "Word to delimit here documents.
+If the first character of this string is \"-\", this character will
+be removed from the string when it is used to close the here document.
+This convention is used by the Bash shell, for example, to indicate
+that leading tabs inside the here document should be ignored.
+Note that Emacs currently has no support for indenting inside here
+documents - you must insert literal tabs by hand.")
 
 (defvar sh-test
   '((sh "[  ]" . 3)
@@ -3498,7 +3504,10 @@ The document is bounded by `sh-here-document-word'."
            (sh-quoted-p)
          (end-of-line 2))
        (newline)
-       (save-excursion (insert ?\n sh-here-document-word)))))
+       (save-excursion
+          (insert ?\n (substring
+                       sh-here-document-word
+                       (if (string-match "^-" sh-here-document-word) 1 0)))))))
 
 \f
 ;; various other commands