unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* add-hook problem, file mode specification error?
@ 2006-07-28  2:00 David Schneider
  2006-07-28 15:28 ` Kevin Rodgers
  0 siblings, 1 reply; 3+ messages in thread
From: David Schneider @ 2006-07-28  2:00 UTC (permalink / raw)


Some time ago I asked how to modify the compile command in emacs, and
several people were kind enough to help me out with the code:

  (add-hook 'perl-mode-hook
          (lambda ()
            (set (make-local-variable 'compile-command)
                 (concat "perl -w " (buffer-file-name)))))

which I greatly appreciated.  Recently the command has stopped
working, and I haven't been able to figure out why - perhaps I
accidentally modified my .emacs file or some other configuration
issue.    The message  file mode specification error comes up when
loading my .emacs file - I have not tried to isolate that yet.  I can
create a compile command for c, but not perl, is there a way to view
the 'hooks' that are in place for a mode, will add-hook return
anything to indicate failure?

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

* Re: add-hook problem, file mode specification error?
       [not found] <mailman.4569.1154052024.9609.help-gnu-emacs@gnu.org>
@ 2006-07-28  2:44 ` wenbinye
  0 siblings, 0 replies; 3+ messages in thread
From: wenbinye @ 2006-07-28  2:44 UTC (permalink / raw)


What is the result after C-h v perl-mode-hook?

Are you change to cperl-mode?
David Schneider wrote:
> Some time ago I asked how to modify the compile command in emacs, and
> several people were kind enough to help me out with the code:
>
>   (add-hook 'perl-mode-hook
>           (lambda ()
>             (set (make-local-variable 'compile-command)
>                  (concat "perl -w " (buffer-file-name)))))
>
> which I greatly appreciated.  Recently the command has stopped
> working, and I haven't been able to figure out why - perhaps I
> accidentally modified my .emacs file or some other configuration
> issue.    The message  file mode specification error comes up when
> loading my .emacs file - I have not tried to isolate that yet.  I can
> create a compile command for c, but not perl, is there a way to view
> the 'hooks' that are in place for a mode, will add-hook return
> anything to indicate failure?

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

* Re: add-hook problem, file mode specification error?
  2006-07-28  2:00 add-hook problem, file mode specification error? David Schneider
@ 2006-07-28 15:28 ` Kevin Rodgers
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2006-07-28 15:28 UTC (permalink / raw)


David Schneider wrote:
> Some time ago I asked how to modify the compile command in emacs, and
> several people were kind enough to help me out with the code:
> 
>  (add-hook 'perl-mode-hook
>          (lambda ()
>            (set (make-local-variable 'compile-command)
>                 (concat "perl -w " (buffer-file-name)))))
> 
> which I greatly appreciated.  Recently the command has stopped
> working, and I haven't been able to figure out why - perhaps I
> accidentally modified my .emacs file or some other configuration
> issue.    The message  file mode specification error comes up when
> loading my .emacs file - I have not tried to isolate that yet.  I can
> create a compile command for c, but not perl, is there a way to view
> the 'hooks' that are in place for a mode, will add-hook return
> anything to indicate failure?

`C-h v perl-mode-hook' will tell you whether add-hook did what you
expect.  But I would start by running emacs with the --debug-init
command line option.

-- 
Kevin

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

end of thread, other threads:[~2006-07-28 15:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-28  2:00 add-hook problem, file mode specification error? David Schneider
2006-07-28 15:28 ` Kevin Rodgers
     [not found] <mailman.4569.1154052024.9609.help-gnu-emacs@gnu.org>
2006-07-28  2:44 ` wenbinye

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