So that I don't look like I'm always submitting bugs, here's a vc
suggestion. ;)
I submitted this patch to the regular xemacs mailing list, but didn't hear
anything. In any case, I find this useful. It highlights the RCS/CVS text
in the modeline if the file is checked out. Much easier to detect a
changed file instead of looking for a "-" vs. a ":" in the modeline.
It's currently defined as a defadvice.
Thanks,
Albert
(when xemacs-p
(defvar vc-mode-ext (detach-extent (make-extent 0 0 "")))
(set-extent-face vc-mode-ext 'highlight)
(defadvice vc-mode-line (after highlight activate)
"highlight CVS/RCS tag if file is modified locally"
(let* ((str vc-mode)
(hdr "^ \\(CVS\\|RCS\\)")
(locked-hdr (concat hdr "-")))
(when (and str ;; initial version may start with nil
(string-match hdr str)
(not (string-match locked-hdr str)))
(let ((substr (substring str 1)))
;; normally modeline displays whatever is in the minor-mode-alist,
;; indexed by mode. The cdr can be either a string or (extent
;; . str) or a list of them. vc-mode is normally set to a string.
;; Change the variable to specify an extent, preceded by a regular
;; space
(setq vc-mode (list " " (cons vc-mode-ext substr)))))))
)
Show replies by date
|--==> "ALT" == Albert L Ting <alt(a)artisan.com> writes:
ALT> So that I don't look like I'm always submitting bugs, here's a vc
ALT> suggestion. ;)
ALT> I submitted this patch to the regular xemacs mailing list, but didn't hear
ALT> anything. In any case, I find this useful. It highlights the RCS/CVS text
ALT> in the modeline if the file is checked out. Much easier to detect a
ALT> changed file instead of looking for a "-" vs. a ":" in the
modeline.
Hi Albert,
Sorry for taking so long to reply. I'll have a look at this after the
next SUMO is out the door (currently in Pre-Releases).
--
|---<Steve Youngs>---------------<GnuPG KeyID: 9E7E2820>---|
| XEmacs - It's not just an editor. |
| It's a way of life. |
|------------------------------------<youngs(a)xemacs.org>---|