unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#3577: 23.0.94; Info manual does not explain MTIME argument for dir-locals-set-directory-class
@ 2009-06-15 16:54 Teemu Likonen
  2009-06-18  5:25 ` Teemu Likonen
  0 siblings, 1 reply; 6+ messages in thread
From: Teemu Likonen @ 2009-06-15 16:54 UTC (permalink / raw)
  To: emacs-pretest-bug

Info nodes

    (emacs) Directory Variables
    (elisp) Directory Local Variables

explain or give examples of function dir-locals-set-directory-class but
neither of them mentions the mandatory third argument MTIME. I quote the
doc string of the function:

    dir-locals-set-directory-class is a compiled Lisp function in
    `files.el'.

    (dir-locals-set-directory-class directory class mtime)

    Declare that the directory root is an instance of class.
    directory is the name of a directory, a string.
    class is the name of a project class, a symbol.
    mtime is either the modification time of the directory-local
    variables file that defined this this class, or nil.

    When a file beneath directory is visited, the mode-specific
    variables from class are applied to the buffer.  The variables
    for a class are defined using `dir-locals-set-class-variables'.





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

* bug#3577: 23.0.94; Info manual does not explain MTIME argument for dir-locals-set-directory-class
  2009-06-15 16:54 bug#3577: 23.0.94; Info manual does not explain MTIME argument for dir-locals-set-directory-class Teemu Likonen
@ 2009-06-18  5:25 ` Teemu Likonen
  2009-06-18  6:58   ` Glenn Morris
  0 siblings, 1 reply; 6+ messages in thread
From: Teemu Likonen @ 2009-06-18  5:25 UTC (permalink / raw)
  To: 3577

On 2009-06-15 19:54 (+0300), Teemu Likonen wrote:

> Info nodes
>
>     (emacs) Directory Variables
>     (elisp) Directory Local Variables
>
> explain or give examples of function dir-locals-set-directory-class but
> neither of them mentions the mandatory third argument MTIME.

It other words if I copy the example from "(emacs) Directory Variables"
and perhaps use my own variables:

    (dir-locals-set-class-variables 'unwritable-directory
      '((nil . ((fill-column . 78)))))

    (dir-locals-set-directory-class
     "/usr/include/" 'unwritable-directory)

I get this:


Debugger entered--Lisp error: (wrong-number-of-arguments #[(directory
class mtime) [...]
[directory class dir-locals-class-alist mtime dir-locals-directory-cache file-name-as-directory expand-file-name error "No such class `%s'" symbol-name] 4 1821511] 2)
  dir-locals-set-directory-class("/usr/include/" unwritable-directory)
  eval((dir-locals-set-directory-class "/usr/include/" (quote unwritable-directory)))
  eval-last-sexp-1(nil)
  eval-last-sexp(nil)
  call-interactively(eval-last-sexp nil nil)





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

* bug#3577: 23.0.94; Info manual does not explain MTIME argument for dir-locals-set-directory-class
  2009-06-18  5:25 ` Teemu Likonen
@ 2009-06-18  6:58   ` Glenn Morris
  2009-06-18  7:44     ` Teemu Likonen
  2011-02-25  7:58     ` Glenn Morris
  0 siblings, 2 replies; 6+ messages in thread
From: Glenn Morris @ 2009-06-18  6:58 UTC (permalink / raw)
  To: Teemu Likonen; +Cc: 3577

Teemu Likonen wrote:

>> Info nodes
>>
>>     (emacs) Directory Variables
>>     (elisp) Directory Local Variables
>>
>> explain or give examples of function dir-locals-set-directory-class but
>> neither of them mentions the mandatory third argument MTIME.
[...]
>     (dir-locals-set-directory-class
>      "/usr/include/" 'unwritable-directory)
[...]
> Debugger entered--Lisp error: (wrong-number-of-arguments #[(directory


Yes, calling a function with the wrong number of arguments causes an error.

The mtime argument is now optional, so there is no error, and no need
to mention the mtime bit in the Emacs manual, IMO. It probably should
be added to the elisp manual.





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

* bug#3577: 23.0.94; Info manual does not explain MTIME argument for dir-locals-set-directory-class
  2009-06-18  6:58   ` Glenn Morris
@ 2009-06-18  7:44     ` Teemu Likonen
  2011-02-25  7:58     ` Glenn Morris
  1 sibling, 0 replies; 6+ messages in thread
From: Teemu Likonen @ 2009-06-18  7:44 UTC (permalink / raw)
  To: 3577

On 2009-06-18 02:58 (-0400), Glenn Morris wrote:

> The mtime argument is now optional, so there is no error, and no need
> to mention the mtime bit in the Emacs manual, IMO.

If I understand the MTIME argument correctly it is (mostly) for Emacs's
internal use to handle .dir-locals.el files. So I agree, now that MTIME
is optional argument it's not necessary to mention it in the Emacs
manual.

> It probably should be added to the elisp manual.

But as you said I think it should be documented in this lower-level
manual.





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

* bug#3577: 23.0.94; Info manual does not explain MTIME argument for dir-locals-set-directory-class
  2009-06-18  6:58   ` Glenn Morris
  2009-06-18  7:44     ` Teemu Likonen
@ 2011-02-25  7:58     ` Glenn Morris
  2011-02-25  8:08       ` Glenn Morris
  1 sibling, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2011-02-25  7:58 UTC (permalink / raw)
  To: 3577-done

Version: 23.3

I documented the mtime argument in the lispref.





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

* bug#3577: 23.0.94; Info manual does not explain MTIME argument for dir-locals-set-directory-class
  2011-02-25  7:58     ` Glenn Morris
@ 2011-02-25  8:08       ` Glenn Morris
  0 siblings, 0 replies; 6+ messages in thread
From: Glenn Morris @ 2011-02-25  8:08 UTC (permalink / raw)
  To: 3577


Actually my commit appears to be hanging at the moment, but I'll
actually commit it when I am able to.





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

end of thread, other threads:[~2011-02-25  8:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-15 16:54 bug#3577: 23.0.94; Info manual does not explain MTIME argument for dir-locals-set-directory-class Teemu Likonen
2009-06-18  5:25 ` Teemu Likonen
2009-06-18  6:58   ` Glenn Morris
2009-06-18  7:44     ` Teemu Likonen
2011-02-25  7:58     ` Glenn Morris
2011-02-25  8:08       ` Glenn Morris

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