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.
This commit is contained in:
parent
9a3a2a00da
commit
e1290f4713
4 changed files with 14 additions and 32 deletions
|
@ -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)
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue