unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5910: vc-hooks enhancement request: highlight checkouts
@ 2010-04-08 19:37 Albert Ting
  2020-09-19 21:38 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Albert Ting @ 2010-04-08 19:37 UTC (permalink / raw)
  To: 5910

[-- Attachment #1: Type: text/plain, Size: 1911 bytes --]

In GNU Emacs 21.3.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2003-04-21 on l-sftwr-2236
configured using `configure  --prefix=/home/vtools/apps/emacs-21.3'
Important settings:
  value of $LC_ALL: POSIX
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: C
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

I posted this earlier but didn't see it get received.  So apologies if this
is a repeat.

In any case, I'd like to quest the vc auto-highlight any files that have
been modified/checkout in the vc-mode-line.  XEmacs supports this and below
is a patch to make it work in Emacs.

Thanks,
Albert

--- vc-hooks.el~    2010-04-08 12:33:24.016321000 -0700
+++ vc-hooks.el    2010-03-30 08:06:06.570204000 -0700
@@ -772,7 +772,10 @@
   (if (not backend)
       (setq vc-mode nil)
     (let* ((ml-string (vc-call-backend backend 'mode-line-string file))
-       (ml-echo (get-text-property 0 'help-echo ml-string)))
+       (ml-echo (get-text-property 0 'help-echo ml-string))
+       (test-str "^\\(RCS\\|CVS\\|SVN\\|SCCS\\|Arch\\|MCVS\\|GIT\\):")
+       (locked (string-match test-str ml-string))
+       )
       (setq vc-mode
         (concat
          " "
@@ -781,6 +784,7 @@
            (propertize
         ml-string
         'mouse-face 'mode-line-highlight
+        'face (if locked 'highlight 'mode-line)
         'help-echo
         (concat (or ml-echo
                 (format "File under the %s version control system"



Recent messages:
Loading completion...done
Loading advice...done
Loading cl-seq...done
done loading .emacs
For information about the GNU Project and its goals, type C-h C-p.
Loading cl-macs...done
Loading emacsbug...done

[-- Attachment #2: Type: text/html, Size: 2207 bytes --]

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

* bug#5910: vc-hooks enhancement request: highlight checkouts
  2010-04-08 19:37 bug#5910: vc-hooks enhancement request: highlight checkouts Albert Ting
@ 2020-09-19 21:38 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-19 21:38 UTC (permalink / raw)
  To: Albert Ting; +Cc: 5910

Albert Ting <altlist@gmail.com> writes:

> In any case, I'd like to quest the vc auto-highlight any files that have been
> modified/checkout in the vc-mode-line.  XEmacs supports this and below is a patch
> to make it work in Emacs.
>
> Thanks,
> Albert
>
> --- vc-hooks.el~    2010-04-08 12:33:24.016321000 -0700
> +++ vc-hooks.el    2010-03-30 08:06:06.570204000 -0700
> @@ -772,7 +772,10 @@
>    (if (not backend)
>        (setq vc-mode nil)
>      (let* ((ml-string (vc-call-backend backend 'mode-line-string file))
> -       (ml-echo (get-text-property 0 'help-echo ml-string)))
> +       (ml-echo (get-text-property 0 'help-echo ml-string))
> +       (test-str "^\\(RCS\\|CVS\\|SVN\\|SCCS\\|Arch\\|MCVS\\|GIT\\):")
> +       (locked (string-match test-str ml-string))

This patch unfortunately got no attention when it was posted ten years
ago.

I see that this has been fixed over the years in a different way --
vc-up-to-date-state (etc) is added by the vc-*-mode-line-string backend
functions themselves, so I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2020-09-19 21:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-08 19:37 bug#5910: vc-hooks enhancement request: highlight checkouts Albert Ting
2020-09-19 21:38 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).