all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#15938: diff-mode mishandles diff-default-read-only
@ 2013-11-20 19:47 Ivan Shmakov
  2013-11-23  2:57 ` Glenn Morris
  0 siblings, 1 reply; 4+ messages in thread
From: Ivan Shmakov @ 2013-11-20 19:47 UTC (permalink / raw
  To: 15938

	In addition to making the -*- Diff -*- buffers read-only when
	diff-default-read-only is non-nil, diff-mode also makes such
	buffers /writable/ when diff-default-read-only is nil, while per
	the documentation, I’d expect for diff-mode to have no effect on
	buffer-read-only in this latter case.

	Please consider the patch below, which seems to fix the issue.

--- diff-mode.el.~1~
+++ diff-mode.el	2013-11-20 19:42:41.000000000 +0000
@@ -1366,7 +1366,8 @@ (define-derived-mode diff-mode fundamental-mode "Diff"
 
   (diff-setup-whitespace)
 
-  (setq buffer-read-only diff-default-read-only)
+  (when diff-default-read-only
+    (setq buffer-read-only t))
   ;; setup change hooks
   (if (not diff-update-on-the-fly)
       (add-hook 'write-contents-functions 'diff-write-contents-hooks nil t)

-- 
FSF associate member #7257





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

* bug#15938: diff-mode mishandles diff-default-read-only
  2013-11-20 19:47 bug#15938: diff-mode mishandles diff-default-read-only Ivan Shmakov
@ 2013-11-23  2:57 ` Glenn Morris
  2013-11-23  8:14   ` Ivan Shmakov
  0 siblings, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2013-11-23  2:57 UTC (permalink / raw
  To: 15938-done

Version: 24.4

Thanks; applied.

(BTW, we'd probably need a copyright assignment to accept anything more
than 2-3 lines more from you in future. So maybe think about starting
that process if you expect to contribute more.)





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

* bug#15938: diff-mode mishandles diff-default-read-only
  2013-11-23  2:57 ` Glenn Morris
@ 2013-11-23  8:14   ` Ivan Shmakov
  2013-11-23 18:54     ` Glenn Morris
  0 siblings, 1 reply; 4+ messages in thread
From: Ivan Shmakov @ 2013-11-23  8:14 UTC (permalink / raw
  To: 15938

>>>>> Glenn Morris <rgm@gnu.org> writes:

 > Version: 24.4 Thanks; applied.

 > (BTW, we'd probably need a copyright assignment to accept anything
 > more than 2-3 lines more from you in future.  So maybe think about
 > starting that process if you expect to contribute more.)

	JFTR, does that mean 2–3 LoC /in total/, or 2–3 LoC
	/per change/?  I have no plans on working on substantial changes
	to Emacs at this moment, though I hope to contribute some more
	trivial bug fixes, just like those I’ve sent recently.

-- 
FSF associate member #7257





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

* bug#15938: diff-mode mishandles diff-default-read-only
  2013-11-23  8:14   ` Ivan Shmakov
@ 2013-11-23 18:54     ` Glenn Morris
  0 siblings, 0 replies; 4+ messages in thread
From: Glenn Morris @ 2013-11-23 18:54 UTC (permalink / raw
  To: Ivan Shmakov; +Cc: 15938

Ivan Shmakov wrote:

>  > (BTW, we'd probably need a copyright assignment to accept anything
>  > more than 2-3 lines more from you in future.  So maybe think about
>  > starting that process if you expect to contribute more.)
>
> 	JFTR, does that mean 2–3 LoC /in total/, or 2–3 LoC
> 	/per change/?  I have no plans on working on substantial changes
> 	to Emacs at this moment, though I hope to contribute some more
> 	trivial bug fixes, just like those I've sent recently.

2-3 lines in total. So if you prefer not to do an assignment, it's best
if future reports just describe what the problem is, without including
patches.





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

end of thread, other threads:[~2013-11-23 18:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-20 19:47 bug#15938: diff-mode mishandles diff-default-read-only Ivan Shmakov
2013-11-23  2:57 ` Glenn Morris
2013-11-23  8:14   ` Ivan Shmakov
2013-11-23 18:54     ` Glenn Morris

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.