From: David Kastrup <dak@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Why doesn't Emacs have a horizontal scroll bar?
Date: Wed, 04 Jul 2007 19:16:04 +0200 [thread overview]
Message-ID: <85ir90ozsb.fsf@lola.goethe.zz> (raw)
In-Reply-To: mailman.3044.1183528715.32220.help-gnu-emacs@gnu.org
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
next prev parent reply other threads:[~2007-07-04 17:16 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-01 13:25 Save on losing focus in Emacs Sergey Pariev
2007-07-01 14:40 ` Emilio Lopes
2007-07-01 17:56 ` Sergey Pariev
2007-07-01 20:12 ` David Kastrup
2007-07-01 20:53 ` Tassilo Horn
2007-07-02 9:02 ` Tim X
2007-07-02 9:41 ` Tassilo Horn
2007-07-02 15:01 ` Why doesn't Emacs have a horizontal scroll bar? brianjiang
2007-07-02 15:58 ` Peter Dyballa
2007-07-02 16:25 ` Lennart Borgman (gmail)
2007-07-02 17:53 ` Peter Dyballa
[not found] ` <mailman.2967.1183393563.32220.help-gnu-emacs@gnu.org>
2007-07-02 16:49 ` Pascal Bourguignon
2007-07-03 20:51 ` Dieter Wilhelm
[not found] ` <mailman.3029.1183495887.32220.help-gnu-emacs@gnu.org>
2007-07-03 22:16 ` David Kastrup
2007-07-03 22:45 ` David Kastrup
2007-07-04 5:58 ` Dieter Wilhelm
[not found] ` <mailman.3044.1183528715.32220.help-gnu-emacs@gnu.org>
2007-07-04 17:16 ` David Kastrup [this message]
2007-07-05 6:37 ` Andreas Röhler
2007-07-05 7:11 ` Gordon Beaton
2007-07-05 7:56 ` Peter Dyballa
2007-07-02 19:04 ` Save on losing focus in Emacs Sergey Pariev
[not found] <mailman.2963.1183391480.32220.help-gnu-emacs@gnu.org>
2007-07-02 19:36 ` Why doesn't Emacs have a horizontal scroll bar? Johan Bockgård
2007-07-03 7:36 ` Mathias Dahl
2007-07-03 12:52 ` brianjiang
2007-07-03 16:01 ` Amy Templeton
2007-07-04 1:56 ` brianjiang
2007-07-07 17:03 ` thorne
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=85ir90ozsb.fsf@lola.goethe.zz \
--to=dak@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).