From: Stefan Kangas Date: Mon, 21 Sep 2020 22:57:22 +0000 (+0200) Subject: Remove some Emacs 20 compat code X-Git-Tag: emacs-28.0.90~5942 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e1290f471314c2d9cce9c74429a31303edf88b3f;p=emacs.git Remove some Emacs 20 compat code * 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. --- diff --git a/lisp/apropos.el b/lisp/apropos.el index 6d8c7847b02..e7e8955afe8 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el @@ -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) diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index 24e1f8831a0..29adf3b1901 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el @@ -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" diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 90e56943f20..121f5d63044 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -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) diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index 9c94fff12c3..75b13bd7d8e 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el @@ -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.