From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Markert Newsgroups: gmane.emacs.devel Subject: [Patch] lisp/help.el (where-is): Don't overwrite `standard-output' Date: Mon, 12 Sep 2011 23:19:40 +0200 Message-ID: <87wrddlaqb.fsf@googlemail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Trace: dough.gmane.org 1315862419 26459 80.91.229.12 (12 Sep 2011 21:20:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 12 Sep 2011 21:20:19 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 12 23:20:15 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R3DvL-0006qb-9R for ged-emacs-devel@m.gmane.org; Mon, 12 Sep 2011 23:20:15 +0200 Original-Received: from localhost ([::1]:50485 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3DvK-0001fH-PR for ged-emacs-devel@m.gmane.org; Mon, 12 Sep 2011 17:20:14 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:54770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3DvI-0001ey-CC for emacs-devel@gnu.org; Mon, 12 Sep 2011 17:20:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R3DvG-0008VD-SG for emacs-devel@gnu.org; Mon, 12 Sep 2011 17:20:12 -0400 Original-Received: from mail-fx0-f41.google.com ([209.85.161.41]:65370) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3DvG-0008Ut-L2 for emacs-devel@gnu.org; Mon, 12 Sep 2011 17:20:10 -0400 Original-Received: by fxh17 with SMTP id 17so2318525fxh.0 for ; Mon, 12 Sep 2011 14:20:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=from:to:subject:date:message-id:user-agent:mime-version :content-type; bh=blFCB85vodZA84yz5zsn1QwCSryRIOuuQeO6e0K5mFU=; b=XgjJSeDF1Zu3hIyroMN5ClC66wOFkbjxLng/fLiUO4l0eEud9rzRVaTI9K92dH4dRx Yh432cAq40ytphWmqTZ7h4nzFI9lImB8NuzcWCCGQBjQcJ0absGMyTDNtfe3hWVTVaUt Qos+6+AdI2x745VwXrMYGO02hkY8Hx/fa2fmU= Original-Received: by 10.223.37.81 with SMTP id w17mr33560fad.91.1315862385028; Mon, 12 Sep 2011 14:19:45 -0700 (PDT) Original-Received: from localhost (p4FF5B3A2.dip.t-dialin.net [79.245.179.162]) by mx.google.com with ESMTPS id f1sm9861302fah.9.2011.09.12.14.19.43 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 12 Sep 2011 14:19:43 -0700 (PDT) User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.161.41 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:143950 Archived-At: --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Hi, I tried to use `where-is' programmatically to avoid doing the parsing myself but failed because `where-is' resets `standard-output' to `t'. The appended patch keeps `standard-output' unless told otherwise and thus enabled getting the output via `with-output-to-string' and the like. Michael --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=where-is-honor-standard-output.patch diff -Naur a/help.el b/help.el --- a/help.el 2011-09-12 23:04:47.336591539 +0200 +++ b/help.el 2011-09-12 23:05:51.748593189 +0200 @@ -527,7 +527,7 @@ (unless definition (error "No command")) (let ((func (indirect-function definition)) (defs nil) - (standard-output (if insert (current-buffer) t))) + (standard-output (if insert (current-buffer) standard-output))) ;; In DEFS, find all symbols that are aliases for DEFINITION. (mapatoms (lambda (symbol) (and (fboundp symbol) --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBCAAGBQJObndsAAoJEHHMVUK0UjKVErwQAI8k33U74kdA4+KFI/JJU78a 84MKOZNqQR4vIAus0+v1ohZLHc07xOtApi0yHJt2Y3xKSDGmAUXkaC8ZEEfx+NIU vVsSOm3PtWPTt5zKb7eJ7BpXq1DMCKjNocT9kztEmmqufGeKhyBBbXg8h7+cA1Jz LP2EaCTtBj7URWwzqIyoaElAMs5ARXA/1XjEFGeAKAdPndvHGubcDx9O9EjHj2GY QPnV9CWgvN7SAtRZmQ7FL/CCh83tfcc2yxdi5LivxQTiSqfI2scbfvasoIVD4k98 KVLgKhDSwKQDLTxA+eIU76aLquuOFZ7PAliWZ4rb6WKfqG9uKN76A3ghWcuMQlio KeUUYRzcKTA6mHbo0iiTKbya0kVDOaUN6vKsJKHDutGjUBE5p8UKq/pumOTFSHAa /NsPvuxKmZumMo8r28sRpfErH3cqCdPqMgq1BiwMKvXWgOgen0BI0QDu2lduXw/3 E7ohKK0EzY+D6JuQCL0UtY+KWbBBCKPKg7CkBl8EjGhIRNBLTRmE34p/bV7qVjpw v1rzupZm/zBUZeWtYk/p70K8+EUNsEA7nuGK2t1cYKF+7xMApzsZbSiddRx5koxW HiP6HuTL9PgFcOnCWwIAGln99/ogfWwnoF5M0t7ZbJKhMYnh29jFv/+zlsfp2C9O jPJAZ+3tksys3EXPVgpl =M16G -----END PGP SIGNATURE----- --==-=-=--