unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] emacs: Avoid unnecessary markers.
@ 2011-11-21  1:07 Austin Clements
  2011-11-21  1:11 ` Dmitry Kurochkin
  2011-11-24 12:53 ` David Bremner
  0 siblings, 2 replies; 3+ messages in thread
From: Austin Clements @ 2011-11-21  1:07 UTC (permalink / raw)
  To: notmuch

This is just cleanup.  These markers are all immediately resolved to
points by Emacs, so using markers here is just unncessary overhead.
---
I originally did this for performance, since Emacs has to scan all
un-GC'd markers on every buffer change, but it turns out to matter
notmuch.

 emacs/notmuch.el |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index a8e4d62..f15a75b 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -805,12 +805,12 @@ non-authors is found, assume that all of the authors match."
 		      (goto-char (point-max))
 		      (if (/= (match-beginning 1) line)
 			  (insert (concat "Error: Unexpected output from notmuch search:\n" (substring string line (match-beginning 1)) "\n")))
-		      (let ((beg (point-marker)))
+		      (let ((beg (point)))
 			(notmuch-search-show-result date count authors subject tags)
-			(notmuch-search-color-line beg (point-marker) tag-list)
-			(put-text-property beg (point-marker) 'notmuch-search-thread-id thread-id)
-			(put-text-property beg (point-marker) 'notmuch-search-authors authors)
-			(put-text-property beg (point-marker) 'notmuch-search-subject subject)
+			(notmuch-search-color-line beg (point) tag-list)
+			(put-text-property beg (point) 'notmuch-search-thread-id thread-id)
+			(put-text-property beg (point) 'notmuch-search-authors authors)
+			(put-text-property beg (point) 'notmuch-search-subject subject)
 			(if (string= thread-id notmuch-search-target-thread)
 			    (progn
 			      (set 'found-target beg)
-- 
1.7.7.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-24 12:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-21  1:07 [PATCH] emacs: Avoid unnecessary markers Austin Clements
2011-11-21  1:11 ` Dmitry Kurochkin
2011-11-24 12:53 ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).