From bc3152a310f033b557c1bcfeb5c65741b34fc09f Mon Sep 17 00:00:00 2001 From: Greg Hendershott Date: Tue, 14 Jul 2015 20:22:08 -0400 Subject: [PATCH] Use .dir-locals.el instead of file variables --- .dir-locals.el | 7 +++++++ cmds.rkt | 8 -------- defn.rkt | 8 -------- error.rkt | 8 -------- find-module-path-completions.rkt | 8 -------- gui.rkt | 8 -------- image.rkt | 8 -------- keywords.rkt | 9 --------- logger.rkt | 8 -------- older-racket.rkt | 8 -------- racket-bug-report.el | 11 ----------- racket-collection.el | 8 -------- racket-common.el | 8 -------- racket-complete.el | 8 -------- racket-custom.el | 8 -------- racket-edit.el | 8 -------- racket-font-lock.el | 8 -------- racket-indent.el | 8 -------- racket-keywords-and-builtins.el | 8 -------- racket-make-doc.el | 8 -------- racket-mode.el | 8 -------- racket-repl.el | 8 -------- racket-tests.el | 8 -------- racket-unicode-input-method.el | 8 -------- racket-util.el | 8 -------- run.rkt | 8 -------- scribble.rkt | 8 -------- try-catch.rkt | 8 -------- util.rkt | 8 -------- 29 files changed, 7 insertions(+), 228 deletions(-) create mode 100644 .dir-locals.el diff --git a/.dir-locals.el b/.dir-locals.el new file mode 100644 index 00000000..dae2e532 --- /dev/null +++ b/.dir-locals.el @@ -0,0 +1,7 @@ +((nil + . ((indent-tabs-mode . nil) + (require-final-newline . t) + (show-trailing-whitespace . t))) + (prog-mode + . ((comment-column . 40) + (fill-column . 78)))) diff --git a/cmds.rkt b/cmds.rkt index 4b623880..a310e4af 100644 --- a/cmds.rkt +++ b/cmds.rkt @@ -743,11 +743,3 @@ (list 'def/uses def-beg def-end tweaked-uses))) ;; Append both lists and print as Elisp values. (elisp-println (append infos defs/uses))))) - -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: diff --git a/defn.rkt b/defn.rkt index a1f0b89a..0d142e71 100644 --- a/defn.rkt +++ b/defn.rkt @@ -262,11 +262,3 @@ (check-equal? (find-definition "display") 'kernel) (check-match (find-definition "displayln") (list* (pregexp "/racket/private/misc\\.rkt$") _))) - -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: diff --git a/error.rkt b/error.rkt index bee64e52..d04e6d77 100644 --- a/error.rkt +++ b/error.rkt @@ -162,11 +162,3 @@ (check-not-exn (λ () (maybe-suggest-packages (exn:fail "" (current-continuation-marks)))))) - -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: diff --git a/find-module-path-completions.rkt b/find-module-path-completions.rkt index bf45032e..0d619c23 100644 --- a/find-module-path-completions.rkt +++ b/find-module-path-completions.rkt @@ -43,11 +43,3 @@ (λ (str) (for ([x (in-list (get str))]) (displayln (path->string (cadr x))))))) - -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: diff --git a/gui.rkt b/gui.rkt index 07678232..d5c3e308 100644 --- a/gui.rkt +++ b/gui.rkt @@ -31,11 +31,3 @@ (define (gui-dyn-req sym) (dynamic-require 'racket/gui/base sym)) - -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: diff --git a/image.rkt b/image.rkt index 34f100d9..e964a90b 100644 --- a/image.rkt +++ b/image.rkt @@ -24,11 +24,3 @@ (define (convert-image v) (cond [(and (convertible? v) (convert v 'png-bytes)) => save-temporary-image] [else v])) - -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: diff --git a/keywords.rkt b/keywords.rkt index bccf6eb9..7d302e9d 100644 --- a/keywords.rkt +++ b/keywords.rkt @@ -96,12 +96,3 @@ ;; (prn builtins1) ;; (prn builtins2) ;; (prn types) - - -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: diff --git a/logger.rkt b/logger.rkt index 0c2f12b8..d96efacf 100644 --- a/logger.rkt +++ b/logger.rkt @@ -83,11 +83,3 @@ ",log default -- set logger to use the default, 'all other' level." ",log -- set the default level, for 'all other' loggers.\n") "\n; "))])) - -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: diff --git a/older-racket.rkt b/older-racket.rkt index e3a35a5b..c3ecdcb5 100644 --- a/older-racket.rkt +++ b/older-racket.rkt @@ -80,11 +80,3 @@ (define hash-clear! (dynamic-require 'racket/base 'hash-clear! (const our-hash-clear!))) - -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: diff --git a/racket-bug-report.el b/racket-bug-report.el index 4886ddad..b9b5d1bd 100644 --- a/racket-bug-report.el +++ b/racket-bug-report.el @@ -69,17 +69,6 @@ (pp `(disabled-minor-modes ,@(mapcar #'f (cl-remove-if #'cadr sorted)))))) (princ "```\n")))) -(defun racket-bug-report--val (id) -) - (provide 'racket-bug-report) -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: - ;;; racket-bug-report.el ends here diff --git a/racket-collection.el b/racket-collection.el index 3cf3b8a7..8ea79f0f 100644 --- a/racket-collection.el +++ b/racket-collection.el @@ -323,12 +323,4 @@ Also constrain point in case user tried to navigate past (provide 'racket-collection) -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: - ;; racket-collection.el ends here diff --git a/racket-common.el b/racket-common.el index 7ba51b0c..d9dadae3 100644 --- a/racket-common.el +++ b/racket-common.el @@ -522,12 +522,4 @@ existence using `fboundp'." (provide 'racket-common) -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: - ;; racket-common.el ends here diff --git a/racket-complete.el b/racket-complete.el index e900f898..a6f43f25 100644 --- a/racket-complete.el +++ b/racket-complete.el @@ -156,12 +156,4 @@ See `racket--invalidate-completion-cache' and (provide 'racket-complete) -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: - ;; racket-complete.el ends here diff --git a/racket-custom.el b/racket-custom.el index 3aa55d94..3e2fa28e 100644 --- a/racket-custom.el +++ b/racket-custom.el @@ -245,14 +245,6 @@ Instead you can insert actual λ characters using :tag "Selfeval Face" :group 'racket-faces) -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: - (provide 'racket-custom) ;; racket-custom.el ends here diff --git a/racket-edit.el b/racket-edit.el index 9187c786..90ed0338 100644 --- a/racket-edit.el +++ b/racket-edit.el @@ -1006,12 +1006,4 @@ containing spaces by escaping them." (provide 'racket-edit) -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: - ;; racket-edit.el ends here diff --git a/racket-font-lock.el b/racket-font-lock.el index be6a07cf..dfa0baa0 100644 --- a/racket-font-lock.el +++ b/racket-font-lock.el @@ -267,12 +267,4 @@ Needed to support let, because we need the whole form (if any)." (provide 'racket-font-lock) -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: - ;; racket-font-lock.el ends here diff --git a/racket-indent.el b/racket-indent.el index c3d99433..0c00ec63 100644 --- a/racket-indent.el +++ b/racket-indent.el @@ -453,12 +453,4 @@ doesn't hurt to do so." (provide 'racket-indent) -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: - ;; racket-indent.el ends here diff --git a/racket-keywords-and-builtins.el b/racket-keywords-and-builtins.el index d8e0335e..bdad8e91 100644 --- a/racket-keywords-and-builtins.el +++ b/racket-keywords-and-builtins.el @@ -2666,12 +2666,4 @@ (provide 'racket-keywords-and-builtins) -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: - ;; racket-keywords-and-builtins.el ends here diff --git a/racket-make-doc.el b/racket-make-doc.el index 994a35a5..c535cac9 100644 --- a/racket-make-doc.el +++ b/racket-make-doc.el @@ -243,12 +243,4 @@ nil nil))) (buffer-substring-no-properties (point-min) (point-max)))) -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: - ;;; racket-make-doc.el ends here diff --git a/racket-mode.el b/racket-mode.el index 95d0bf39..c0c3bf8e 100644 --- a/racket-mode.el +++ b/racket-mode.el @@ -185,12 +185,4 @@ http://www.gnu.org/licenses/ for details.") (provide 'racket-mode) -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: - ;;; racket-mode.el ends here diff --git a/racket-repl.el b/racket-repl.el index 9221d5c0..b8b1115f 100644 --- a/racket-repl.el +++ b/racket-repl.el @@ -459,12 +459,4 @@ With prefix arg, open the N-th last shown image." (provide 'racket-repl) -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: - ;; racket-repl.el ends here diff --git a/racket-tests.el b/racket-tests.el index f5e8eb2e..3e240077 100644 --- a/racket-tests.el +++ b/racket-tests.el @@ -133,12 +133,4 @@ special forms it handles." (provide 'racket-tests) -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: - ;;; racket-tests.el ends here diff --git a/racket-unicode-input-method.el b/racket-unicode-input-method.el index 5525d384..888cf777 100644 --- a/racket-unicode-input-method.el +++ b/racket-unicode-input-method.el @@ -219,12 +219,4 @@ can turn it off by setting `input-method-highlight-flag' to nil via (provide 'racket-unicode-input-method) -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: - ;;; racket-unicode-input-method.el ends here diff --git a/racket-util.el b/racket-util.el index 350f0ea1..fd2ff68e 100644 --- a/racket-util.el +++ b/racket-util.el @@ -84,12 +84,4 @@ strings." (provide 'racket-util) -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: - ;; racket-util.el ends here diff --git a/run.rkt b/run.rkt index 52443d36..d2014aeb 100644 --- a/run.rkt +++ b/run.rkt @@ -208,11 +208,3 @@ (λ (value display? port) (cond [(convert? value) (print (convert value) port)] [else (orig value display? port)])))) - -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: diff --git a/scribble.rkt b/scribble.rkt index bcd7cb7f..c2c0eec5 100644 --- a/scribble.rkt +++ b/scribble.rkt @@ -157,11 +157,3 @@ 'nbsp ,@provide-xexprs) ,@xs)])) - -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: diff --git a/try-catch.rkt b/try-catch.rkt index 33f19364..bfc76a14 100644 --- a/try-catch.rkt +++ b/try-catch.rkt @@ -15,11 +15,3 @@ [(_ body:expr ...+ catch:catch-clause ...+) #'(with-handlers (catch.handler ...) body ...)])) - -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: diff --git a/util.rkt b/util.rkt index 9bff2211..a3462faa 100644 --- a/util.rkt +++ b/util.rkt @@ -15,11 +15,3 @@ [(_ ([lib:id id:id] ...+) body:expr ...+) #'(let ([id (dynamic-require 'lib 'id)] ...) body ...)])) - -;; Local Variables: -;; coding: utf-8 -;; comment-column: 40 -;; indent-tabs-mode: nil -;; require-final-newline: t -;; show-trailing-whitespace: t -;; End: