[emacs-debian commit] Apply patch preventing an infinite loop in
whitespace.el if kill-read-only is set to t (#273123) @
emacs-debian--main--21.4
Jérôme Marant
jerome at marant.org
Wed Aug 24 19:44:17 UTC 2005
Revision: emacs-debian--main--21.4--patch-16
Archive: jerome at debian.org--2005
Creator: Jerome Marant <jerome at marant.org>
Date: mer aoû 24 21:43:22 CEST 2005
Standard-date: 2005-08-24 19:43:22 GMT
New-files: patches/.arch-ids/whitespace-readonly-infloop.dpatch.id
patches/whitespace-readonly-infloop.dpatch
Modified-files: changelog patches/00list
New-patches: jerome at debian.org--2005/emacs-debian--main--21.4--patch-16
Summary: Apply patch preventing an infinite loop in whitespace.el if kill-read-only is set to t (#273123)
Keywords:
* looking for jerome at debian.org--2005/emacs-debian--main--21.4--patch-15 to compare with
* build pristine tree for jerome at debian.org--2005/emacs-debian--main--21.4--patch-15
* comparing to jerome at debian.org--2005/emacs-debian--main--21.4--patch-15: ..... done.
* modified files
--- orig/changelog
+++ mod/changelog
@@ -31,6 +31,12 @@
This patch has been backported from Emacs CVS trunk. [Jérôme Marant]
- debian/patches/xorg-altgr-fix.dpatch: new file.
- debian/00list: updated.
+
+ * Apply patch preventing an infinite loop in whitespace.el if kill-read-only
+ is set to t. Thanks to Romain Francoise <rfrancoise at debian.org>
+ (closes: #273123) [Jérôme Marant]
+ - debian/patches/whitespace-readonly-infloop.dpatch: new file.
+ - debian/00list: updated.
--
--- orig/patches/00list
+++ mod/patches/00list
@@ -24,5 +24,6 @@
arch-ppc64
multibyte-char-key-modifiers
xorg-altgr-fix
+whitespace-readonly-infloop
fix-x-vs-no-x-diffs
autofiles
* added files
--- /dev/null
+++ mod/patches/.arch-ids/whitespace-readonly-infloop.dpatch.id
@@ -0,0 +1 @@
+Jerome Marant <jerome at marant.org> Wed Aug 24 21:10:47 2005 30902.0
--- /dev/null
+++ mod/patches/whitespace-readonly-infloop.dpatch
@@ -0,0 +1,66 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## whitespace-readonly-infloop.dpatch by Romain Francoise <rfrancoise at debian.org>
+##
+## DP: ** Avoid an infinite loop in whitespace.el if kill-read-only is
+## DP: set to t.
+## DP: Status: has been incorporated upstream
+## DP: Provided by: Richard Stallman <rms at gnu.org>
+## DP: Date: Tue, 09 Aug 2005 16:47:25 +0200
+
+ at DPATCH@
+diff -urNad --exclude=CVS --exclude=.svn ./lisp/whitespace.el /tmp/dpep-work.Gk47lX/emacs21-21.4a/lisp/whitespace.el
+--- ./lisp/whitespace.el 2001-08-20 22:56:08.000000000 +0200
++++ /tmp/dpep-work.Gk47lX/emacs21-21.4a/lisp/whitespace.el 2005-08-09 16:45:25.000000000 +0200
+@@ -504,17 +504,9 @@
+ (defun whitespace-buffer-leading-cleanup ()
+ "Remove any empty lines at the top of the file."
+ (save-excursion
+- (let ((pmin nil)
+- (pmax nil))
+- (goto-char (point-min))
+- (beginning-of-line)
+- (setq pmin (point))
+- (end-of-line)
+- (setq pmax (point))
+- (if (equal pmin pmax)
+- (progn
+- (kill-line)
+- (whitespace-buffer-leading-cleanup))))))
++ (goto-char (point-min))
++ (skip-chars-forward "\n")
++ (delete-region (point-min) (point))))
+
+ (defun whitespace-buffer-trailing ()
+ "Check to see if are is more than one empty line at the bottom."
+@@ -541,26 +533,11 @@
+ (defun whitespace-buffer-trailing-cleanup ()
+ "Delete all the empty lines at the bottom."
+ (save-excursion
+- (let ((pmin nil)
+- (pmax nil))
+- (goto-char (point-max))
+- (beginning-of-line)
+- (setq pmin (point))
+- (end-of-line)
+- (setq pmax (point))
+- (if (equal pmin pmax)
+- (progn
+- (goto-char (1- pmin))
+- (beginning-of-line)
+- (setq pmin (point))
+- (end-of-line)
+- (setq pmax (point))
+- (if (equal pmin pmax)
+- (progn
+- (goto-char (1- (point-max)))
+- (beginning-of-line)
+- (kill-line)
+- (whitespace-buffer-trailing-cleanup))))))))
++ (goto-char (point-max))
++ (skip-chars-backward "\n")
++ (if (not (bolp))
++ (forward-char 1))
++ (delete-region (point) (point-max))))
+
+ (defun whitespace-buffer-search (regexp)
+ "Search for any given whitespace REGEXP."
More information about the pkg-emacs-commits
mailing list