From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christopher Schmidt Newsgroups: gmane.emacs.help Subject: Re: Narrowing: highlighting "Narrow" lighter? Date: Sat, 4 Aug 2012 12:29:17 +0100 (BST) Message-ID: <87sjc2c2ux@ch.ristopher.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1344079769 9758 80.91.229.3 (4 Aug 2012 11:29:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 4 Aug 2012 11:29:29 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 04 13:29:28 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 1SxcXw-0000bX-64 for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Aug 2012 13:29:28 +0200 Original-Received: from localhost ([::1]:56902 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SxcXv-0004Sr-Ep for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Aug 2012 07:29:27 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54228) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SxcXp-0004Rn-S7 for help-gnu-emacs@gnu.org; Sat, 04 Aug 2012 07:29:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SxcXo-0000ck-UM for help-gnu-emacs@gnu.org; Sat, 04 Aug 2012 07:29:21 -0400 Original-Received: from ristopher.com ([146.185.21.93]:47376 helo=saturn.ch.ristopher.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SxcXo-0000cT-MF for help-gnu-emacs@gnu.org; Sat, 04 Aug 2012 07:29:20 -0400 Original-Received: by saturn.ch.ristopher.com (Postfix, from userid 0) id E8D7420C85; Sat, 4 Aug 2012 12:29:17 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ch.ristopher.com; s=mail; t=1344079758; bh=VkKcCR5y5Wyc9yWcqNoD3R47O7ZilvYx4N1XkaLSKKo=; h=From:To:Subject:In-Reply-To:References:Message-ID:MIME-Version: Content-Type:Content-Transfer-Encoding:Date; b=kil6n8f//nHLMTT+p8KsPbR/OM7yjWocB6XXbTMPBXjLuSie1B+tf3JLv8Pj98zIE gijttRjfQBbKj4JPT8mhtjQfY/yAK9AAfMBKarXTIOp9iRRbd8rcLFppKDQ0kKPrEk 9+fhhWOUzkIbzWB4WXyY6ij2es/Pqdr3jENZlnVo= In-Reply-To: (Raffaele Ricciardi's message of "Sat, 04 Aug 2012 12:55:20 +0100") Mail-Followup-To: help-gnu-emacs@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 146.185.21.93 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:86198 Archived-At: Raffaele Ricciardi writes: > I've thought about highlighting the "Narrow" lighter in the Mode Line, bu= t as > there is no Narrow mode and narrowing commands are defined in C source co= de, I > can't find a way to do that without resorting to advices or writing a Nar= row > minor mode myself that manipulates the Mode Line. (loop for d in-ref mode-line-modes until (when (and (stringp d) (string=3D d "%n")) (setf d '(:eval (unless (and (eq (point-min) 1) (eq (point-max) (1+ (buffer-size)))) (propertize " Liebe" 'face '(:foreground "pink") 'help-echo "mouse-2: Weniger Liebe f=C3=BCr diesen Buff= er :x" 'mouse-face 'mode-line-highlight 'local-map (make-mode-line-mouse-map 'mouse-2 'mode-line-widen))= ))))) Christopher