From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vinicius Jose Latorre Newsgroups: gmane.emacs.devel Subject: Re: line-line-move-visual: was line motion problem Date: Mon, 21 Jul 2008 22:58:47 -0300 Message-ID: <48853ED7.8040301@ig.com.br> References: <18557.63556.231489.523637@gargle.gargle.HOWL> <5F62534C-D5CE-4364-8F73-E1AE0D61B4E2@gmail.com> <87abghlqs2.fsf@stupidchicken.com> <87hcap3ct7.fsf@stupidchicken.com> <87mykg84aj.fsf@stupidchicken.com> <200807181530.m6IFUHVp029662@sallyv1.ics.uci.edu> <06ED973A-F762-4586-9913-37B3622C8644@gmail.com> <48851632.5030302@ig.com.br> <873am2902l.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1216691803 18446 80.91.229.12 (22 Jul 2008 01:56:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Jul 2008 01:56:43 +0000 (UTC) Cc: David Reitter , raman@users.sourceforge.net, Dan Nicolaescu , Stefan Monnier , emacs-devel@gnu.org, Miles Bader To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 22 03:57:30 2008 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.50) id 1KL784-0005zR-LN for ged-emacs-devel@m.gmane.org; Tue, 22 Jul 2008 03:57:28 +0200 Original-Received: from localhost ([127.0.0.1]:47536 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KL77B-0001xV-Fc for ged-emacs-devel@m.gmane.org; Mon, 21 Jul 2008 21:56:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KL775-0001tx-LM for emacs-devel@gnu.org; Mon, 21 Jul 2008 21:56:27 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KL774-0001ru-5a for emacs-devel@gnu.org; Mon, 21 Jul 2008 21:56:27 -0400 Original-Received: from [199.232.76.173] (port=42139 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KL774-0001rm-0u for emacs-devel@gnu.org; Mon, 21 Jul 2008 21:56:26 -0400 Original-Received: from yw-out-1718.google.com ([74.125.46.158]:6522) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KL773-0005F9-Hb for emacs-devel@gnu.org; Mon, 21 Jul 2008 21:56:25 -0400 Original-Received: by yw-out-1718.google.com with SMTP id 9so665572ywk.66 for ; Mon, 21 Jul 2008 18:56:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding:sender; bh=AYh514xJ+INSX206KZNenJwiHUhLejwNUwNs/fEipQc=; b=YHoV0mFSAW5fmV0zZvMvaQ76k6Lc4wNHw6ENXUXmw6lPoRwlzzAxfxUu6f8ZtWQYF3 wOu/EGrkeIVY9Y7sZzQ1mR56cT1QNZHGz7iWoh2IHWhxXgpcpOLt4MoxTTVTQBuoIo/7 9h83k8vt2Y8G6WdG0cLie+Dc34nKkRIWhVmOw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :sender; b=vJ5K0iJwYPu5xa9G5R/CDBp/ksPDbv4rCYSfAenM/EICICnyXsGHkEJIJwLULRnDWU wnfmAIGafAQ4HH4uTBqrb7rFVxsrU5VU4nA+/Pc1eTNmsnXTuaOAMMyo7y1GAXdn5a19 WAL29gqxAr0/qyFxnuziSZlybnWjivIO4SR8g= Original-Received: by 10.150.139.15 with SMTP id m15mr4693611ybd.182.1216691784776; Mon, 21 Jul 2008 18:56:24 -0700 (PDT) Original-Received: from ?192.168.0.100? ( [201.82.41.56]) by mx.google.com with ESMTPS id i49sm2104020rne.0.2008.07.21.18.56.21 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 21 Jul 2008 18:56:24 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.15) Gecko/20080620 SeaMonkey/1.1.10 In-Reply-To: <873am2902l.fsf@stupidchicken.com> X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:101148 Archived-At: Chong Yidong wrote: > Vinicius Jose Latorre writes: > >> Second, there is already whitespace-newline which is the face used to >> visualize newlines. >> >> If it is necessary to have specific functions to display newlines, it >> should be something like this: >> >> (defun whitespace-newline () >> (let ((whitespace-style '(newline-mark newline))) >> (whitespace-mode 1))) >> >> (defun global-whitespace-newline () >> (let ((whitespace-style '(newline-mark newline))) >> (global-whitespace-mode 1))) > > Aha. This certainly looks like a much better solution (it will have to > be rewritten properly using define-minor-mode, though). > > Thanks. What about the code below? ;;;###autoload (define-minor-mode whitespace-newline-mode "Toggle newline minor mode visualization (\"nl\" on modeline). If ARG is null, toggle newline visualization. If ARG is a number greater than zero, turn on visualization; otherwise, turn off visualization. Only useful with a windowing system." :lighter " nl" :init-value nil :global nil :group 'whitespace (let ((whitespace-style '(newline-mark newline))) (whitespace-mode whitespace-newline-mode))) ;;;###autoload (define-minor-mode global-whitespace-newline-mode "Toggle newline global minor mode visualization (\"NL\" on modeline). If ARG is null, toggle newline visualization. If ARG is a number greater than zero, turn on visualization; otherwise, turn off visualization. Only useful with a windowing system." :lighter " NL" :init-value nil :global t :group 'whitespace (let ((whitespace-style '(newline-mark newline))) (global-whitespace-mode global-whitespace-newline-mode)))