all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org
Subject: Re: Small enhancement for add-log.el
Date: Tue, 12 Oct 2004 00:23:13 +0200	[thread overview]
Message-ID: <m3mzysj3n2.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <200410081301.i98D1qI13495@raven.dms.auburn.edu> (Luc Teirlinck's message of "Fri, 8 Oct 2004 08:01:52 -0500 (CDT)")

Luc Teirlinck <teirllm@dms.auburn.edu> writes:

> If you want to visit a buffer in View mode,
> just visit it in View mode.  Again, I believe that the only problem is
> that there is something in the pcl-cvs interface that you do not like.

Ok, I agree that my proposal is not desireable.

What about the following patch to pcl-cvs that adds a "v" command in cvs-mode
(for cvs-mode-view-file):

Index: lisp/pcvs-defs.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/pcvs-defs.el,v
retrieving revision 1.28
diff -u -r1.28 pcvs-defs.el
--- lisp/pcvs-defs.el	11 Oct 2004 14:58:54 -0000	1.28
+++ lisp/pcvs-defs.el	11 Oct 2004 22:15:32 -0000
@@ -374,7 +374,7 @@
     ("r" .	cvs-mode-remove)
     ("s" .	cvs-mode-status)
     ("t" .	cvs-mode-tag)
-    ;;("v" .	cvs-mode-diff-vendor)
+    ("v" .	cvs-mode-view-file)
     ("x" .	cvs-mode-remove-handled)
     ;; cvstree bindings
     ("+" .	cvs-mode-tree)

Index: lisp/pcvs.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/pcvs.el,v
retrieving revision 1.71
diff -u -r1.71 pcvs.el
--- lisp/pcvs.el	2 Jul 2004 04:32:54 -0000	1.71
+++ lisp/pcvs.el	11 Oct 2004 22:21:34 -0000
@@ -1925,6 +1925,18 @@
   (cvs-mode-find-file e 'dont-select))
 
 
+(defun cvs-mode-view-file (e)
+  "View the file."
+  (interactive (list last-input-event))
+  (cvs-mode-find-file e nil t))
+
+
+(defun cvs-mode-view-file-other-window (e)
+  "View the file."
+  (interactive (list last-input-event))
+  (cvs-mode-find-file e t t))
+
+
 (defun cvs-find-modif (fi)
   (with-temp-buffer
     (call-process cvs-program nil (current-buffer) nil
@@ -1935,7 +1947,7 @@
       1)))
 
 
-(defun cvs-mode-find-file (e &optional other)
+(defun cvs-mode-find-file (e &optional other view)
   "Select a buffer containing the file.
 With a prefix, opens the buffer in an OTHER window."
   (interactive (list last-input-event current-prefix-arg))
@@ -1968,6 +1980,8 @@
 		    buf)
 	   (when (and cvs-find-file-and-jump (cvs-applicable-p fi 'diff-base))
 	     (goto-line (cvs-find-modif fi)))
+	   (when view
+	     (view-mode 1))
 	   buf))))))
 
 

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

  parent reply	other threads:[~2004-10-11 22:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-07 22:06 Small enhancement for add-log.el Kim F. Storm
2004-10-07 22:21 ` David Kastrup
2004-10-07 23:00   ` Kim F. Storm
2004-10-08 12:25     ` Kai Grossjohann
2004-10-07 23:07 ` Luc Teirlinck
2004-10-08  8:54   ` Kim F. Storm
2004-10-08 13:01     ` Luc Teirlinck
2004-10-08 13:44       ` Kim F. Storm
2004-10-08 22:45         ` Luc Teirlinck
2004-10-11 22:23       ` Kim F. Storm [this message]
2004-10-12 14:28         ` Juri Linkov
2004-10-12 14:40         ` Stefan Monnier
2004-10-08 13:19     ` Stefan
2004-10-08 13:54       ` Kim F. Storm
2004-10-09 15:44 ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3mzysj3n2.fsf@kfs-l.imdomain.dk \
    --to=storm@cua.dk \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.