[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/whitespace.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/whitespace.el |
Date: |
Fri, 08 Apr 2005 10:40:58 -0400 |
Index: emacs/lisp/whitespace.el
diff -c emacs/lisp/whitespace.el:1.31 emacs/lisp/whitespace.el:1.32
*** emacs/lisp/whitespace.el:1.31 Fri Apr 8 14:26:13 2005
--- emacs/lisp/whitespace.el Fri Apr 8 14:40:57 2005
***************
*** 489,504 ****
(if whitespace-spacetab "s")
(if whitespace-trailing "t")))))
(whitespace-update-modeline whitespace-this-modeline)
! (save-excursion
! (get-buffer-create whitespace-errbuf)
! (kill-buffer whitespace-errbuf)
! (get-buffer-create whitespace-errbuf)
! (set-buffer whitespace-errbuf)
(if whitespace-errmsg
(progn
(insert whitespace-errmsg)
(if (not (or quiet whitespace-silent))
! (display-buffer whitespace-errbuf t))
(if (not quiet)
(message "Whitespaces: [%s%s] in %s"
whitespace-this-modeline
--- 489,502 ----
(if whitespace-spacetab "s")
(if whitespace-trailing "t")))))
(whitespace-update-modeline whitespace-this-modeline)
! (if (get-buffer whitespace-errbuf)
! (kill-buffer whitespace-errbuf))
! (with-current-buffer (get-buffer-create whitespace-errbuf)
(if whitespace-errmsg
(progn
(insert whitespace-errmsg)
(if (not (or quiet whitespace-silent))
! (display-buffer (current-buffer) t))
(if (not quiet)
(message "Whitespaces: [%s%s] in %s"
whitespace-this-modeline
***************
*** 511,519 ****
(if (and (not quiet) (not (equal whitespace-clean-msg "")))
(message "%s %s" whitespace-filename
whitespace-clean-msg))))))))
! (if whitespace-error
! t
! nil)))
;;;###autoload
(defun whitespace-region (s e)
--- 509,515 ----
(if (and (not quiet) (not (equal whitespace-clean-msg "")))
(message "%s %s" whitespace-filename
whitespace-clean-msg))))))))
! whitespace-error))
;;;###autoload
(defun whitespace-region (s e)
***************
*** 736,758 ****
(defun whitespace-highlight-the-space (b e)
"Highlight the current line, unhighlighting a previously jumped to line."
(if whitespace-display-spaces-in-color
! (progn
(whitespace-unhighlight-the-space)
! (add-to-list 'whitespace-highlighted-space
! (whitespace-make-overlay b e))
! (whitespace-overlay-put (whitespace-make-overlay b e) 'face
! 'whitespace-highlight-face))))
;; (add-hook 'pre-command-hook 'whitespace-unhighlight-the-space))
(defun whitespace-unhighlight-the-space ()
"Unhighlight the currently highlight line."
(if (and whitespace-display-spaces-in-color whitespace-highlighted-space)
! (let ((whitespace-this-space nil))
! (while whitespace-highlighted-space
! (setq whitespace-this-space (car whitespace-highlighted-space))
! (setq whitespace-highlighted-space
! (cdr whitespace-highlighted-space))
! (whitespace-delete-overlay whitespace-this-space))
(setq whitespace-highlighted-space nil))
(remove-hook 'pre-command-hook 'whitespace-unhighlight-the-space)))
--- 732,748 ----
(defun whitespace-highlight-the-space (b e)
"Highlight the current line, unhighlighting a previously jumped to line."
(if whitespace-display-spaces-in-color
! (let ((ol (whitespace-make-overlay b e)))
(whitespace-unhighlight-the-space)
! (push ol whitespace-highlighted-space)
! (whitespace-overlay-put ol 'face 'whitespace-highlight-face))))
;; (add-hook 'pre-command-hook 'whitespace-unhighlight-the-space))
(defun whitespace-unhighlight-the-space ()
"Unhighlight the currently highlight line."
(if (and whitespace-display-spaces-in-color whitespace-highlighted-space)
! (progn
! (mapc 'whitespace-delete-overlay whitespace-highlighted-space)
(setq whitespace-highlighted-space nil))
(remove-hook 'pre-command-hook 'whitespace-unhighlight-the-space)))
***************
*** 863,867 ****
(provide 'whitespace)
! ;;; arch-tag: 4ff44e87-b63c-402d-95a6-15e51e58bd0c
;;; whitespace.el ends here
--- 853,857 ----
(provide 'whitespace)
! ;; arch-tag: 4ff44e87-b63c-402d-95a6-15e51e58bd0c
;;; whitespace.el ends here
- [Emacs-diffs] Changes to emacs/lisp/whitespace.el,
Stefan Monnier <=