bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18205: Obsolete patterns in auto-mode-alist


From: Reuben Thomas
Subject: bug#18205: Obsolete patterns in auto-mode-alist
Date: Wed, 6 Aug 2014 23:05:33 +0100

On 6 August 2014 19:01, Eli Zaretskii <address@hidden> wrote:
> Date: Wed, 6 Aug 2014 00:58:04 +0100
> From: Reuben Thomas <address@hidden>
>
>      ;; .emacs or .gnus or .viper following a directory delimiter in
>      ;; Unix, MSDOG or VMS syntax.
>      ("[]>:/\\]\\..*\\(emacs\\|gnus\\|viper\\)\\'" . emacs-lisp-mode)
>      ("\\`\\..*emacs\\'" . emacs-lisp-mode)
>      ;; _emacs following a directory delimiter
>      ;; in MsDos syntax
>      ("[:/]_emacs\\'" . emacs-lisp-mode)
>
> There are two non-standard spellings:
>
> s/MSDOG/MS-DOS/
> s/MsDos/MS-DOS/
>
> Further, the second line looks like it will only match a .emacs in the root
> directory

No, it matches .emacs with no leading directories at all.

I thought these patterns were matching absolute filenames, in which case I am not sure what "no leading directories" could mean (at least on GNU).

> Given that VMS support has been removed, can we replace the first two
> pattern lines with a line that uses the pattern used above:
>
> \\(/\\|\\`\\)

No, that's not enough: it will miss "c:.emacs".

IMO, it's OK to remove the VMS-specific characters (AFAIK, the first 2
in the character class), but the rest should stay.

OK.
 
> And can we then also remove the third line, as MS-DOS syntax is not
> treated specially anywhere else in this default value?

How can you remove it, and still support _emacs as a file whose
normal-mode is emacs-lisp?  _emacs is supported on MS-DOS and
MS-Windows.  (I don't understand what you meant by "not supported
specially anywhere else".)

Sorry, I was unclear: I meant that there doesn't seem to be special support for MS-DOS and Windows filenames elsewhere *in auto-mode-alist* (as I put it above, "in this default value"). If "_emacs" is to be supported, surely other similar patterns should be added for other dot files? (The same applies to "c:.emacs"; but again, that's not an absolute filename, which would be "c:\.emacs".)

--
http://rrt.sc3d.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]