From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#27133: 26.0.50; Todo-mode multiline item highlighting is broken Date: Mon, 29 May 2017 20:19:57 +0200 Message-ID: <87poerplte.fsf@rosalinde> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1496082086 28470 195.159.176.226 (29 May 2017 18:21:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 29 May 2017 18:21:26 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: 27133@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 29 20:21:17 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFPHz-0006y9-6h for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 May 2017 20:21:11 +0200 Original-Received: from localhost ([::1]:49944 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFPI4-0001V1-Gi for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 May 2017 14:21:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56182) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFPHt-0001Tk-Fi for bug-gnu-emacs@gnu.org; Mon, 29 May 2017 14:21:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFPHq-0005Vx-J5 for bug-gnu-emacs@gnu.org; Mon, 29 May 2017 14:21:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40989) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dFPHq-0005Vn-7v for bug-gnu-emacs@gnu.org; Mon, 29 May 2017 14:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dFPHq-00020S-0Q for bug-gnu-emacs@gnu.org; Mon, 29 May 2017 14:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 May 2017 18:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 27133 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14960820117632 (code B ref -1); Mon, 29 May 2017 18:21:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 May 2017 18:20:11 +0000 Original-Received: from localhost ([127.0.0.1]:43666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFPH1-0001z1-Au for submit@debbugs.gnu.org; Mon, 29 May 2017 14:20:11 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36847) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFPH0-0001yq-6j for submit@debbugs.gnu.org; Mon, 29 May 2017 14:20:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFPGu-0005DW-1x for submit@debbugs.gnu.org; Mon, 29 May 2017 14:20:04 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:58415) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dFPGt-0005DS-Un for submit@debbugs.gnu.org; Mon, 29 May 2017 14:20:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56049) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFPGs-0001CZ-Ub for bug-gnu-emacs@gnu.org; Mon, 29 May 2017 14:20:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFPGq-0005Ct-8U for bug-gnu-emacs@gnu.org; Mon, 29 May 2017 14:20:02 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:49506) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dFPGp-0005Cl-TB for bug-gnu-emacs@gnu.org; Mon, 29 May 2017 14:20:00 -0400 Original-Received: from rosalinde ([83.135.17.20]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M5HZD-1e8DY11XI7-00zYZu for ; Mon, 29 May 2017 20:19:58 +0200 X-Provags-ID: V03:K0:74/eZE2cnqz+3ufXXuA7M8e7BrYVkdn78FG1xB5nUqvIqC36OFp JbQbUrQTKoUBmqvPPbzR95lom2JT5kTdAQEFRzzt+s74lhof9jXGguK4VEb9WpfBUbwfxWU 0dDsnIHA3B7nqiByUQo+nnbFWs9ZJBP5JeQ6R+G4I5BdgAJovHCqs7Bht8tXkZo82X9G3+h JhrWaQquxz1qUfJe12IDg== X-UI-Out-Filterresults: notjunk:1;V01:K0:sF2+9TEwAVo=:t/at5jDdKm3SsIqhENKsMz 9xZNB1a+fuHNGhppZnQuHRKFzUXNpJbJsDgOJmPhfT1MyrRZoqQMrRw+EA1o6Vnp4RWr60ROH AV7WfEny9UBC3Yj5CuH0uTvaYhY5nBWeRZnu0dB2Y9YTY/9RrE2CRaToEbFeWqcX8u+eREjKq +7mIBkHreKvtXsvtsh3YV+Bu9AG5/nVdbzldoumQ5u4UnlJ07rab2oZQejjYyl7Ppp5zLywJt vlvQaXaq+QQB+qiyyh8icC/0vlQrR6Wqo2wryztyfYPkNPKQAokcMQRgbiPjkyzYgrMlVpIVH 5pl5YJ2niV/GSWoPhTIeTjZUxy4Djn9lruh5dJwPREL7DxgiSDz0aqrCu1fcY09BSND8jYmfm lR5Fj8p+ZKt8dIzdxbQqLnEsyWbbokW6WcWd/xnzE9HGfNeRNJerNHMTVcfPRyVP7PBMK+/Qf ZRRIyPftn63rBxAJFGl8lxTfD4J2Me9IdmZaWdlP2yJZmG+IEB4psVCkeiyYNMsxbZZYNNeqM 9ZutHv/IJCQb0ksVQmOKtIaM4+LsUUUefG6V+nA3WW0nxFPeyfxNSKK2xOgzB8+XJf8mSLxyO gZhR4ohiiH39cw2XKf+qNNx6yU2UAClSplsfLiQ2sFe/jt8PU3UkkRJTU5d+YII97u2h8r0ZW Fpv2G6ewSIMyQnC1bnHHBSP4oLL6wk3OSJO3/Lncpk+MEsmvxVQXpUkfFbdawILN0matr9dNl xlh88UDciH0GHxaTMbWTtr1CZccRxbl4+aOfQ9kcDhk7+tMusRK9ccrJA10= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:132999 Archived-At: --=-=-= Content-Type: text/plain If a todo-mode item contains more than one line (hard newline), then typing `H' (`todo-toggle-item-highlighting') only highlights the first line instead of the entire item. --=-=-= Content-Type: text/plain Content-Disposition: inline Content-Description: ChangeLog 2017-05-29 Stephen Berman Make `todo-toggle-item-highlighting' work on multiline items * lisp/calendar/todo-mode.el (todo-hl-line-range): New named function, replacing an anonymous function for the sake of `describe-variable'. (todo-modes-set-2): Use it as buffer-local value of hl-line-range-function and remove boundp test of this variable, so its value is available on invoking `todo-toggle-item-highlighting'. --=-=-= Content-Type: text/x-patch Content-Disposition: inline Content-Description: todo-mode item highlighting patch diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index 8155a4241a..7b27e7049d 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el @@ -6583,17 +6583,19 @@ todo-modes-set-1 (visual-line-mode) (setq wrap-prefix (make-string todo-indent-to-here 32)))) +(defun todo-hl-line-range () + "Make `todo-toggle-item-highlighting' highlight entire item." + (save-excursion + (when (todo-item-end) + (cons (todo-item-start) + (todo-item-end))))) + (defun todo-modes-set-2 () "Make some settings that apply to multiple Todo modes." (add-to-invisibility-spec 'todo) (setq buffer-read-only t) (setq-local desktop-save-buffer 'todo-desktop-save-buffer) - (when (boundp 'hl-line-range-function) - (setq-local hl-line-range-function - (lambda() (save-excursion - (when (todo-item-end) - (cons (todo-item-start) - (todo-item-end)))))))) + (setq-local hl-line-range-function 'todo-hl-line-range)) (defun todo-modes-set-3 () "Make some settings that apply to multiple Todo modes." --=-=-= Content-Type: text/plain In GNU Emacs 26.0.50 (build 29, x86_64-pc-linux-gnu, GTK+ Version 3.22.8) of 2017-05-28 built on rosalinde Repository revision: 288b3ca2e519903653b9bc88d281ecd9f6b162a4 Windowing system distributor 'The X.Org Foundation', version 11.0.11901000 --=-=-=--