From a0689e114cdccceedc366e1bfa5be00ad62b2a31 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gustav=20H=C3=A5llberg?= Date: Tue, 13 Apr 2010 11:33:15 +0200 Subject: [PATCH] stgit.el: Refactor: use mapc to set all local variables in stgit-mode MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Gustav HÃ¥llberg --- contrib/stgit.el | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/contrib/stgit.el b/contrib/stgit.el index dd3c92b..4843f1e 100644 --- a/contrib/stgit.el +++ b/contrib/stgit.el @@ -1261,17 +1261,17 @@ See also \\[customize-group] for the \"stgit\" group." major-mode 'stgit-mode goal-column 2) (use-local-map stgit-mode-map) - (set (make-local-variable 'list-buffers-directory) default-directory) - (set (make-local-variable 'stgit-marked-patches) nil) - (set (make-local-variable 'stgit-expanded-patches) (list :work :index)) - (set (make-local-variable 'stgit-show-patch-names) - stgit-default-show-patch-names) - (set (make-local-variable 'stgit-show-worktree) stgit-default-show-worktree) - (set (make-local-variable 'stgit-show-ignored) stgit-default-show-ignored) - (set (make-local-variable 'stgit-show-unknown) stgit-default-show-unknown) - (set (make-local-variable 'stgit-index-node) nil) - (set (make-local-variable 'stgit-worktree-node) nil) - (set (make-local-variable 'parse-sexp-lookup-properties) t) + (mapc (lambda (x) (set (make-local-variable (car x)) (cdr x))) + `((list-buffers-directory . ,default-directory) + (parse-sexp-lookup-properties . t) + (stgit-expanded-patches . (:work :index)) + (stgit-index-node . nil) + (stgit-worktree-node . nil) + (stgit-marked-patches . nil) + (stgit-show-ignored . ,stgit-default-show-ignored) + (stgit-show-patch-names . ,stgit-default-show-patch-names) + (stgit-show-unknown . ,stgit-default-show-unknown) + (stgit-show-worktree . ,stgit-default-show-worktree))) (set-variable 'truncate-lines 't) (add-hook 'after-save-hook 'stgit-update-stgit-for-buffer) (unless stgit-did-advise -- 2.11.0