GNU bug report logs -
#18034
toggle-read-only used in the code
Previous Next
Reported by: Ivan Shmakov <ivan <at> siamics.net>
Date: Wed, 16 Jul 2014 14:55:02 UTC
Severity: minor
Fixed in version 25.0.94
Done: Noam Postavsky <npostavs <at> users.sourceforge.net>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18034 in the body.
You can then email your comments to 18034 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18034
; Package
emacs
.
(Wed, 16 Jul 2014 14:55:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Ivan Shmakov <ivan <at> siamics.net>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 16 Jul 2014 14:55:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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/
[Message part 2 (text/plain, inline)]
commit e7b7bf65b489c5890c4f64245769b8dc5c7fd916
Author: Stefan Monnier <monnier <at> 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.
bug Marked as fixed in versions 25.0.94.
Request was from
Noam Postavsky <npostavs <at> users.sourceforge.net>
to
control <at> debbugs.gnu.org
.
(Thu, 02 Jun 2016 18:05:01 GMT)
Full text and
rfc822 format available.
Reply sent
to
Noam Postavsky <npostavs <at> users.sourceforge.net>
:
You have taken responsibility.
(Sun, 26 Jun 2016 05:41:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Ivan Shmakov <ivan <at> siamics.net>
:
bug acknowledged by developer.
(Sun, 26 Jun 2016 05:41:02 GMT)
Full text and
rfc822 format available.
Message #12 received at 18034-done <at> debbugs.gnu.org (full text, mbox):
# I accidentally marked 18034 fixed due to typo but I meant 18039
fixed 18039 25.0.94
quit
However, this bug is fixed as well. I ran the find+gawk expression
against emacs-25 sources, only 3 occurences left, and they are
acceptable uses kept for backwards compat reasons. I've added context
to each hit:
~/src/emacs$ find emacs-25/lisp/ -type f -name \*.el -exec gawk
'FILENAME ~ /\<files\.el$/ || /^\s*[;"]|"$/ { next; }
/[^-[:alnum:]]toggle-read-only\>/ {
print FILENAME ":" FNR ":\t" $0;
}' {} +
;; toggle-read-only is obsolete since 24.3, but since vc-t-r-o was made
;; obsolete earlier, it is ok for the latter to be an alias to the former,
;; since the latter will be removed first. We can't just make it
;; an alias for read-only-mode, since that is not 100% the same.
emacs-25/lisp/vc/vc-hooks.el:573: (defalias 'vc-toggle-read-only
'toggle-read-only)
(substitute-key-definition
'read-only-mode 'hide-ifdef-toggle-outside-read-only map)
;; `toggle-read-only' is obsoleted by `read-only-mode'.
(substitute-key-definition
emacs-25/lisp/progmodes/hideif.el:195: 'toggle-read-only
'hide-ifdef-toggle-outside-read-only map)
(define-key map [remap read-only-mode] 'dired-toggle-read-only)
;; `toggle-read-only' is an obsolete alias for `read-only-mode'
emacs-25/lisp/dired.el:1561: (define-key map [remap
toggle-read-only] 'dired-toggle-read-only)
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 24 Jul 2016 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 336 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.