unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ivan Shmakov <ivan@siamics.net>
To: 18034@debbugs.gnu.org
Subject: bug#18034: toggle-read-only used in the code
Date: Tue, 15 Jul 2014 18:44:28 +0000	[thread overview]
Message-ID: <87tx6h2w43.fsf@violet.siamics.net> (raw)

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

Package:  emacs
Severity: minor

	Even though toggle-read-only was marked as obsolete back in
	2012, there’re still a handful of references to it remaining in
	the code, most notably in vc/*.el.  Consider, e. g.:

$ find lisp/ -type f -name \*.el \
      -exec gawk 'FILENAME ~ /\<files\.el$/ || /^\s*[;"]|"$/ { next; }
                  /[^-[:alnum:]]toggle-read-only\>/ {
                      print FILENAME ":" FNR ":\t" $0;
                  }' {} + 
lisp/dired.el:1553:	    (define-key map [remap toggle-read-only] 'dired-toggle-read-only)
lisp/progmodes/hideif.el:192:	     'toggle-read-only 'hide-ifdef-toggle-outside-read-only map)
lisp/vc/vc-hooks.el:637:	  'vc-toggle-read-only 'toggle-read-only "24.1")
lisp/vc/ediff-init.el:1349:	(defvar ediff-toggle-read-only-function 'toggle-read-only
lisp/vc/ediff-util.el:1030:					   'toggle-read-only)
lisp/vc/ediff-util.el:1031:					  (file-writable 'toggle-read-only)
lisp/vc/ediff-util.el:1042:			   (setq toggle-ro-cmd 'toggle-read-only))
lisp/vc/ediff-util.el:1057:			   (setq toggle-ro-cmd 'toggle-read-only)
lisp/vc/ediff-util.el:1063:			 (string-match "toggle-read-only" (symbol-name toggle-ro-cmd)))
$ 

	For one thing, typing A or B in when using Ediff results in the
	respective message:

`toggle-read-only' is an obsolete command (as of 24.3); use `read-only-mode' instead.

	I suggest these be replaced with read-only-mode as appropriate.

	TIA.

-- 
FSF associate member #7257	http://boycottsystemd.org/

[-- Attachment #2: Type: text/plain, Size: 482 bytes --]

commit e7b7bf65b489c5890c4f64245769b8dc5c7fd916
Author:     Stefan Monnier <monnier@iro.umontreal.ca>
AuthorDate: Wed Aug 29 11:11:51 2012 -0400

    * lisp/files.el (read-only-mode): New minor mode.
    (toggle-read-only): Use it and mark obsolete.
    (find-file--read-only):
    * lisp/vc/vc.el (vc-next-action, vc-checkout):
    * lisp/vc/vc-cvs.el (vc-cvs-checkout):
    * lisp/obsolete/vc-mcvs.el (vc-mcvs-update):
    * lisp/ffap.el (ffap--toggle-read-only): Update callers.

             reply	other threads:[~2014-07-15 18:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-15 18:44 Ivan Shmakov [this message]
2016-06-26  5:40 ` bug#18034: Bug #18034: toggle-read-only used in the code Noam Postavsky

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87tx6h2w43.fsf@violet.siamics.net \
    --to=ivan@siamics.net \
    --cc=18034@debbugs.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 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).