[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep (was Re: inconsistent behavior of M-x info)
From: |
Richard Stallman |
Subject: |
Re: grep (was Re: inconsistent behavior of M-x info) |
Date: |
Fri, 09 Apr 2004 18:45:03 -0400 |
;;;###autoload (autoload 'grep-mode "grep" nil t)
(define-compilation-mode grep-mode "Grep"
"Sets `grep-last-buffer' and `compilation-window-height'."
(setq grep-last-buffer (current-buffer))
(set (make-local-variable 'compilation-error-face)
grep-hit-face)
(set (make-local-variable 'compilation-error-regexp-alist)
grep-regexp-alist))
I think the autoload was accidentally commented out, and the above
should read
That autoload is not commented out. It says to put
(autoload 'grep-mode "grep" nil t)
into the loaddefs.el file.
Is such a form present in loaddefs.el? If so, why doesn't it
do the job? It ought to.
It does have a bug, in that it lacks a copy of the doc string.
I think the autoload was accidentally commented out, and the above
should read
;;;###autoload
(define-compilation-mode grep-mode "Grep"
"Sets `grep-last-buffer' and `compilation-window-height'."
(setq grep-last-buffer (current-buffer))
(set (make-local-variable 'compilation-error-face)
grep-hit-face)
(set (make-local-variable 'compilation-error-regexp-alist)
grep-regexp-alist))
(autoload 'grep-mode "grep" nil t)
That can't be right. The call to autoload would be a no-op since
grep-mode is already defined.
I don't know whether the loaddefs.el generator knows how to cope
properly with ;;;###autoload before a define-compilation-mode form.
To copy the form unchanged into loaddefs.el would be incorrect just as
copying a defun form unchanged into loaddefs.el would be incorrect.
The code that updates autoloads needs to know about function-defining
forms specially. If it doesn't know about define-compilation-mode yet,
you could fix it to handle that form properly.
- Re: inconsistent behavior of M-x info, (continued)
- Re: inconsistent behavior of M-x info, Stefan Monnier, 2004/04/07
- Re: inconsistent behavior of M-x info, Joe Corneli, 2004/04/07
- Re: inconsistent behavior of M-x info, Stefan Monnier, 2004/04/07
- Re: inconsistent behavior of M-x info, Joe Corneli, 2004/04/07
- Re: inconsistent behavior of M-x info, Luc Teirlinck, 2004/04/07
- Re: inconsistent behavior of M-x info, Joe Corneli, 2004/04/07
- Re: inconsistent behavior of M-x info, Luc Teirlinck, 2004/04/07
- Re: inconsistent behavior of M-x info, Stefan Monnier, 2004/04/08
- Re: inconsistent behavior of M-x info, Juri Linkov, 2004/04/08
- grep (was Re: inconsistent behavior of M-x info), Joe Corneli, 2004/04/08
- Re: grep (was Re: inconsistent behavior of M-x info),
Richard Stallman <=
- Re: grep (was Re: inconsistent behavior of M-x info), Stefan Monnier, 2004/04/10
- Re: inconsistent behavior of M-x info, Joe Corneli, 2004/04/08
- Re: inconsistent behavior of M-x info, Richard Stallman, 2004/04/09