text-modes / crontab.el

Diff from to

File crontab.el

   :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)))