unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#6083: Regression bug in auto-coding-alist
@ 2010-05-03  0:34 Juri Linkov
  2010-05-03  2:02 ` Chong Yidong
  0 siblings, 1 reply; 2+ messages in thread
From: Juri Linkov @ 2010-05-03  0:34 UTC (permalink / raw)
  To: 6083

I just discovered a regression bug wrt 23.1.

Loading arc-mode fails.

Arc-mode is a mode for the programming language Arc,
not for file archives.

It contains the following code to remove `no-conversion' associated with
the .arc extension from `auto-coding-alist' because there is a file
extension clash between Arc the programming language and file archives:

  ;; By default, Emacs thinks .arc is an archive extension.
  ;; This makes it normal.
  (dolist (coding auto-coding-alist)
    (when (and (string-match "[Aa][Rr][Cc]\\\\|" (car coding))
               (or (eq (cdr coding) 'no-conversion)
                   (eq (cdr coding) 'no-conversion-multibyte)))
      (setcar coding (replace-match "" nil nil (car coding)))))

This code fails with

  (error "Attempt to modify read-only object")

A similar bug#4917 http://debbugs.gnu.org/4917
for `auto-coding-regexp-alist' was fixed 2009-11-13
by using purecopy only for car or each item,
not the whole list.

To make the code above to not fail, purecopy should be removed
from `auto-coding-alist'.

-- 
Juri Linkov
http://www.jurta.org/emacs/







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

* bug#6083: Regression bug in auto-coding-alist
  2010-05-03  0:34 bug#6083: Regression bug in auto-coding-alist Juri Linkov
@ 2010-05-03  2:02 ` Chong Yidong
  0 siblings, 0 replies; 2+ messages in thread
From: Chong Yidong @ 2010-05-03  2:02 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 6083-done

Juri Linkov <juri@jurta.org> writes:

>   ;; By default, Emacs thinks .arc is an archive extension.
>   ;; This makes it normal.
>   (dolist (coding auto-coding-alist)
>     (when (and (string-match "[Aa][Rr][Cc]\\\\|" (car coding))
>                (or (eq (cdr coding) 'no-conversion)
>                    (eq (cdr coding) 'no-conversion-multibyte)))
>       (setcar coding (replace-match "" nil nil (car coding)))))
>
> This code fails with
>
>   (error "Attempt to modify read-only object")
>
> A similar bug#4917 http://debbugs.gnu.org/4917
> for `auto-coding-regexp-alist' was fixed 2009-11-13
> by using purecopy only for car or each item,
> not the whole list.
>
> To make the code above to not fail, purecopy should be removed
> from `auto-coding-alist'.

Thanks, I've fixed it in the branch.






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

end of thread, other threads:[~2010-05-03  2:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-03  0:34 bug#6083: Regression bug in auto-coding-alist Juri Linkov
2010-05-03  2:02 ` Chong Yidong

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).