From: Stefan Kangas Date: Sat, 16 May 2020 13:22:54 +0000 (+0200) Subject: Remove some XEmacs compat code from semantic X-Git-Tag: emacs-28.0.90~7348 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=436809b705aaf10776af4615a9691406408735eb;p=emacs.git Remove some XEmacs compat code from semantic * lisp/cedet/semantic/wisent/comp.el (wisent-ISVALID-TOKEN) (wisent-parse-nonterminals): * lisp/cedet/semantic/wisent/wisent.el (wisent-item-to-string): Remove XEmacs compatibility code. (wisent-char-p): Redefine as obsolete function alias for 'characterp'. --- diff --git a/lisp/cedet/semantic/wisent/comp.el b/lisp/cedet/semantic/wisent/comp.el index 4e9927f23f1..42c5756b987 100644 --- a/lisp/cedet/semantic/wisent/comp.el +++ b/lisp/cedet/semantic/wisent/comp.el @@ -3053,7 +3053,7 @@ one.") (defsubst wisent-ISVALID-TOKEN (x) "Return non-nil if X is a character or an allowed symbol." - (or (wisent-char-p x) + (or (characterp x) (wisent-ISVALID-VAR x))) (defun wisent-push-token (symbol &optional nocheck) @@ -3143,7 +3143,7 @@ the rule." (cond ((or (memq item token-list) (memq item var-list))) ;; Create new literal character token - ((wisent-char-p item) (wisent-push-token item t)) + ((characterp item) (wisent-push-token item t)) ((error "Symbol `%s' is used, but is not defined as a token and has no rules" item)))) (setq rhl (1+ rhl) diff --git a/lisp/cedet/semantic/wisent/wisent.el b/lisp/cedet/semantic/wisent/wisent.el index d8a35d3e7d3..a0a8bed1eaf 100644 --- a/lisp/cedet/semantic/wisent/wisent.el +++ b/lisp/cedet/semantic/wisent/wisent.el @@ -55,11 +55,8 @@ ;;;; Runtime stuff ;;;; ------------- -;;; Compatibility -(eval-and-compile - (if (fboundp 'char-valid-p) - (defalias 'wisent-char-p 'char-valid-p) - (defalias 'wisent-char-p 'char-or-char-int-p))) +(define-obsolete-function-alias 'wisent-char-p + #'characterp "28.1") ;;; Printed representation of terminals and nonterminals (defconst wisent-escape-sequence-strings @@ -80,7 +77,7 @@ (defsubst wisent-item-to-string (item) "Return a printed representation of ITEM. ITEM can be a nonterminal or terminal symbol, or a character literal." - (if (wisent-char-p item) + (if (characterp item) (or (cdr (assq item wisent-escape-sequence-strings)) (format "'%c'" item)) (symbol-name item)))