[Top][All Lists]

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

Re: include Ada Reference Manual info files in ada-mode ELPA package?

From: Stephen Leake
Subject: Re: include Ada Reference Manual info files in ada-mode ELPA package?
Date: Sun, 28 Sep 2014 11:25:37 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (windows-nt)

David Kastrup <address@hidden> writes:

> Stephen Leake <address@hidden> writes:
>> Andreas Schwab <address@hidden> writes:
>>> Stephen Leake <address@hidden> writes:
>>>> --- a/admin/archive-contents.el
>>>> +++ b/admin/archive-contents.el
>>>> @@ -167,7 +167,7 @@ EXTRAS is an alist with additional metadata.
>>>>  PKG is the name of the package and DIR is the directory where it is."
>>>>    (let* ((mainfile (expand-file-name (concat pkg ".el") dir))
>>>> -         (files (directory-files dir nil "\\.el\\'")))
>>>> +         (files (directory-files dir nil "^dir$\\|\\.el\\'")))
>>> Please use \` and \' instead of ^ and $.
>> What is the rationale for that?
> File names can contain newlines.

Ah; I forgot/didn't realize that.

>> Is it documented somewhere? I looked for an "elisp style guide" in
>> emacs/docs/*, and in various READMEs, but didn't see anything obvious.
> That's not a question of style.  The meaning is different.  Please check
> (info "(Emacs) Regexps")
> ‘^’
>      is a special character that matches the empty string, but only at
>      the beginning of a line in the text being matched.  Otherwise it
>      fails to match anything.  Thus, ‘^foo’ matches a ‘foo’ that occurs
>      at the beginning of a line.

(info "(elisp) "Regexp Special") in says:


     When matching a string instead of a buffer, `^' matches at the
     beginning of the string or after a newline character.

Which I read, and noticed was different from \`, but did not appreciate
the significance

-- Stephe

reply via email to

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