From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-15?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.devel Subject: hide-show messages Date: Thu, 21 Oct 2010 09:24:43 +0200 Message-ID: <4CBFEABB.4000605@online.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090700030901070703040705" X-Trace: dough.gmane.org 1287645981 3735 80.91.229.12 (21 Oct 2010 07:26:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 21 Oct 2010 07:26:21 +0000 (UTC) Cc: Thien-Thi Nguyen To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 21 09:26:19 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P8pXX-0003gr-FU for ged-emacs-devel@m.gmane.org; Thu, 21 Oct 2010 09:26:19 +0200 Original-Received: from localhost ([127.0.0.1]:35714 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8pXW-0004A9-Pl for ged-emacs-devel@m.gmane.org; Thu, 21 Oct 2010 03:26:18 -0400 Original-Received: from [140.186.70.92] (port=38258 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8pX7-0004A2-Fw for emacs-devel@gnu.org; Thu, 21 Oct 2010 03:25:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P8pX5-00012P-Pq for emacs-devel@gnu.org; Thu, 21 Oct 2010 03:25:53 -0400 Original-Received: from moutng.kundenserver.de ([212.227.126.186]:56220) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P8pX5-00011v-AK for emacs-devel@gnu.org; Thu, 21 Oct 2010 03:25:51 -0400 Original-Received: from noname.home (brln-4dbc643a.pool.mediaWays.net [77.188.100.58]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0MPbvB-1P4ApL3XqD-004fsv; Thu, 21 Oct 2010 09:25:43 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6 X-Provags-ID: V02:K0:j0CebJYZaJ5vll/TgKtpBbFQTaZ9TqLElstC+RjQwcb Rl7/ChEHA+pnwc6sJGMremP4NtrhJN43aPS1s+Az3VIg6f9KjA jcsMNiuDzCly+f5fIdxa8VoNEjQIc5AkcdVQcFLMJDK/ii7ZxV BJR9/30FErf7X7Lxr1KnqbJc3a1A8M4o/gFjQchD9SPe1I+PrA OCsHoPwoP3jKDqu6nFcwMjeRjhBqh+3ORLS0KpnuIo= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:131928 Archived-At: This is a multi-part message in MIME format. --------------090700030901070703040705 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Hi, hide-show mode is part of my daily configuration, thanks a lot. A problem occurs when testing: as every time a new test-buffer is inaugurated, messages are unleashed, thus cluttering the display of test-results. Well, can disable hs-mode expressingly when testing. More generic will be if messages depend on interactive-mode. As interactive-p forms seem not compatible throughout Emacs versions, suggest a basic solution for this. Patch against latest source attached. Thanks! Andreas -- https://code.launchpad.net/~a-roehler/python-mode/python-mode-components https://code.launchpad.net/s-x-emacs-werkstatt/ --------------090700030901070703040705 Content-Type: text/x-patch; name="hs-show-all.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="hs-show-all.patch" diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 4883150..5e718bf 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -811,14 +811,14 @@ If `hs-hide-comments-when-hiding-all' is non-nil, also hide the comments." (beginning-of-line) (run-hooks 'hs-hide-hook))) -(defun hs-show-all () +(defun hs-show-all (&optional arg) "Show everything then run `hs-show-hook'. See `run-hooks'." - (interactive) + (interactive "p") (hs-life-goes-on - (message "Showing all blocks ...") + (when arg (message "Showing all blocks ...")) (let ((hs-allow-nesting nil)) (hs-discard-overlays (point-min) (point-max))) - (message "Showing all blocks ... done") + (when arg (message "Showing all blocks ... done")) (run-hooks 'hs-show-hook))) (defun hs-hide-block (&optional end) --------------090700030901070703040705--