# HG changeset patch # User Juanma Barranquero # Date 1182595501 0 # Node ID 5872a3a471bd8819759e0810d342daacaee1064b # Parent f39d2bac5438f16543875eadabb96a57247b510b (ruler-mode): Prevent clobbering the original `header-line-format' when reentering ruler mode. diff -r f39d2bac5438 -r 5872a3a471bd lisp/ruler-mode.el --- a/lisp/ruler-mode.el Sat Jun 23 09:52:06 2007 +0000 +++ b/lisp/ruler-mode.el Sat Jun 23 10:45:01 2007 +0000 @@ -29,7 +29,7 @@ ;;; Commentary: ;; This library provides a minor mode to display a ruler in the header -;; line. It works only on Emacs 21. +;; line. It works from Emacs 21 onwards. ;; ;; You can use the mouse to change the `fill-column' `comment-column', ;; `goal-column', `window-margins' and `tab-stop-list' settings: @@ -562,7 +562,8 @@ (progn ;; When `ruler-mode' is on save previous header line format ;; and install the ruler header line format. - (when (local-variable-p 'header-line-format) + (when (and (local-variable-p 'header-line-format) + (not (local-variable-p 'ruler-mode-header-line-format-old))) (set (make-local-variable 'ruler-mode-header-line-format-old) header-line-format)) (setq header-line-format ruler-mode-header-line-format)