* ansi-color.el and comint.el
@ 2005-04-26 13:26 Stephan Stahl
2005-04-26 15:00 ` Luc Teirlinck
2005-04-26 20:11 ` Kevin Rodgers
0 siblings, 2 replies; 4+ messages in thread
From: Stephan Stahl @ 2005-04-26 13:26 UTC (permalink / raw)
Hi.
ansi-color.el may overwrite comint-output-filter-functions if it is
loaded before comint.el. That is because ansi-color.el does a simple
(add-hook 'comint-output-filter-functions
'ansi-color-process-output)
Now comint-output-filter-functions is defined and when later comint.el
is loaded its own
(defvar comint-output-filter-functions '(comint-postoutput-scroll-to-bottom
comint-watch-for-password-prompt)
does nothing so those two functions may be missing. I'm not sure how
this is fixed best. Either have comint.el do:
(defvar comint-output-filter-functions nil)
(add-hook 'comint-output-filter-functions
'comint-watch-for-password-prompt)
(add-hook 'comint-output-filter-functions
'comint-postoutput-scroll-to-bottom)
or have ansi-color.el require comint. If anyone else thinks this
should be fixed :)
--
Stephan Stahl
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ansi-color.el and comint.el
2005-04-26 13:26 ansi-color.el and comint.el Stephan Stahl
@ 2005-04-26 15:00 ` Luc Teirlinck
2005-04-26 22:12 ` Stephan Stahl
2005-04-26 20:11 ` Kevin Rodgers
1 sibling, 1 reply; 4+ messages in thread
From: Luc Teirlinck @ 2005-04-26 15:00 UTC (permalink / raw)
Cc: emacs-devel
Stephan Stahl wrote:
ansi-color.el may overwrite comint-output-filter-functions if it is
loaded before comint.el. That is because ansi-color.el does a simple
(add-hook 'comint-output-filter-functions
'ansi-color-process-output)
Now comint-output-filter-functions is defined and when later comint.el
is loaded its own
(defvar comint-output-filter-functions '(comint-postoutput-scroll-to-bottom
comint-watch-for-password-prompt)
does nothing so those two functions may be missing. I'm not sure how
this is fixed best.
Would autoloading comint-output-filter-functions not work? But the
same problem could happen to any hook whose defvar gives it a non-nil
value. So I guess that any defvar of such a type that is not in a
preloaded file should be autoloaded,
Sincerely,
Luc.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ansi-color.el and comint.el
2005-04-26 15:00 ` Luc Teirlinck
@ 2005-04-26 22:12 ` Stephan Stahl
0 siblings, 0 replies; 4+ messages in thread
From: Stephan Stahl @ 2005-04-26 22:12 UTC (permalink / raw)
Cc: Kevin Rodgers, emacs-devel
Luc Teirlinck said:
> Would autoloading comint-output-filter-functions not work? But the
> same problem could happen to any hook whose defvar gives it a
> non-nil value. So I guess that any defvar of such a type that is
> not in a preloaded file should be autoloaded,
Yes that would work too. Using require might have been a nice example
for "check your dependencies". Not very important. So autoload seems
like the ideal solution since both files are part of emacs.
Kevin Rodgers said:
> Would it work if ansi-color-for-comint-mode-on added
> ansi-color-process-output to comint-output-filter-functions? If so,
> should ansi-color-for-comint-mode-off remove it?
No, because this does not change the fact that comint.el may not be
loaded.
When ansi-color.el does that add-hook when comint.el is not already
loaded comint-output-filter-functions is set to
(ansi-color-process-output)
When comint.el is already loaded comint-output-filter-functions is set
to (ansi-color-process-output comint-postoutput-scroll-to-bottom
comint-watch-for-password-prompt)
--
Stephan Stahl
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ansi-color.el and comint.el
2005-04-26 13:26 ansi-color.el and comint.el Stephan Stahl
2005-04-26 15:00 ` Luc Teirlinck
@ 2005-04-26 20:11 ` Kevin Rodgers
1 sibling, 0 replies; 4+ messages in thread
From: Kevin Rodgers @ 2005-04-26 20:11 UTC (permalink / raw)
Stephan Stahl wrote:
> Hi.
>
> ansi-color.el may overwrite comint-output-filter-functions if it is
> loaded before comint.el. That is because ansi-color.el does a simple
>
> (add-hook 'comint-output-filter-functions
> 'ansi-color-process-output)
>
> Now comint-output-filter-functions is defined and when later comint.el
> is loaded its own
>
> (defvar comint-output-filter-functions
'(comint-postoutput-scroll-to-bottom
> comint-watch-for-password-prompt)
>
> does nothing so those two functions may be missing. I'm not sure how
> this is fixed best. Either have comint.el do:
>
> (defvar comint-output-filter-functions nil)
>
> (add-hook 'comint-output-filter-functions
> 'comint-watch-for-password-prompt)
> (add-hook 'comint-output-filter-functions
> 'comint-postoutput-scroll-to-bottom)
>
> or have ansi-color.el require comint. If anyone else thinks this
> should be fixed :)
Would it work if ansi-color-for-comint-mode-on added
ansi-color-process-output to comint-output-filter-functions? If so,
should ansi-color-for-comint-mode-off remove it?
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-04-26 22:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-26 13:26 ansi-color.el and comint.el Stephan Stahl
2005-04-26 15:00 ` Luc Teirlinck
2005-04-26 22:12 ` Stephan Stahl
2005-04-26 20:11 ` Kevin Rodgers
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).