]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove Emacs 20 compat code for header-line-format
authorStefan Kangas <stefan@marxist.se>
Fri, 5 Feb 2021 00:33:25 +0000 (01:33 +0100)
committerStefan Kangas <stefan@marxist.se>
Fri, 5 Feb 2021 00:33:25 +0000 (01:33 +0100)
* 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.

lisp/cedet/semantic/util-modes.el
lisp/erc/erc.el
lisp/ibuffer.el

index f8d6bb759b0f29270b9bb0738eb9f37f5a2a3658..0de66d29e3e175f2d5eba9e19c7cdd0c3c21bbcc 100644 (file)
@@ -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))
index 37e4cc39d53e9cf906c2139eaaed1a1387332dc4..dd7f50fb381f20d14141741cb9129de706abde69 100644 (file)
@@ -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)
index c0a6d16c6f82e34b234e5186f39e23616f04bfb0..6dc1c7ebc2b02696cb14b9f04ea446c1138a376e 100644 (file)
@@ -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)