[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master e1290f4 2/3: Remove some Emacs 20 compat code
From: |
Stefan Kangas |
Subject: |
master e1290f4 2/3: Remove some Emacs 20 compat code |
Date: |
Mon, 21 Sep 2020 19:14:45 -0400 (EDT) |
branch: master
commit e1290f471314c2d9cce9c74429a31303edf88b3f
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>
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.
---
lisp/apropos.el | 14 ++++++--------
lisp/progmodes/antlr-mode.el | 5 ++---
lisp/progmodes/idlwave.el | 3 +--
lisp/textmodes/artist.el | 24 +++++-------------------
4 files changed, 14 insertions(+), 32 deletions(-)
diff --git a/lisp/apropos.el b/lisp/apropos.el
index 6d8c784..e7e8955 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 24e1f88..29adf3b 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 90e5694..121f5d6 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 9c94fff..75b13bd 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.