GNU bug report logs - #3948
23.1.50; Please mark list-colors buffer unmodified

Previous Next

Package: emacs;

Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>

Date: Mon, 27 Jul 2009 16:30:03 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 3948 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: 3948 <at> debbugs.gnu.org
Subject: Re: bug#3948: 23.1.50; Please mark list-colors buffer unmodified
Date: Wed, 05 Aug 2009 00:33:51 +0300
> It is rather annoying that it is marked as modified. Perhaps there are
> more buffers that are marked modified but are not that?

`list-colors-display' is non-standard since it outputs the buffer's
content in `temp-buffer-show-hook' to be able to align hex numbers
at the window's right edge.  This can be fixed by restoring the
`modified' flag explicitly:

Index: lisp/facemenu.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/facemenu.el,v
retrieving revision 1.108
diff -c -r1.108 facemenu.el
*** lisp/facemenu.el	18 Apr 2009 13:50:23 -0000	1.108
--- lisp/facemenu.el	4 Aug 2009 21:32:16 -0000
***************
*** 493,499 ****
  	;; to get the right value of window-width in list-colors-print
  	;; after the buffer is displayed.
  	(add-hook 'temp-buffer-show-hook
! 		  (lambda () (list-colors-print list)) nil t)))))
  
  (defun list-colors-print (list)
    (dolist (color list)
--- 574,584 ----
  	;; to get the right value of window-width in list-colors-print
  	;; after the buffer is displayed.
  	(add-hook 'temp-buffer-show-hook
! 		  (lambda ()
! 		    (set-buffer-modified-p
! 		     (prog1 (buffer-modified-p)
! 		       (list-colors-print list))))
! 		  nil t)))))
  
  (defun list-colors-print (list)
    (dolist (color list)

-- 
Juri Linkov
http://www.jurta.org/emacs/



This bug report was last modified 15 years and 203 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.