all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] trunk r114194: Treat interpreter-mode-alist as alist of regexps, not literals
       [not found] <E1VJUi8-0007d6-Q4@vcs.savannah.gnu.org>
@ 2013-09-10 21:20 ` Stefan Monnier
  2013-09-11  0:04   ` Glenn Morris
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2013-09-10 21:20 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

> +** The cars of the elements in `interpreter-mode-alist' are now treated
> +as regexps rather than literal strings.  For the time being, any
> +element whose car does not start with "\\" is still treated as a
> +literal string, so this change should not cause any incompatibilities
> +if you have code that just adds elements to the list, only if you are
> +actually using interpreter-mode-alist for something.

How 'bout simply adding \\` and \\' around the string (without quoting it)?
All the entries I've seen so far are equal to their
regexp-quoted version, anyway.

> +;;; (defcustom cperl-clobber-mode-lists
> +;;;   (not
> +;;;    (and
> +;;;     (boundp 'interpreter-mode-alist)
> +;;;     (assoc "miniperl" interpreter-mode-alist)
> +;;;     (assoc "\\.\\([pP][Llm]\\|al\\)$" auto-mode-alist)))
> +;;;   "*Whether to install us into `interpreter-' and `extension' mode lists."
> +;;;   :type 'boolean
> +;;;   :group 'cperl)

Please use only ";;", since the first line above ends up using the
format of major outline header.


        Stefan



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

* Re: [Emacs-diffs] trunk r114194: Treat interpreter-mode-alist as alist of regexps, not literals
  2013-09-10 21:20 ` [Emacs-diffs] trunk r114194: Treat interpreter-mode-alist as alist of regexps, not literals Stefan Monnier
@ 2013-09-11  0:04   ` Glenn Morris
  2013-09-11  1:09     ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2013-09-11  0:04 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier wrote:

> How 'bout simply adding \\` and \\' around the string (without quoting it)?

Why?

> All the entries I've seen so far are equal to their regexp-quoted
> version, anyway.

Yes.



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

* Re: [Emacs-diffs] trunk r114194: Treat interpreter-mode-alist as alist of regexps, not literals
  2013-09-11  0:04   ` Glenn Morris
@ 2013-09-11  1:09     ` Stefan Monnier
  2013-09-11  1:34       ` Glenn Morris
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2013-09-11  1:09 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

>> How 'bout simply adding \\` and \\' around the string (without quoting it)?
> Why?

So you don't need to distinguish those that start with \\ and those
that don't.  And so you don't need to modify every entry adding \\` and \\'.


        Stefan



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

* Re: [Emacs-diffs] trunk r114194: Treat interpreter-mode-alist as alist of regexps, not literals
  2013-09-11  1:09     ` Stefan Monnier
@ 2013-09-11  1:34       ` Glenn Morris
  2013-09-11  1:56         ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2013-09-11  1:34 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier wrote:

>>> How 'bout simply adding \\` and \\' around the string (without quoting it)?
>> Why?
>
> So you don't need to distinguish those that start with \\ and those
> that don't.  And so you don't need to modify every entry adding \\` and \\'.

(I am dumb and do not understand.)
But what if I want a regexp entry that isn't anchored at both ends?



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

* Re: [Emacs-diffs] trunk r114194: Treat interpreter-mode-alist as alist of regexps, not literals
  2013-09-11  1:34       ` Glenn Morris
@ 2013-09-11  1:56         ` Stefan Monnier
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2013-09-11  1:56 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

> But what if I want a regexp entry that isn't anchored at both ends?

While this is highly unlikely, it's very easy to get anyway, by adding .*


        Stefan



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

end of thread, other threads:[~2013-09-11  1:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1VJUi8-0007d6-Q4@vcs.savannah.gnu.org>
2013-09-10 21:20 ` [Emacs-diffs] trunk r114194: Treat interpreter-mode-alist as alist of regexps, not literals Stefan Monnier
2013-09-11  0:04   ` Glenn Morris
2013-09-11  1:09     ` Stefan Monnier
2013-09-11  1:34       ` Glenn Morris
2013-09-11  1:56         ` Stefan Monnier

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.