Commits

Anonymous committed e350d3f

2005-01-09 Steve Youngs <steve@sxemacs.org>

* crontab.el (crontab-delete-blank-lines): New. To make deleting
blank lines in crontab files optional.
(crontab-save): Use it.

Comments (0)

Files changed (2)

+2005-01-09  Steve Youngs  <steve@sxemacs.org>
+
+	* crontab.el (crontab-delete-blank-lines): New.  To make deleting
+	blank lines in crontab files optional.
+	(crontab-save): Use it.
+
 2004-11-26  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 1.81 released.
   :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.
 (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)))