[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/nix-mode e898255861 006/500: Use setq-local everywhere
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/nix-mode e898255861 006/500: Use setq-local everywhere |
Date: |
Sat, 29 Jan 2022 08:26:22 -0500 (EST) |
branch: elpa/nix-mode
commit e89825586165639fa4354d037f01542f7a4319f7
Author: Matthew Justin Bauer <mjbauer95@gmail.com>
Commit: GitHub <noreply@github.com>
Use setq-local everywhere
Make everything consistent, also provide backup function for <= 24.2.
---
nix-mode.el | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/nix-mode.el b/nix-mode.el
index 88c2cebcbc..dd8bc3e6d5 100644
--- a/nix-mode.el
+++ b/nix-mode.el
@@ -15,6 +15,12 @@
;;; Code:
+;; Emacs 24.2 compatability
+(unless (fboundp 'setq-local)
+ (defmacro setq-local (var val)
+ "Set variable VAR to value VAL in current buffer."
+ `(set (make-local-variable ',var) ,val)))
+
(defun nix-syntax-match-antiquote (limit)
(let ((pos (next-single-char-property-change (point) 'nix-syntax-antiquote
nil limit)))
@@ -166,17 +172,17 @@ The hook `nix-mode-hook' is run when Nix mode is started.
(setq-local parse-sexp-lookup-properties t)
;; Automatic indentation [C-j].
- (set (make-local-variable 'indent-line-function) 'nix-indent-line)
+ (setq-local indent-line-function 'nix-indent-line)
;; Indenting of comments.
- (set (make-local-variable 'comment-start) "# ")
- (set (make-local-variable 'comment-end) "")
- (set (make-local-variable 'comment-start-skip) "\\(^\\|\\s-\\);?#+ *")
+ (setq-local comment-start "# ")
+ (setq-local comment-end "")
+ (setq-local comment-start-skip "\\(^\\|\\s-\\);?#+ *")
;; Filling of comments.
- (set (make-local-variable 'adaptive-fill-mode) t)
- (set (make-local-variable 'paragraph-start) "[ \t]*\\(#+[ \t]*\\)?$")
- (set (make-local-variable 'paragraph-separate) paragraph-start))
+ (setq-local adaptive-fill-mode t)
+ (setq-local paragraph-start "[ \t]*\\(#+[ \t]*\\)?$")
+ (setq-local paragraph-separate paragraph-start))
;;;###autoload
- [nongnu] branch elpa/nix-mode created (now 00b2b8da57), ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode e898255861 006/500: Use setq-local everywhere,
ELPA Syncer <=
- [nongnu] elpa/nix-mode 14c3476ba9 020/500: Custom line indenter., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode b4b7edb246 012/500: Move some builtins to warnings., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 22500b7f72 038/500: fix tabbing, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode d8b088a4e2 034/500: Disable string indenting again, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 3ad8e224d7 043/500: Use looking-back for hanging indent., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode ec9cf2f4e5 061/500: Remove nix-syntax-propertize-escaped-antiquote., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode c339fc9062 072/500: More small nitpicks., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 1cc3cffa29 060/500: Pick up extra "let" found in acme.nix., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 1772d1f0db 077/500: Fixup syntax entry., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode fa7a4a0d4d 078/500: Update README.md, ELPA Syncer, 2022/01/29