bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: VC key bindings not documented in mode help


From: Kevin Rodgers
Subject: Re: VC key bindings not documented in mode help
Date: Thu, 07 Jun 2001 12:24:16 -0600

era eriksson wrote:
> When you press C-h m in a buffer which is under version control via
> VC, there is no documentation for the C-x v something keys in the mode
> help.
...
> Since VC is a bit tricky in comparison with other minor modes, I'm not
> sure if it's possible to somehow get this documentation into C-h m
> mode help painlessly, but at the very least, the function vc-mode
> could be defined solely because it's a more likely place for people to
> look.

Here's an initial attempt:

(defun vc-mode (&optional arg)
  "*Toggle VC (Version Control) mode.
With prefix ARG, turn VC mode on if and only if ARG is positive.

`C-x v' is the prefix key for the following commands:
\\{vc-prefix-map}"
  (interactive "P")
  (if (or (and (null arg) (not vc-mode)) ; toggle on
          (> (prefix-numeric-value arg) 0)) ; turn on
      ;; Turn VC on:
      (if buffer-file-name
          (if (file-exists-p buffer-file-name)
              (vc-find-file-hook)
            (vc-file-not-found-hook))
        (setq vc-mode " VC"))
    ;; Turn VC off:
    (progn
      (if buffer-file-name
          (vc-file-clearprops buffer-file-name))
      (setq vc-mode nil))))

-- 
Kevin Rodgers <kevinr@ihs.com>          Lead Software Engineer
Information Handling Services           Electronic Systems Development
15 Inverness Way East, M/S A114         GO BUFFS!
Englewood CO 80112-5776 USA             1+ (303) 397-2807[voice]/705-4258[fax]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]