This is one of those things that have annoyed me since the dawn of
time.
Is there such a thing as a cron that doesn't like blank lines in
crontab files? Just in case I made it customisable (default retaining
old behaviour)
text-modes patch:
ChangeLog files diff command: cvs -q diff -U 0
Files affected: ChangeLog
Source files diff command: cvs -q diff -uN
Files affected: crontab.el
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/text-modes/ChangeLog,v
retrieving revision 1.140
diff -u -U0 -r1.140 ChangeLog
--- ChangeLog 26 Nov 2004 08:05:35 -0000 1.140
+++ ChangeLog 9 Jan 2005 04:47:37 -0000
@@ -0,0 +1,6 @@
+2005-01-09 Steve Youngs <steve(a)sxemacs.org>
+
+ * crontab.el (crontab-delete-blank-lines): New. To make deleting
+ blank lines in crontab files optional.
+ (crontab-save): Use it.
+
Index: crontab.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/text-modes/crontab.el,v
retrieving revision 1.2
diff -u -u -r1.2 crontab.el
--- crontab.el 6 Oct 2000 09:27:59 -0000 1.2
+++ crontab.el 9 Jan 2005 04:47:27 -0000
@@ -61,6 +61,10 @@
:type 'boolean
:group 'crontab)
+(defcustom crontab-delete-blank-lines t
+ "*Non-nil means to delete any blank lines in the crontab file on save."
+:type 'boolean
+:group 'crontab)
;;; Interactive Function called to edit a Crontab Entry. It is called
;;; instead of crontab-edit to allow for future automatic entries.
@@ -118,11 +122,12 @@
(defun crontab-save ()
"Submit the edited crontab to the cron daemon for processing."
- (goto-char (point-min))
- (while (not (eobp))
- (delete-blank-lines)
- (forward-line 1))
- (redraw-display)
+ (when crontab-delete-blank-lines
+ (goto-char (point-min))
+ (while (not (eobp))
+ (delete-blank-lines)
+ (forward-line 1))
+ (redraw-display))
(setq write-file-hooks nil)
(let ((crontab-buffer (buffer-name)))
--
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
| In space, |
| No one can hear you rip a stinky |
|------------------------------------<steve(a)sxemacs.org>---|