GNU bug report logs -
#75993
Special mode-class for diff-mode
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Sat, 1 Feb 2025 17:37:01 UTC
Severity: normal
Tags: patch
Fixed in version 31.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Tags: patch
Visiting a diff file and trying to copy lines with 'w' (diff-kill-ring-save)
does something unexpected since view-mode overrides 'w' with
'View-scroll-page-backward-set-page-size' for non-nil 'view-read-only'.
Here is the fix like for all modes that use single-letter keys:
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index 77807fc4f35..b88dd4bf736 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -1550,6 +1550,7 @@ diff-mode-read-only
(defvar whitespace-style)
(defvar whitespace-trailing-regexp)
+(put 'diff-mode 'mode-class 'special)
;;;###autoload
(define-derived-mode diff-mode fundamental-mode "Diff"
"Major mode for viewing/editing context diffs.
This bug report was last modified 103 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.