From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: hideshow minor-mode Date: Mon, 15 Oct 2012 20:04:34 +0200 Message-ID: <87626blih9.fsf@web.de> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1350324286 10378 80.91.229.3 (15 Oct 2012 18:04:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Oct 2012 18:04:46 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 15 20:04:53 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TNp21-0003i1-EJ for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Oct 2012 20:04:49 +0200 Original-Received: from localhost ([::1]:58213 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNp1u-00064X-Jj for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Oct 2012 14:04:42 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNp1k-00062u-LC for help-gnu-emacs@gnu.org; Mon, 15 Oct 2012 14:04:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNp1e-0008Sq-SQ for help-gnu-emacs@gnu.org; Mon, 15 Oct 2012 14:04:32 -0400 Original-Received: from mout.web.de ([212.227.17.11]:58854) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNp1e-0008SC-J6 for help-gnu-emacs@gnu.org; Mon, 15 Oct 2012 14:04:26 -0400 Original-Received: from drachen.dragon ([89.204.139.251]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0LjJH1-1TuhOz3GMJ-00cxQu; Mon, 15 Oct 2012 20:04:24 +0200 Mail-Followup-To: help-gnu-emacs@gnu.org In-Reply-To: (Shiyuan's message of "Sun, 14 Oct 2012 20:40:26 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-Provags-ID: V02:K0:UdYJn1ipf7uNvD/uPj8t+6e4RXQJD24JBxj8f86heqZ /4xHA5Ns017/6jS6Hq9iFa80AwvpR0ifyE6sLOe/+yhCE9rXSm 527HQxc1lphxJefsTbj1udf+w27bJEToh7HwPFgCfKoJeXxFbn OCiCIYNMnnJyiix6sredexKd6tehyBplAXQeWxmzLN/quLYzQT ozLeewfWo6gBLnp+LaQXV0esj+lBlEDUoYjmLsiaZI= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 212.227.17.11 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:87273 Archived-At: Shiyuan writes: > I want to turn-on the hide-show-minor-mode in a user-defined > mymode. But it gives me the error: mymode doesn't support hide show > minor mode. I have put (require 'hideshow) at the beginning of > mymode.el, and also > (hs-minor-mode 1) in the body of the definition of the major mode, and > after that > I put (add-to-list 'hs-special-modes-alist '(mymode "{" "}" "/[*/]" > nil nil)) in mymode.el. > > What else I should do to utilize the hs-minor-mode in mymode? Thanks. Enabling `hs-minor-mode' tests if `comment-start' and `comment-end' are bound to something non-nil and fails otherwise. This happens even before `hs-special-modes-alist' is handled. IMHO this doesn't make much sense. FWIW, your minor-mode must bind `comment-start' and `comment-end'. If your mode doesn't have comments at all, you can bind these to a regexp that always fails matching - like "\\=[^[:ascii:][:nonascii:]]". Does that help? Michael.