[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-mcron] [PATCH 30/33] Define directory-local variables for Emacs.
From: |
Mathieu Lirzin |
Subject: |
[Bug-mcron] [PATCH 30/33] Define directory-local variables for Emacs. |
Date: |
Sun, 27 Sep 2015 23:16:06 +0200 |
* .dir-locals.el: New file.
---
.dir-locals.el | 10 ++++++++++
scm/mcron/crontab.scm | 4 ++--
scm/mcron/job-specifier.scm | 14 ++++++--------
scm/mcron/main.scm | 23 ++++++++---------------
scm/mcron/vixie-specification.scm | 12 +++++-------
5 files changed, 31 insertions(+), 32 deletions(-)
create mode 100644 .dir-locals.el
diff --git a/.dir-locals.el b/.dir-locals.el
new file mode 100644
index 0000000..f628caf
--- /dev/null
+++ b/.dir-locals.el
@@ -0,0 +1,10 @@
+;; Per-directory local variables for GNU Emacs 23 and later.
+
+((nil
+ . ((fill-column . 78)
+ (tab-width . 8)))
+ (c-mode . ((c-file-style . "gnu")))
+ (scheme-mode
+ .
+ ((indent-tabs-mode . nil)
+ (eval . (put 'mcron-error 'scheme-indent-function 1)))))
diff --git a/scm/mcron/crontab.scm b/scm/mcron/crontab.scm
index 30e5592..6be5c61 100644
--- a/scm/mcron/crontab.scm
+++ b/scm/mcron/crontab.scm
@@ -221,8 +221,8 @@
;; The user is being silly. The message here is identical to the one Vixie
cron
;; used to put out, for total compatibility.
- (else
- (mcron-error 15 "usage error: file name must be specified for replace.")))
+ (else (mcron-error 15
+ "usage error: file name must be specified for replace.")))
)) ;; End of file-level let-scopes.
diff --git a/scm/mcron/job-specifier.scm b/scm/mcron/job-specifier.scm
index cce948c..1647ede 100644
--- a/scm/mcron/job-specifier.scm
+++ b/scm/mcron/job-specifier.scm
@@ -233,10 +233,9 @@
((list? action) (lambda () (primitive-eval action)))
((string? action) (lambda () (system action)))
(else
- (throw 'mcron-error
- 2
- "job: invalid second argument (action; should be lambda"
- " function, string or list)"))))
+ (throw 'mcron-error 2
+ "job: invalid second argument (action; should be lambda "
+ "function, string or list)"))))
(time-proc
(cond ((procedure? time-proc) time-proc)
@@ -244,10 +243,9 @@
((list? time-proc) (lambda (current-time)
(primitive-eval time-proc)))
(else
- (throw 'mcron-error
- 3
- "job: invalid first argument (next-time-function; should ")
- "be function, string or list)")))
+ (throw 'mcron-error 3
+ "job: invalid first argument (next-time-function; "
+ "should be function, string or list)"))))
(displayable
(cond ((not (null? displayable)) (car displayable))
((procedure? action) "Lambda function")
diff --git a/scm/mcron/main.scm b/scm/mcron/main.scm
index 92107fd..1ea9b82 100644
--- a/scm/mcron/main.scm
+++ b/scm/mcron/main.scm
@@ -217,8 +217,7 @@ $XDG_CONFIG_HOME is not defined uses ~/.config/cron
instead)."
"/cron")))
(when (eq? 2 errors)
(mcron-error 13
- "Cannot read files in your ~/.config/cron (or ~/.cron) "
- "directory."))))
+ "Cannot read files in your ~/.config/cron (or ~/.cron) directory."))))
(define (valid-user user-name)
"Check that USER-NAME is in the passwd database (it may happen that a user
@@ -248,9 +247,8 @@ operation. The permissions on the /var/cron/tabs directory
enforce this."
"/"
file-name)))))))
(lambda (key . args)
- (mcron-error
- 4
- "You do not have permission to access the system crontabs."))))
+ (mcron-error 4
+ "You do not have permission to access the system crontabs."))))
(define (cron-file-descriptors)
"Establish a socket to listen for updates from a crontab program, and return
@@ -265,9 +263,7 @@ crontab. This requires that command-type is 'cron."
(list sock)))
(lambda (key . args)
(delete-file config-pid-file)
- (mcron-error 1
- "Cannot bind to UNIX socket "
- config-socket-file)))
+ (mcron-error 1 "Cannot bind to UNIX socket " config-socket-file)))
'()))
(define (process-update-request fdes-list)
@@ -319,15 +315,12 @@ comes in on the above socket."
(when (eq? command-type 'cron)
(unless (eqv? (getuid) 0)
(mcron-error 16
- "This program must be run by the root user (and should "
- "have been installed as such)."))
+ "This program must be run by the root user (and should have been "
+ "installed as such)."))
(when (access? config-pid-file F_OK)
(mcron-error 1
- "A cron daemon is already running.\n"
- " (If you are sure this is not true, remove the file\n"
- " "
- config-pid-file
- ".)"))
+ "A cron daemon is already running.\n (If you are sure this is not"
+ " true, remove the file\n " config-pid-file ".)"))
(unless (option-ref options 'schedule #f)
(with-output-to-file config-pid-file noop))
(setenv "MAILTO" #f)
diff --git a/scm/mcron/vixie-specification.scm
b/scm/mcron/vixie-specification.scm
index ab002ba..5cd1528 100644
--- a/scm/mcron/vixie-specification.scm
+++ b/scm/mcron/vixie-specification.scm
@@ -162,13 +162,11 @@
(parse-vixie-environment line)
(parse-vixie-line line)))
(lambda (key exit-code . msg)
- (throw
- 'mcron-error
- exit-code
- (apply string-append
- (number->string report-line)
- ": "
- msg)))))))))
+ (throw 'mcron-error exit-code
+ (apply string-append
+ (number->string report-line)
+ ": "
+ msg)))))))))
- [Bug-mcron] [PATCH 21/33] main: Remove obsolete debug option., (continued)
- [Bug-mcron] [PATCH 21/33] main: Remove obsolete debug option., Mathieu Lirzin, 2015/09/27
- [Bug-mcron] [PATCH 22/33] redirect: Use module (ice-9 regex)., Mathieu Lirzin, 2015/09/27
- [Bug-mcron] [PATCH 23/33] mcron: Add forward declarations., Mathieu Lirzin, 2015/09/27
- [Bug-mcron] [PATCH 28/33] main: Remove unused 'regular-file?' procedure., Mathieu Lirzin, 2015/09/27
- [Bug-mcron] [PATCH 24/33] mcron: Use symbolic constants., Mathieu Lirzin, 2015/09/27
- [Bug-mcron] [PATCH 25/33] mcron: Rework comments., Mathieu Lirzin, 2015/09/27
- [Bug-mcron] [PATCH 20/33] build: Enable silent rules by default., Mathieu Lirzin, 2015/09/27
- [Bug-mcron] [PATCH 13/33] main: Turn 'command-name' into a thunk., Mathieu Lirzin, 2015/09/27
- [Bug-mcron] [PATCH 19/33] build: Compile and install '.go' files., Mathieu Lirzin, 2015/09/27
- [Bug-mcron] [PATCH 18/33] main: Add (mcron main) module., Mathieu Lirzin, 2015/09/27
- [Bug-mcron] [PATCH 30/33] Define directory-local variables for Emacs.,
Mathieu Lirzin <=
- [Bug-mcron] [PATCH 31/33] main: Add 'proc-in-directory'., Mathieu Lirzin, 2015/09/27
- [Bug-mcron] [PATCH 32/33] main: Remove 'valid-user'., Mathieu Lirzin, 2015/09/27
- [Bug-mcron] [PATCH 33/33] core: Use SRFI-9 records for the job data structure., Mathieu Lirzin, 2015/09/27