diff options
| author | Juanma Barranquero | 2007-06-23 10:19:39 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2007-06-23 10:19:39 +0000 |
| commit | 68130af73b3e416ac1298210e02462fea6d6f7aa (patch) | |
| tree | 3832af32adbac566a8d687262be5e777fd576fdd /lisp | |
| parent | a65473abf071548d0da2b5a26983788517f44ecd (diff) | |
| download | emacs-68130af73b3e416ac1298210e02462fea6d6f7aa.tar.gz emacs-68130af73b3e416ac1298210e02462fea6d6f7aa.zip | |
(ruler-mode): Prevent clobbering the original `header-line-format'
when reentering ruler mode.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ruler-mode.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/ruler-mode.el b/lisp/ruler-mode.el index b2c48349a05..13895aea2eb 100644 --- a/lisp/ruler-mode.el +++ b/lisp/ruler-mode.el | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | ;;; Commentary: | 29 | ;;; Commentary: |
| 30 | 30 | ||
| 31 | ;; This library provides a minor mode to display a ruler in the header | 31 | ;; This library provides a minor mode to display a ruler in the header |
| 32 | ;; line. It works only on Emacs 21. | 32 | ;; line. It works from Emacs 21 onwards. |
| 33 | ;; | 33 | ;; |
| 34 | ;; You can use the mouse to change the `fill-column' `comment-column', | 34 | ;; You can use the mouse to change the `fill-column' `comment-column', |
| 35 | ;; `goal-column', `window-margins' and `tab-stop-list' settings: | 35 | ;; `goal-column', `window-margins' and `tab-stop-list' settings: |
| @@ -562,7 +562,8 @@ Call `ruler-mode-ruler-function' to compute the ruler value.") | |||
| 562 | (progn | 562 | (progn |
| 563 | ;; When `ruler-mode' is on save previous header line format | 563 | ;; When `ruler-mode' is on save previous header line format |
| 564 | ;; and install the ruler header line format. | 564 | ;; and install the ruler header line format. |
| 565 | (when (local-variable-p 'header-line-format) | 565 | (when (and (local-variable-p 'header-line-format) |
| 566 | (not (local-variable-p 'ruler-mode-header-line-format-old))) | ||
| 566 | (set (make-local-variable 'ruler-mode-header-line-format-old) | 567 | (set (make-local-variable 'ruler-mode-header-line-format-old) |
| 567 | header-line-format)) | 568 | header-line-format)) |
| 568 | (setq header-line-format ruler-mode-header-line-format) | 569 | (setq header-line-format ruler-mode-header-line-format) |