From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: outline-regexp Date: Thu, 07 Dec 2006 09:17:17 -0500 Message-ID: References: <457424E9.2060107@easy-emacs.de> <45781AC5.5000705@easy-emacs.de> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1165501078 27451 80.91.229.10 (7 Dec 2006 14:17:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 7 Dec 2006 14:17:58 +0000 (UTC) Cc: rms@gnu.org, emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 07 15:17:56 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GsK4E-0004jj-I3 for ged-emacs-devel@m.gmane.org; Thu, 07 Dec 2006 15:17:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GsK4D-0000i5-BR for ged-emacs-devel@m.gmane.org; Thu, 07 Dec 2006 09:17:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GsK3v-0000gv-7d for emacs-devel@gnu.org; Thu, 07 Dec 2006 09:17:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GsK3s-0000f9-Mp for emacs-devel@gnu.org; Thu, 07 Dec 2006 09:17:21 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GsK3s-0000es-83 for emacs-devel@gnu.org; Thu, 07 Dec 2006 09:17:20 -0500 Original-Received: from [209.226.175.54] (helo=tomts10-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GsK3r-0000Qd-8I; Thu, 07 Dec 2006 09:17:19 -0500 Original-Received: from pastel.home ([74.13.164.204]) by tomts10-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20061207141718.KKTT17401.tomts10-srv.bellnexxia.net@pastel.home>; Thu, 7 Dec 2006 09:17:18 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id EC8497F91; Thu, 7 Dec 2006 09:17:17 -0500 (EST) Original-To: Andreas Roehler In-Reply-To: <45781AC5.5000705@easy-emacs.de> (Andreas Roehler's message of "Thu\, 07 Dec 2006 14\:44\:37 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux) 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:63415 Archived-At: > (defcustom outline-regexp "[*\^L]+" > "Regular expression to match the beginning of a heading. > Any line whose beginning matches this regexp is considered to start > a heading. > + > + If the global value isn't into effect, probably it's set by the mode. > + See lisp-mode.el for example how this is done. > + > Note that Outline mode only checks this regexp at the start of a line, > so the regexp need not (and usually does not) start with `^'. > The recommended way to set this is with a Local Variables: list If the user sees this text via C-h v it will also give both the global and the buffer-local value, thus making it fairly obvious what's going on. Maybe `custom' should do similar: e.g. check whether the variable is locally changed in some buffers and if so add a little blurb about the global setting not taking effect in those buffers. > Why not let `outline-regexp' go with the mode, although not through a > function as it's done now, but with defcustom. Heavy, clunky, inconvenient. Just set the variable in your file-local block and be done with it. Or if you want to change the setting in all emacs-lisp-mode buffers, then do it the normal way: (add-hook 'emacs-lisp-mode-hook (lambda () (setq outline-regexp "my favorite setting"))) -- Stefan