From fefc11a437d0de02f70f261546993c9a775fac4c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gustav=20H=C3=A5llberg?= Date: Fri, 21 May 2010 14:48:19 +0200 Subject: [PATCH] stgit.el: Rearrange customizations a bit MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Move faces to a customization subgroup. Sort customization entries in a more user-friendly way. Signed-off-by: Gustav HÃ¥llberg Signed-off-by: David KÃ¥gedal --- contrib/stgit.el | 95 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 50 insertions(+), 45 deletions(-) diff --git a/contrib/stgit.el b/contrib/stgit.el index 286d7c3..96be091 100644 --- a/contrib/stgit.el +++ b/contrib/stgit.el @@ -34,13 +34,6 @@ reload all StGit buffers." :link '(function-link stgit) :link '(url-link "http://www.procode.org/stgit/")) -(defcustom stgit-abbreviate-copies-and-renames t - "If non-nil, abbreviate copies and renames as \"dir/{old -> new}/file\" -instead of \"dir/old/file -> dir/new/file\"." - :type 'boolean - :group 'stgit - :set 'stgit-set-default) - (defcustom stgit-default-show-worktree t "Set to non-nil to by default show the working tree in a new stgit buffer. @@ -68,6 +61,34 @@ setting in an already-started StGit buffer." :group 'stgit :link '(variable-link stgit-show-ignored)) +(defcustom stgit-default-show-patch-names t + "If non-nil, default to showing patch names in a new stgit buffer. + +Use \\\\[stgit-toggle-patch-names] \ +to toggle the this setting in an already-started StGit buffer." + :type 'boolean + :group 'stgit + :link '(variable-link stgit-show-patch-names)) + +(defcustom stgit-default-show-committed nil + "Set to nil to inhibit showing of historical git commits by default. + +Use \\\\[stgit-toggle-committed] \ +to toggle this setting and to control how many commits are +shown." + :type 'boolean + :group 'stgit + :link '(variable-link stgit-default-committed-count) + :link '(variable-link stgit-show-committed)) + +(defcustom stgit-default-committed-count 5 + "The number of historical commits to show when `stgit-show-committed' +is enabled." + :type 'number + :group 'stgit + :link '(variable-link stgit-default-show-committed) + :link '(variable-link stgit-committed-count)) + (defcustom stgit-default-show-svn t "Set to non-nil to by default show subversion information in a new stgit buffer. @@ -78,6 +99,13 @@ setting in an already-started StGit buffer." :group 'stgit :link '(variable-link stgit-show-worktree)) +(defcustom stgit-abbreviate-copies-and-renames t + "If non-nil, abbreviate copies and renames as \"dir/{old -> new}/file\" +instead of \"dir/old/file -> dir/new/file\"." + :type 'boolean + :group 'stgit + :set 'stgit-set-default) + (defcustom stgit-find-copies-harder nil "Try harder to find copied files when listing patches. @@ -136,33 +164,6 @@ The alternate form is used when the patch name is hidden." :group 'stgit :set 'stgit-set-default) -(defcustom stgit-default-show-committed nil - "Set to nil to inhibit showing of historical git commits by default. - -Use \\\\[stgit-toggle-committed] \ -to toggle this setting and to control how many commits are -shown." - :type 'boolean - :group 'stgit - :link '(variable-link stgit-default-committed-count) - :link '(variable-link stgit-show-committed)) - -(defcustom stgit-default-committed-count 5 - "The number of historical commits to show when `stgit-show-committed' -is enabled." - :type 'number - :link '(variable-link stgit-default-show-committed) - :link '(variable-link stgit-committed-count)) - -(defcustom stgit-default-show-patch-names t - "If non-nil, default to showing patch names in a new stgit buffer. - -Use \\\\[stgit-toggle-patch-names] \ -to toggle the this setting in an already-started StGit buffer." - :type 'boolean - :group 'stgit - :link '(variable-link stgit-show-patch-names)) - (defcustom stgit-file-line-format " %-11s %-2m %n %c" "The format string used to format file lines. The format string is passed to `format-spec' and the following @@ -179,62 +180,66 @@ format characters are recognized: :group 'stgit :set 'stgit-set-default) +(defgroup stgit-faces nil + "Faces for `stgit-mode'." + :group 'stgit) + (defface stgit-branch-name-face '((t :inherit bold)) "The face used for the StGit branch name" - :group 'stgit) + :group 'stgit-faces) (defface stgit-top-patch-face '((((background dark)) (:weight bold :foreground "yellow")) (((background light)) (:weight bold :foreground "purple")) (t (:weight bold))) "The face used for the top patch names" - :group 'stgit) + :group 'stgit-faces) (defface stgit-applied-patch-face '((((background dark)) (:foreground "light yellow")) (((background light)) (:foreground "purple")) (t ())) "The face used for applied patch names" - :group 'stgit) + :group 'stgit-faces) (defface stgit-unapplied-patch-face '((((background dark)) (:foreground "gray80")) (((background light)) (:foreground "orchid")) (t ())) "The face used for unapplied patch names" - :group 'stgit) + :group 'stgit-faces) (defface stgit-committed-patch-face '((((background dark)) (:foreground "gray50")) (((background light)) (:foreground "gray50")) (t ())) "The face used for already committed patch names" - :group 'stgit) + :group 'stgit-faces) (defface stgit-description-face '((((background dark)) (:foreground "tan")) (((background light)) (:foreground "dark red"))) "The face used for StGit descriptions" - :group 'stgit) + :group 'stgit-faces) (defface stgit-index-work-tree-title-face '((((supports :slant italic)) :slant italic) (t :inherit bold)) "StGit mode face used for the \"Index\" and \"Work tree\" titles" - :group 'stgit) + :group 'stgit-faces) (defface stgit-unmerged-file-face '((((class color) (background light)) (:foreground "red" :bold t)) (((class color) (background dark)) (:foreground "red" :bold t))) "StGit mode face used for unmerged file status" - :group 'stgit) + :group 'stgit-faces) (defface stgit-unknown-file-face '((((class color) (background light)) (:foreground "goldenrod" :bold t)) (((class color) (background dark)) (:foreground "goldenrod" :bold t))) "StGit mode face used for unknown file status" - :group 'stgit) + :group 'stgit-faces) (defface stgit-ignored-file-face '((((class color) (background light)) (:foreground "grey60")) @@ -245,13 +250,13 @@ format characters are recognized: '((((class color) (background light)) (:foreground "green" :bold t)) (((class color) (background dark)) (:foreground "green" :bold t))) "StGit mode face used for permission changes." - :group 'stgit) + :group 'stgit-faces) (defface stgit-modified-file-face '((((class color) (background light)) (:foreground "purple")) (((class color) (background dark)) (:foreground "salmon"))) "StGit mode face used for modified file status" - :group 'stgit) + :group 'stgit-faces) (defun stgit (dir) "Manage StGit patches for the tree in DIR. -- 2.11.0