Make inversion.el obsolete (Bug#46841)

* lisp/cedet/inversion.el:
* test/lisp/cedet/inversion-tests.el: Move from here...
* lisp/obsolete/inversion.el:
* test/lisp/obsolete/inversion-tests.el: ...to here.

* lisp/cedet/cedet.el (cedet-version): Make obsolete.
* lisp/cedet/cedet-cscope.el (cedet-cscope-version-check):
* lisp/cedet/cedet-global.el (cedet-gnu-global-version-check):
* lisp/cedet/cedet-idutils.el (cedet-idutils-version-check):
* lisp/cedet/ede/make.el (ede-make-check-version): Use 'version<'
instead of 'inversion-check-version'.
* lisp/cedet/semantic/db-file.el (semanticdb-load-database): Don't
use 'inversion-test'.
* lisp/cedet/semantic/ede-grammar.el
(ede-proj-makefile-insert-variables): Don't add inversion to
loadpath.
* lisp/speedbar.el: Remove stale comment.
This commit is contained in:
Stefan Kangas 2021-03-03 19:54:37 +01:00
parent 9ef8a3bfca
commit 356636c6a1
12 changed files with 25 additions and 92 deletions

View file

@ -2259,7 +2259,10 @@ This is no longer supported, and setting this variable has no effect.
Use macro 'with-current-buffer-window' with action alist entry 'body-function'.
---
** The metamail.el library is now marked obsolete.
** The inversion.el library is now obsolete.
---
** The metamail.el library is now obsolete.
---
** Some obsolete variable and function aliases in dbus.el have been removed.

View file

@ -26,8 +26,6 @@
;;; Code:
(declare-function inversion-check-version "inversion")
(defvar cedet-cscope-min-version "15.7"
"Minimum version of CScope required.")
@ -139,7 +137,6 @@ If optional programmatic argument NOERROR is non-nil,
then instead of throwing an error if CScope isn't available,
return nil."
(interactive)
(require 'inversion)
(let ((b (condition-case nil
(cedet-cscope-call (list "-V"))
(error nil)))
@ -153,7 +150,7 @@ return nil."
(goto-char (point-min))
(re-search-forward "cscope: version \\([0-9.]+\\)" nil t)
(setq rev (match-string 1))
(if (inversion-check-version rev nil cedet-cscope-min-version)
(if (version< rev cedet-cscope-min-version)
(if noerror
nil
(error "Version of CScope is %s. Need at least %s"

View file

@ -24,8 +24,6 @@
;;
;; Basic support for calling GNU Global, and testing version numbers.
(declare-function inversion-check-version "inversion")
(defvar cedet-global-min-version "5.0"
"Minimum version of GNU Global required.")
@ -143,7 +141,6 @@ If optional programmatic argument NOERROR is non-nil,
then instead of throwing an error if Global isn't available,
return nil."
(interactive)
(require 'inversion)
(let ((b (condition-case nil
(cedet-gnu-global-call (list "--version"))
(error nil)))
@ -157,7 +154,7 @@ return nil."
(goto-char (point-min))
(re-search-forward "(?GNU GLOBAL)? \\([0-9.]+\\)" nil t)
(setq rev (match-string 1))
(if (inversion-check-version rev nil cedet-global-min-version)
(if (version< rev cedet-global-min-version)
(if noerror
nil
(error "Version of GNU Global is %s. Need at least %s"

View file

@ -29,8 +29,6 @@
;;; Code:
(declare-function inversion-check-version "inversion")
(defvar cedet-idutils-min-version "4.0"
"Minimum version of ID Utils required.")
@ -167,7 +165,6 @@ If optional programmatic argument NOERROR is non-nil,
then instead of throwing an error if Global isn't available,
return nil."
(interactive)
(require 'inversion)
(let ((b (condition-case nil
(cedet-idutils-fnid-call (list "--version"))
(error nil)))
@ -182,7 +179,7 @@ return nil."
(if (re-search-forward "fnid - \\([0-9.]+\\)" nil t)
(setq rev (match-string 1))
(setq rev "0"))
(if (inversion-check-version rev nil cedet-idutils-min-version)
(if (version< rev cedet-idutils-min-version)
(if noerror
nil
(error "Version of ID Utils is %s. Need at least %s"

View file

@ -85,6 +85,7 @@ for the specified PACKAGE.
LOADED VERSION is the version of PACKAGE currently loaded in Emacs
memory and (presumably) running in this Emacs instance. Value is X
if the package has not been loaded."
(declare (obsolete emacs-version "28.1"))
(interactive)
(require 'inversion)
(with-output-to-temp-buffer "*CEDET*"

View file

@ -30,8 +30,6 @@
;;; Code:
(declare-function inversion-check-version "inversion")
(defsubst ede--find-executable (exec)
"Return an expanded file name for a program EXEC on the exec path."
(declare (obsolete locate-file "28.1"))
@ -60,8 +58,7 @@ If NOERROR is nil, then throw an error on failure. Return t otherwise."
(let ((b (get-buffer-create "*EDE Make Version*"))
(cd default-directory)
(rev nil)
(ans nil)
)
(ans nil))
(with-current-buffer b
;; Setup, and execute make.
(setq default-directory cd)
@ -70,18 +67,18 @@ If NOERROR is nil, then throw an error on failure. Return t otherwise."
"--version")
;; Check the buffer for the string
(goto-char (point-min))
(when (looking-at "GNU Make\\(?: version\\)? \\([0-9][^,]+\\),")
(when (looking-at "GNU Make\\(?: version\\)? \\([0-9][^,[:space:]]+\\),?")
(setq rev (match-string 1))
(require 'inversion)
(setq ans (not (inversion-check-version rev nil ede-make-min-version))))
(setq ans (not (version< rev ede-make-min-version))))
;; Answer reporting.
(when (and (called-interactively-p 'interactive) ans)
(message "GNU Make version %s. Good enough for CEDET." rev))
(when (and (not noerror) (not ans))
(error "EDE requires GNU Make version %s or later. Configure `ede-make-command' to fix"
ede-make-min-version))
(error "EDE requires GNU Make version %s or later (found %s). Configure `ede-make-command' to fix"
ede-make-min-version
rev))
ans)))
(provide 'ede/make)

View file

@ -57,6 +57,7 @@ excluded if a released version is required.
It is assumed that if the current version is newer than that specified,
everything passes. Exceptions occur when known incompatibilities are
introduced."
(declare (obsolete emacs-version "28.1"))
(require 'inversion)
(inversion-test 'semantic
(concat major "." minor

View file

@ -154,8 +154,6 @@ If DIRECTORY doesn't exist, create a new one."
;;; File IO
(declare-function inversion-test "inversion")
(defun semanticdb-load-database (filename)
"Load the database FILENAME."
(condition-case foo
@ -163,32 +161,19 @@ If DIRECTORY doesn't exist, create a new one."
'semanticdb-project-database-file))
(c (semanticdb-get-database-tables r))
(tv (oref r semantic-tag-version))
(fv (oref r semanticdb-version))
)
(fv (oref r semanticdb-version)))
;; Restore the parent-db connection
(while c
(oset (car c) parent-db r)
(setq c (cdr c)))
(unless (and (equal semanticdb-file-version fv)
(equal semantic-tag-version tv))
;; Try not to load inversion unless we need it:
(require 'inversion)
(if (not (inversion-test 'semanticdb-file fv))
(when (inversion-test 'semantic-tag tv)
;; Incompatible version. Flush tables.
(semanticdb-flush-database-tables r)
;; Reset the version to new version.
(oset r semantic-tag-version semantic-tag-version)
;; Warn user
(message "Semanticdb file is old. Starting over for %s"
filename))
;; Version is not ok. Flush whole system
(message "semanticdb file is old. Starting over for %s"
filename)
;; This database is so old, we need to replace it.
;; We also need to delete it from the instance tracker.
(delete-instance r)
(setq r nil)))
;; Version is not ok. Flush whole system
(message "semanticdb file is old. Starting over for %s" filename)
;; This database is so old, we need to replace it.
;; We also need to delete it from the instance tracker.
(delete-instance r)
(setq r nil))
r)
(error (message "Cache Error: [%s] %s, Restart"
filename foo)

View file

@ -162,10 +162,9 @@ Lays claim to all -by.el, and -wy.el files."
"Insert variables needed by target THIS."
(ede-proj-makefile-insert-loadpath-items
(ede-proj-elisp-packages-to-loadpath
(list "eieio" "semantic" "inversion" "ede")))
(list "eieio" "semantic" "ede")))
;; eieio for object system needed in ede
;; semantic because it is
;; Inversion for versioning system.
;; ede for project regeneration
(ede-pmake-insert-variable-shared
(concat (ede-pmake-varname this) "_SEMANTIC_GRAMMAR_EL")
@ -174,8 +173,7 @@ Lays claim to all -by.el, and -wy.el files."
(with-current-buffer (find-file-noselect src)
(concat (semantic-grammar-package) ".el")))
(oref this source)
" ")))
)
" "))))
(cl-defmethod ede-proj-makefile-insert-rules :after ((this semantic-ede-proj-target-grammar))
"Insert rules needed by THIS target.

View file

@ -5,6 +5,7 @@
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Version: 1.3
;; Keywords: OO, lisp
;; Obsolete-since: 28.1
;; This file is part of GNU Emacs.
@ -524,31 +525,6 @@ The package should have VERSION available for download."
(copy-file (cdr (car files)) dest))))))
;;; How we upgrade packages in Emacs has yet to be ironed out.
;; (defun inversion-upgrade-package (package &optional directory)
;; "Try to upgrade PACKAGE in DIRECTORY is available."
;; (interactive "sPackage to upgrade: ")
;; (if (stringp package) (setq package (intern package)))
;; (if (not directory)
;; ;; Hope that the package maintainer specified.
;; (setq directory (symbol-value (or (intern-soft
;; (concat (symbol-name package)
;; "-url"))
;; (intern-soft
;; (concat (symbol-name package)
;; "-directory"))))))
;; (let ((files (inversion-locate-package-files-and-split
;; package directory))
;; (cver (inversion-package-version package))
;; (newer nil))
;; (mapc (lambda (f)
;; (if (inversion-< cver (inversion-decode-version (car f)))
;; (setq newer (cons f newer))))
;; files)
;; newer
;; ))
(provide 'inversion)
;;; inversion.el ends here

View file

@ -141,25 +141,6 @@
;;; Code:
;; Note: `inversion-test' requires parts of the CEDET package that are
;; not included with Emacs.
;;
;; (defun speedbar-require-version (major minor &optional beta)
;; "Non-nil if this version of SPEEDBAR does not satisfy a specific version.
;; Arguments can be:
;;
;; (MAJOR MINOR &optional BETA)
;;
;; Values MAJOR and MINOR must be integers. BETA can be an integer, or
;; excluded if a released version is required.
;;
;; It is assumed that if the current version is newer than that specified,
;; everything passes. Exceptions occur when known incompatibilities are
;; introduced."
;; (inversion-test 'speedbar
;; (concat major "." minor
;; (when beta (concat "beta" beta)))))
(defvar speedbar-initial-expansion-mode-alist
'(("buffers" speedbar-buffer-easymenu-definition speedbar-buffers-key-map
speedbar-buffer-buttons)