mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Remove Emacs 20 compat code for header-line-format
* lisp/cedet/semantic/util-modes.el (semantic-stickyfunc-mode): * lisp/erc/erc.el (erc-update-mode-line-buffer): * lisp/ibuffer.el (ibuffer-use-header-line): Remove Emacs 20 compat code; header-line-format is always defined starting with Emacs 21.
This commit is contained in:
parent
1a35d2e673
commit
574f71b739
3 changed files with 26 additions and 31 deletions
|
|
@ -691,10 +691,6 @@ non-nil if the minor mode is enabled."
|
|||
;; Disable minor mode if semantic stuff not available
|
||||
(setq semantic-stickyfunc-mode nil)
|
||||
(error "Buffer %s was not set up for parsing" (buffer-name)))
|
||||
(unless (boundp 'header-line-format)
|
||||
;; Disable if there are no header lines to use.
|
||||
(setq semantic-stickyfunc-mode nil)
|
||||
(error "Sticky Function mode requires Emacs"))
|
||||
;; Enable the mode
|
||||
;; Save previous buffer local value of header line format.
|
||||
(when (and (local-variable-p 'header-line-format (current-buffer))
|
||||
|
|
|
|||
|
|
@ -6464,32 +6464,31 @@ if `erc-away' is non-nil."
|
|||
(setq mode-line-buffer-identification
|
||||
(list (format-spec erc-mode-line-format spec)))
|
||||
(setq mode-line-process (list process-status))
|
||||
(when (boundp 'header-line-format)
|
||||
(let ((header (if erc-header-line-format
|
||||
(format-spec erc-header-line-format spec)
|
||||
nil)))
|
||||
(cond (erc-header-line-uses-tabbar-p
|
||||
(setq-local tabbar--local-hlf header-line-format)
|
||||
(kill-local-variable 'header-line-format))
|
||||
((null header)
|
||||
(setq header-line-format nil))
|
||||
(erc-header-line-uses-help-echo-p
|
||||
(let ((help-echo (with-temp-buffer
|
||||
(insert header)
|
||||
(fill-region (point-min) (point-max))
|
||||
(buffer-string))))
|
||||
(setq header-line-format
|
||||
(replace-regexp-in-string
|
||||
"%"
|
||||
"%%"
|
||||
(if face
|
||||
(propertize header 'help-echo help-echo
|
||||
'face face)
|
||||
(propertize header 'help-echo help-echo))))))
|
||||
(t (setq header-line-format
|
||||
(if face
|
||||
(propertize header 'face face)
|
||||
header)))))))
|
||||
(let ((header (if erc-header-line-format
|
||||
(format-spec erc-header-line-format spec)
|
||||
nil)))
|
||||
(cond (erc-header-line-uses-tabbar-p
|
||||
(setq-local tabbar--local-hlf header-line-format)
|
||||
(kill-local-variable 'header-line-format))
|
||||
((null header)
|
||||
(setq header-line-format nil))
|
||||
(erc-header-line-uses-help-echo-p
|
||||
(let ((help-echo (with-temp-buffer
|
||||
(insert header)
|
||||
(fill-region (point-min) (point-max))
|
||||
(buffer-string))))
|
||||
(setq header-line-format
|
||||
(replace-regexp-in-string
|
||||
"%"
|
||||
"%%"
|
||||
(if face
|
||||
(propertize header 'help-echo help-echo
|
||||
'face face)
|
||||
(propertize header 'help-echo help-echo))))))
|
||||
(t (setq header-line-format
|
||||
(if face
|
||||
(propertize header 'face face)
|
||||
header))))))
|
||||
(force-mode-line-update)))
|
||||
|
||||
(defun erc-update-mode-line (&optional buffer)
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@ This variable takes precedence over filtering, and even
|
|||
in completion lists of the `ibuffer-jump-to-buffer' command."
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom ibuffer-use-header-line (boundp 'header-line-format)
|
||||
(defcustom ibuffer-use-header-line t
|
||||
"If non-nil, display a header line containing current filters."
|
||||
:type 'boolean)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue