emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/whitespace.el


From: Richard M . Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/whitespace.el
Date: Fri, 08 Jul 2005 18:33:00 -0400

Index: emacs/lisp/whitespace.el
diff -c emacs/lisp/whitespace.el:1.37 emacs/lisp/whitespace.el:1.38
*** emacs/lisp/whitespace.el:1.37       Mon Jul  4 23:09:00 2005
--- emacs/lisp/whitespace.el    Fri Jul  8 22:33:00 2005
***************
*** 608,624 ****
  (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))))))
  
  (defun whitespace-buffer-trailing ()
    "Check to see if are is more than one empty line at the bottom."
--- 608,616 ----
  (defun whitespace-buffer-leading-cleanup ()
    "Remove any empty lines at the top of the file."
    (save-excursion
!     (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."
***************
*** 647,672 ****
  (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))))))))
  
  (defun whitespace-buffer-search (regexp)
    "Search for any given whitespace REGEXP."
--- 639,649 ----
  (defun whitespace-buffer-trailing-cleanup ()
    "Delete all the empty lines at the bottom."
    (save-excursion
!     (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."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]