From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dieter Wilhelm Newsgroups: gmane.emacs.help Subject: Re: Why doesn't Emacs have a horizontal scroll bar? Date: Wed, 04 Jul 2007 07:58:44 +0200 Organization: The Church of Emacs Message-ID: <874pkklnfv.fsf@debby.local.net> 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 1183528733 26790 80.91.229.12 (4 Jul 2007 05:58:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 4 Jul 2007 05:58:53 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: David Kastrup Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 04 07:58:50 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 1I5xt2-0007Ml-NX for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Jul 2007 07:58:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I5xt2-0001EQ-4s for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Jul 2007 01:58:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I5xsn-0001A8-5Y for help-gnu-emacs@gnu.org; Wed, 04 Jul 2007 01:58:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I5xsm-00019W-M0 for help-gnu-emacs@gnu.org; Wed, 04 Jul 2007 01:58:32 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I5xsm-00019M-JL for help-gnu-emacs@gnu.org; Wed, 04 Jul 2007 01:58:32 -0400 Original-Received: from moutng.kundenserver.de ([212.227.126.186]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I5xsj-0006EZ-21; Wed, 04 Jul 2007 01:58:29 -0400 Original-Received: from [89.12.153.250] (helo=debby.local.net) by mrelayeu.kundenserver.de (node=mrelayeu7) with ESMTP (Nemesis), id 0ML2xA-1I5xsh2mTG-0003jm; Wed, 04 Jul 2007 07:58:27 +0200 Original-Received: from dieter by debby.local.net with local (Exim 4.63) (envelope-from ) id 1I5xsy-0001ic-Iu; Wed, 04 Jul 2007 07:58:44 +0200 In-Reply-To: <85myydqgk9.fsf@lola.goethe.zz> (David Kastrup's message of "Wed\, 04 Jul 2007 00\:16\:06 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Provags-ID: V01U2FsdGVkX1/BalIWaslmBaNj1hQ4qkqb+6Za718ivoBbzpF ghhvpIOu5/0umgQYOlPZNdfucsEygjzadn8oZxY3GwGGrLoA7F DsnzcmNhyUpbwDjvkSSJ6F+ZZpHotlG X-detected-kernel: Linux 2.6? (barebone, rare!) 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:45458 Archived-At: David Kastrup writes: Hi David > Dieter Wilhelm writes: > >> Pascal Bourguignon writes: >> >>> Here is the first form I have in by ~/.emacs: >>> >>> (mapcar (lambda (f) (when (fboundp f) (funcall f -1))) >>> '(scroll-bar-mode menu-bar-mode tool-bar-mode)) > > (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? Is it not possible to "overload" functions with various arguments in lisp? (run-hook-with-args '(scroll-bar-mode tool-bar-mode) 1) (run-hook-with-args sroll-bar-mode 1) > >> That is very nice, thanks, I adapted it to my .emacs as well. But >> is the fboundp check not a bit superfluous with this concise list? >> >> By the way, I'm just curious whether this might be more elegant, would >> you mind doing the same with a macro definition? > > A definition for the purpose of an action is never elegant. > > (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. -- Best wishes H. Dieter Wilhelm Darmstadt, Germany