From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.help Subject: Re: Why doesn't Emacs have a horizontal scroll bar? Date: Wed, 04 Jul 2007 19:16:04 +0200 Organization: Organization?!? Message-ID: <85ir90ozsb.fsf@lola.goethe.zz> References: <63F95800EDD046419F17688AAFD41CCF01A90F5C@rnd-ex01.rnd.gdnt.local> <606FF314-7C06-4F85-84B0-99308F8B7965@Web.DE> <873b06n43f.fsf@informatimago.com> <85myydqgk9.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1183570843 5166 80.91.229.12 (4 Jul 2007 17:40:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 4 Jul 2007 17:40:43 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 04 19:40:42 2007 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I68qH-0004fU-FS for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Jul 2007 19:40:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I68qG-0000Bf-UF for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Jul 2007 13:40:40 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) Cancel-Lock: sha1:sxAkfJ0vePSnz2xscQOxp+u+hzo= Original-Lines: 39 Original-NNTP-Posting-Date: 04 Jul 2007 19:16:06 CEST Original-NNTP-Posting-Host: 88bbb9bb.newsspool4.arcor-online.net Original-X-Trace: DXC=EBk^eKQ; Z>ZmG86`U=_nC_4IUK5MOK`; S:bhJ\NB^Fc749FUW=]<[i; P]UIU Original-X-Complaints-To: usenet-abuse@arcor.de Original-Xref: shelby.stanford.edu gnu.emacs.help:149883 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:45471 Archived-At: Dieter Wilhelm writes: > David Kastrup 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