]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove some Emacs 20 compat code
authorStefan Kangas <stefan@marxist.se>
Mon, 21 Sep 2020 22:57:22 +0000 (00:57 +0200)
committerStefan Kangas <stefan@marxist.se>
Mon, 21 Sep 2020 23:01:36 +0000 (01:01 +0200)
* lisp/apropos.el (apropos-local-value):
* lisp/progmodes/antlr-mode.el (antlr-mode-menu):
* lisp/progmodes/idlwave.el (idlwave-attach-classes):
* lisp/textmodes/artist.el (artist-replace-chars): Remove Emacs 20
compat code.

lisp/apropos.el
lisp/progmodes/antlr-mode.el
lisp/progmodes/idlwave.el
lisp/textmodes/artist.el

index 6d8c7847b020eb173f36381bc15c1ea4b7cd6443..e7e8955afe85d6d58cf8d96bad8b6e7f1147955e 100644 (file)
@@ -863,14 +863,12 @@ Optional arg BUFFER (default: current buffer) is the buffer to check."
          (setq apropos-accumulator (cons (list symb (apropos-score-str var) nil var)
                                          apropos-accumulator))))))
   (let ((apropos-multi-type  nil))
-    (if (> emacs-major-version 20)
-        (apropos-print
-         nil "\n----------------\n"
-         (format "Buffer `%s' has the following local variables\nmatching %s`%s':"
-                 (buffer-name buffer)
-                 (if (consp pattern) "keywords " "")
-                 pattern))
-      (apropos-print nil "\n----------------\n"))))
+    (apropos-print
+     nil "\n----------------\n"
+     (format "Buffer `%s' has the following local variables\nmatching %s`%s':"
+             (buffer-name buffer)
+             (if (consp pattern) "keywords " "")
+             pattern))))
 
 ;;;###autoload
 (defun apropos-documentation (pattern &optional do-all)
index 24e1f8831a0e172b7652522f873189e48f6e13c0..29adf3b1901163a34e82cf6fd3818d975b33b1c3 100644 (file)
@@ -720,9 +720,8 @@ imenu."
   "Major mode menu."
   `("Antlr"
     ,@(if (cond-emacs-xemacs
-          :EMACS (and antlr-options-use-submenus
-                      (>= emacs-major-version 21))
-          :XEMACS antlr-options-use-submenus)
+           :EMACS antlr-options-use-submenus
+           :XEMACS antlr-options-use-submenus)
          `(("Insert File Option"
             :filter ,(lambda (x) (antlr-options-menu-filter 1 x)))
            ("Insert Grammar Option"
index 90e56943f20f6f358e3193e61eb947e447b80d9b..121f5d630447e7d6986e5aec85e32ff16960089e 100644 (file)
@@ -6727,8 +6727,7 @@ accumulate information on matching completions."
           (not super-classes)))    ; no possibilities for inheritance
       ;; In these cases, we do not have to do anything
       list
-    (let* ((do-prop (and (>= show-classes 0)
-                        (>= emacs-major-version 21)))
+    (let* ((do-prop (>= show-classes 0))
           (do-buf (not (= show-classes 0)))
           (do-dots t)
           (inherit (if (and (not (eq type 'class-tag)) super-classes)
index 9c94fff12c3bfa30a0823e2bc491cfc3a5a66b89..75b13bd7d8e4ce49c71010c0855226a6abd2dc52 100644 (file)
@@ -1993,25 +1993,11 @@ The replacement is used to convert tabs and new-lines to spaces."
 
 (defun artist-replace-chars (new-char count)
   "Replace characters at point with NEW-CHAR.  COUNT chars are replaced."
-  ;; Check that the variable exists first. The doc says it was added in 19.23.
-  (if (and (and (boundp 'emacs-major-version) (= emacs-major-version 20))
-          (and (boundp 'emacs-minor-version) (<= emacs-minor-version 3)))
-      ;; This is a bug workaround for Emacs 20, versions up to 20.3:
-      ;; The self-insert-command doesn't care about the overwrite-mode,
-      ;; so the insertion is done in the same way as in picture mode.
-      ;; This seems to be a little bit slower.
-      (let* ((replaced-c (artist-get-replacement-char new-char))
-            (replaced-s (make-string count replaced-c)))
-       (artist-move-to-xy (+ (artist-current-column) count)
-                          (artist-current-line))
-       (delete-char (- count))
-       (insert replaced-s))
-    ;; In emacs-19, the self-insert-command works better
-    (let ((overwrite-mode 'overwrite-mode-textual)
-         (fill-column 32765)           ; Large :-)
-         (blink-matching-paren nil))
-      (setq last-command-event (artist-get-replacement-char new-char))
-      (self-insert-command count))))
+  (let ((overwrite-mode 'overwrite-mode-textual)
+        (fill-column 32765)            ; Large :-)
+        (blink-matching-paren nil))
+    (setq last-command-event (artist-get-replacement-char new-char))
+    (self-insert-command count)))
 
 (defsubst artist-replace-string (string &optional see-thru)
   "Replace contents at point with STRING.