git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0] A few improvements to Emacs interface to Git
@ 2006-07-13 20:15 Jakub Narebski
  2006-07-13 20:22 ` [PATCH 1] Wrap long lines in docstrings in contrib/emacs/git.el Jakub Narebski
  2006-07-13 20:22 ` [PATCH 2] Display help for Git mode after pressing `h' or `?' in *git-status* Jakub Narebski
  0 siblings, 2 replies; 3+ messages in thread
From: Jakub Narebski @ 2006-07-13 20:15 UTC (permalink / raw)
  To: git

This series of patches introduces a few minor improvements to
Emacs interface to Git.

-- 
Jakub Narebski

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1] Wrap long lines in docstrings in contrib/emacs/git.el
  2006-07-13 20:15 [PATCH 0] A few improvements to Emacs interface to Git Jakub Narebski
@ 2006-07-13 20:22 ` Jakub Narebski
  2006-07-13 20:22 ` [PATCH 2] Display help for Git mode after pressing `h' or `?' in *git-status* Jakub Narebski
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Narebski @ 2006-07-13 20:22 UTC (permalink / raw)
  To: git; +Cc: Jakub Narebski

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
 contrib/emacs/git.el |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
index ebd00ef..83a845d 100644
--- a/contrib/emacs/git.el
+++ b/contrib/emacs/git.el
@@ -59,14 +59,16 @@ (defgroup git nil
 
 (defcustom git-committer-name nil
   "User name to use for commits.
-The default is to fall back to the repository config, then to `add-log-full-name' and then to `user-full-name'."
+The default is to fall back to the repository config,
+then to `add-log-full-name' and then to `user-full-name'."
   :group 'git
   :type '(choice (const :tag "Default" nil)
                  (string :tag "Name")))
 
 (defcustom git-committer-email nil
   "Email address to use for commits.
-The default is to fall back to the git repository config, then to `add-log-mailing-address' and then to `user-mail-address'."
+The default is to fall back to the git repository config,
+then to `add-log-mailing-address' and then to `user-mail-address'."
   :group 'git
   :type '(choice (const :tag "Default" nil)
                  (string :tag "Email")))
@@ -86,6 +88,7 @@ (defcustom git-per-dir-ignore-file ".git
   :group 'git
   :type 'string)
 
+
 (defface git-status-face
   '((((class color) (background light)) (:foreground "purple")))
   "Git mode face used to highlight added and modified files."
@@ -149,7 +152,8 @@ (defun git-call-process-env (buffer env 
     (apply #'call-process "git" nil buffer nil args)))
 
 (defun git-call-process-env-string (env &rest args)
-  "Wrapper for call-process that sets environment strings, and returns the process output as a string."
+  "Wrapper for call-process that sets environment strings,
+and returns the process output as a string."
   (with-temp-buffer
     (and (eq 0 (apply #' git-call-process-env t env args))
          (buffer-string))))
-- 
1.4.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2] Display help for Git mode after pressing `h' or `?' in *git-status*
  2006-07-13 20:15 [PATCH 0] A few improvements to Emacs interface to Git Jakub Narebski
  2006-07-13 20:22 ` [PATCH 1] Wrap long lines in docstrings in contrib/emacs/git.el Jakub Narebski
@ 2006-07-13 20:22 ` Jakub Narebski
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Narebski @ 2006-07-13 20:22 UTC (permalink / raw)
  To: git; +Cc: Jakub Narebski

Add bindings for "h" and "?" in git-status-mode to display help about the mode,
including keymap via (describe-function 'git-status-mode), like in PCL-CVS.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
 contrib/emacs/git.el |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
index 83a845d..34c9950 100644
--- a/contrib/emacs/git.el
+++ b/contrib/emacs/git.el
@@ -943,6 +943,8 @@ (unless git-status-mode-map
   (let ((map (make-keymap))
         (diff-map (make-sparse-keymap)))
     (suppress-keymap map)
+    (define-key map "?"   'git-help)
+    (define-key map "h"   'git-help)
     (define-key map " "   'git-next-file)
     (define-key map "a"   'git-add-file)
     (define-key map "c"   'git-commit-file)
@@ -1012,5 +1014,10 @@ (defun git-status (dir)
         (goto-char (point-min)))
     (message "%s is not a git working tree." dir)))
 
+(defun git-help ()
+  "Display help for Git mode."
+  (interactive)
+  (describe-function 'git-status-mode))
+
 (provide 'git)
 ;;; git.el ends here
-- 
1.4.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-07-13 20:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-13 20:15 [PATCH 0] A few improvements to Emacs interface to Git Jakub Narebski
2006-07-13 20:22 ` [PATCH 1] Wrap long lines in docstrings in contrib/emacs/git.el Jakub Narebski
2006-07-13 20:22 ` [PATCH 2] Display help for Git mode after pressing `h' or `?' in *git-status* Jakub Narebski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).