help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Why doesn't Emacs have a horizontal scroll bar?


From: David Kastrup
Subject: Re: Why doesn't Emacs have a horizontal scroll bar?
Date: Wed, 04 Jul 2007 19:16:04 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

Dieter Wilhelm <dieter@duenenhof-wilhelm.de> writes:

> David Kastrup <dak@gnu.org> writes:
>
>> (let ((h '(scroll-bar-mode menu-bar-mode tool-bar-mode)))
>>   (run-hook-with-args 'h -1))
>
> Ahh, not bad either, thanks.  Why is it necessary to provide a
> symbol to the run-hook-with-args function?

Because that's what it expects.  It has to use the name to look up
local hook bindings if existing.

> Is it not possible to "overload" functions with various arguments in
> lisp?

Only when coding this explicitly.

> (run-hook-with-args '(scroll-bar-mode tool-bar-mode) 1)
> (run-hook-with-args sroll-bar-mode 1)

It is not really prepared to do this, and actually my above trickery
is an abuse of the function.

>> A definition for the purpose of an action is never elegant.

Make that "of a one-time action".

>> (macrolet ((h (&rest lst) (cons 'progn
>>                                 (mapcar (lambda (x) (list x -1)) lst))))
>>           (h scroll-bar-mode menu-bar-mode tool-bar-mode))
>
> I'm sorry, I've to chew on it for a while, I'll ask/comment later.

There is a reason why one avoids macros when they are not really
necessary.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


reply via email to

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