emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master e383aad 16/18: Remove XEmacs compat code from cedet


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master e383aad 16/18: Remove XEmacs compat code from cedet
Date: Thu, 20 Jun 2019 06:51:58 -0400 (EDT)

branch: master
commit e383aade0f215b3829600f8c2cb045aa81511042
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Remove XEmacs compat code from cedet
    
    * lisp/cedet/srecode/mode.el (srecode-menu-bar):
    * lisp/cedet/semantic/wisent/comp.el (wisent-debug-flag)
    (wisent-print-results):
    * lisp/cedet/semantic/util-modes.el
    (semantic-stickyfunc-indent-string)
    (semantic-stickyfunc-header-line-format)
    (semantic-highlight-func-mode-map):
    * lisp/cedet/semantic/symref/list.el
    (semantic-symref-list-menu-entries):
    * lisp/cedet/semantic/idle.el ()
    (semantic-idle-breadcrumbs-popup-menu):
    * lisp/cedet/semantic/grammar.el (semantic-grammar-item-value)
    (semantic-grammar-create-package)
    (semantic-grammar-batch-build-packages)
    (semantic-grammar-setup-menu):
    * lisp/cedet/semantic/fw.el (semantic-overlay-live-p)
    (semantic-event-window, semantic-make-local-hook)
    (semantic-run-mode-hooks, semantic-subst-char-in-string)
    (semantic-menu-item, semantic-find-file-noselect):
    * lisp/cedet/semantic/format.el (semantic-format-face-alist)
    (semantic--format-colorize-merge-text):
    * lisp/cedet/semantic/decorate/include.el ()
    (semantic-decoration-on-include-menu)
    (semantic-decoration-on-unknown-include-menu)
    (semantic-decoration-on-fileless-include-menu)
    (semantic-decoration-on-unparsed-include-menu):
    * lisp/cedet/semantic/decorate.el (semantic-set-tag-read-only)
    (semantic-tag-read-only-p):
    * lisp/cedet/mode-local.el (activate-mode-local-bindings):
    * lisp/cedet/data-debug.el (data-debug-overlay-properties): Remove
    XEmacs compat code.
---
 lisp/cedet/data-debug.el                |  22 +--
 lisp/cedet/mode-local.el                |   3 +-
 lisp/cedet/semantic/decorate.el         |  16 +-
 lisp/cedet/semantic/decorate/include.el | 261 +++++++++++++-------------------
 lisp/cedet/semantic/format.el           |  45 +++---
 lisp/cedet/semantic/fw.el               | 162 +++++---------------
 lisp/cedet/semantic/grammar.el          |  22 +--
 lisp/cedet/semantic/idle.el             | 110 +++++++-------
 lisp/cedet/semantic/symref/list.el      |  42 +++--
 lisp/cedet/semantic/util-modes.el       |  19 +--
 lisp/cedet/semantic/wisent/comp.el      |   8 +-
 lisp/cedet/srecode/mode.el              |  82 ++++------
 12 files changed, 292 insertions(+), 500 deletions(-)

diff --git a/lisp/cedet/data-debug.el b/lisp/cedet/data-debug.el
index ffdd9e8..0debbef 100644
--- a/lisp/cedet/data-debug.el
+++ b/lisp/cedet/data-debug.el
@@ -49,25 +49,9 @@
 
 ;;; Compatibility
 ;;
-(if (featurep 'xemacs)
-    (eval-and-compile
-      (defalias 'data-debug-overlay-properties 'extent-properties)
-      (defalias 'data-debug-overlay-p 'extentp)
-      (if (not (fboundp 'propertize))
-         (defun dd-propertize (string &rest properties)
-           "Mimic `propertize' in from Emacs 23."
-           (add-text-properties 0 (length string) properties string)
-           string
-           )
-       (defalias 'dd-propertize 'propertize))
-      )
-  ;; Regular Emacs
-  (eval-and-compile
-    (defalias 'data-debug-overlay-properties 'overlay-properties)
-    (defalias 'data-debug-overlay-p 'overlayp)
-    (defalias 'dd-propertize 'propertize)
-    )
-  )
+(defalias 'data-debug-overlay-properties 'overlay-properties)
+(defalias 'data-debug-overlay-p 'overlayp)
+(defalias 'dd-propertize 'propertize)
 
 ;;; GENERIC STUFF
 ;;
diff --git a/lisp/cedet/mode-local.el b/lisp/cedet/mode-local.el
index fe87d1a..3d2fe45 100644
--- a/lisp/cedet/mode-local.el
+++ b/lisp/cedet/mode-local.el
@@ -296,8 +296,7 @@ Elements are (SYMBOL . PREVIOUS-VALUE), describing one 
variable."
   ;; Hack -
   ;; do not do this if we are inside set-auto-mode as we may be in
   ;; an initialization race condition.
-  (if (or  (and (featurep 'emacs) (boundp 'keep-mode-if-same))
-          (and (featurep 'xemacs) (boundp 'just-from-file-name)))
+  (if (boundp 'keep-mode-if-same)
       ;; We are inside set-auto-mode, as this is an argument that is
       ;; vaguely unique.
 
diff --git a/lisp/cedet/semantic/decorate.el b/lisp/cedet/semantic/decorate.el
index 07e393f..1368c63 100644
--- a/lisp/cedet/semantic/decorate.el
+++ b/lisp/cedet/semantic/decorate.el
@@ -105,21 +105,15 @@ Optional argument WRITABLE should be non-nil to make the 
text writable
 instead of read-only."
   (let ((o (semantic-tag-overlay tag))
        (hook (if writable nil '(semantic-overlay-signal-read-only))))
-    (if (featurep 'xemacs)
-        ;; XEmacs extents have a 'read-only' property.
-        (semantic-overlay-put o 'read-only (not writable))
-      (semantic-overlay-put o 'modification-hooks hook)
-      (semantic-overlay-put o 'insert-in-front-hooks hook)
-      (semantic-overlay-put o 'insert-behind-hooks hook))))
+    (semantic-overlay-put o 'modification-hooks hook)
+    (semantic-overlay-put o 'insert-in-front-hooks hook)
+    (semantic-overlay-put o 'insert-behind-hooks hook)))
 
 (defun semantic-tag-read-only-p (tag)
   "Return non-nil if the current TAG is marked read only."
   (let ((o (semantic-tag-overlay tag)))
-    (if (featurep 'xemacs)
-        ;; XEmacs extents have a 'read-only' property.
-        (semantic-overlay-get o 'read-only)
-      (member 'semantic-overlay-signal-read-only
-              (semantic-overlay-get o 'modification-hooks)))))
+    (member 'semantic-overlay-signal-read-only
+            (semantic-overlay-get o 'modification-hooks))))
 
 ;;; Secondary overlays
 ;;
diff --git a/lisp/cedet/semantic/decorate/include.el 
b/lisp/cedet/semantic/decorate/include.el
index 8a356fc..82dc887 100644
--- a/lisp/cedet/semantic/decorate/include.el
+++ b/lisp/cedet/semantic/decorate/include.el
@@ -42,7 +42,7 @@
 ;;; Code:
 
 ;;; FACES AND KEYMAPS
-(defvar semantic-decoration-mouse-3 (if (featurep 'xemacs) [ button3 ] [ 
mouse-3 ])
+(defvar semantic-decoration-mouse-3 [ mouse-3 ]
   "The keybinding Lisp object to use for binding the right mouse button.")
 
 ;;; Includes that are in a happy state!
@@ -69,47 +69,35 @@ Used by the decoration style: 
`semantic-decoration-on-includes'."
   "Include Menu"
   (list
    "Include"
-   (semantic-menu-item
-    ["What Is This?" semantic-decoration-include-describe
-     :active t
-     :help "Describe why this include has been marked this way." ])
-   (semantic-menu-item
-    ["Visit This Include" semantic-decoration-include-visit
-     :active t
-     :help "Visit this include file." ])
+   ["What Is This?" semantic-decoration-include-describe
+    :active t
+    :help "Describe why this include has been marked this way." ]
+   ["Visit This Include" semantic-decoration-include-visit
+    :active t
+    :help "Visit this include file." ]
    "---"
-   (semantic-menu-item
-    ["Summarize includes current buffer" 
semantic-decoration-all-include-summary
-     :active t
-     :help "Show a summary for the current buffer containing this include." ])
-   (semantic-menu-item
-    ["List found includes (load unparsed)" semanticdb-find-test-translate-path
-     :active t
-     :help "List all includes found for this file, and parse unparsed files." 
])
-   (semantic-menu-item
-    ["List found includes (no loading)" 
semanticdb-find-test-translate-path-no-loading
-     :active t
-     :help "List all includes found for this file, do not parse unparsed 
files." ])
-   (semantic-menu-item
-    ["List all unknown includes" semanticdb-find-adebug-lost-includes
-     :active t
-     :help "Show a list of all includes semantic cannot find for this file." ])
+   ["Summarize includes current buffer" semantic-decoration-all-include-summary
+    :active t
+    :help "Show a summary for the current buffer containing this include." ]
+   ["List found includes (load unparsed)" semanticdb-find-test-translate-path
+    :active t
+    :help "List all includes found for this file, and parse unparsed files." ]
+   ["List found includes (no loading)" 
semanticdb-find-test-translate-path-no-loading
+    :active t
+    :help "List all includes found for this file, do not parse unparsed 
files." ]
+   ["List all unknown includes" semanticdb-find-adebug-lost-includes
+    :active t
+    :help "Show a list of all includes semantic cannot find for this file." ]
    "---"
-   (semantic-menu-item
-    ["Customize System Include Path" semantic-customize-system-include-path
-     :active (get 'semantic-dependency-system-include-path major-mode)
-     :help "Run customize for the system include path for this major mode." ])
-   (semantic-menu-item
-    ["Add a System Include Path" semantic-add-system-include
-     :active t
-     :help "Add an include path for this session." ])
-   (semantic-menu-item
-    ["Remove a System Include Path" semantic-remove-system-include
-     :active t
-     :help "Add an include path for this session." ])
-   ;;["" semantic-decoration-include-
-   ;; :active t
-   ;; :help "" ]
+   ["Customize System Include Path" semantic-customize-system-include-path
+    :active (get 'semantic-dependency-system-include-path major-mode)
+    :help "Run customize for the system include path for this major mode." ]
+   ["Add a System Include Path" semantic-add-system-include
+    :active t
+    :help "Add an include path for this session." ]
+   ["Remove a System Include Path" semantic-remove-system-include
+    :active t
+    :help "Add an include path for this session." ]
    ))
 
 ;;; Unknown Includes!
@@ -139,40 +127,32 @@ Used by the decoration style: 
`semantic-decoration-on-unknown-includes'."
   "Unknown Include Menu"
   (list
    "Unknown Include"
-   (semantic-menu-item
-    ["What Is This?" semantic-decoration-unknown-include-describe
-     :active t
-     :help "Describe why this include has been marked this way." ])
-   (semantic-menu-item
-    ["List all unknown includes" semanticdb-find-adebug-lost-includes
-     :active t
-     :help "Show a list of all includes semantic cannot find for this file." ])
+   ["What Is This?" semantic-decoration-unknown-include-describe
+    :active t
+    :help "Describe why this include has been marked this way." ]
+   ["List all unknown includes" semanticdb-find-adebug-lost-includes
+    :active t
+    :help "Show a list of all includes semantic cannot find for this file." ]
    "---"
-   (semantic-menu-item
-    ["Summarize includes current buffer" 
semantic-decoration-all-include-summary
-     :active t
-     :help "Show a summary for the current buffer containing this include." ])
-   (semantic-menu-item
-    ["List found includes (load unparsed)" semanticdb-find-test-translate-path
-     :active t
-     :help "List all includes found for this file, and parse unparsed files." 
])
-   (semantic-menu-item
-    ["List found includes (no loading)" 
semanticdb-find-test-translate-path-no-loading
-     :active t
-     :help "List all includes found for this file, do not parse unparsed 
files." ])
+   ["Summarize includes current buffer" semantic-decoration-all-include-summary
+    :active t
+    :help "Show a summary for the current buffer containing this include." ]
+   ["List found includes (load unparsed)" semanticdb-find-test-translate-path
+    :active t
+    :help "List all includes found for this file, and parse unparsed files." ]
+   ["List found includes (no loading)" 
semanticdb-find-test-translate-path-no-loading
+    :active t
+    :help "List all includes found for this file, do not parse unparsed 
files." ]
    "---"
-   (semantic-menu-item
-    ["Customize System Include Path" semantic-customize-system-include-path
-     :active (get 'semantic-dependency-system-include-path major-mode)
-     :help "Run customize for the system include path for this major mode." ])
-   (semantic-menu-item
-    ["Add a System Include Path" semantic-add-system-include
-     :active t
-     :help "Add an include path for this session." ])
-   (semantic-menu-item
-    ["Remove a System Include Path" semantic-remove-system-include
-     :active t
-     :help "Add an include path for this session." ])
+   ["Customize System Include Path" semantic-customize-system-include-path
+    :active (get 'semantic-dependency-system-include-path major-mode)
+    :help "Run customize for the system include path for this major mode." ]
+   ["Add a System Include Path" semantic-add-system-include
+    :active t
+    :help "Add an include path for this session." ]
+   ["Remove a System Include Path" semantic-remove-system-include
+    :active t
+    :help "Add an include path for this session." ]
    ))
 
 ;;; Includes with no file, but a table
@@ -202,40 +182,32 @@ Used by the decoration style: 
`semantic-decoration-on-fileless-includes'."
   "Fileless Include Menu"
   (list
    "Fileless Include"
-   (semantic-menu-item
-    ["What Is This?" semantic-decoration-fileless-include-describe
-     :active t
-     :help "Describe why this include has been marked this way." ])
-   (semantic-menu-item
-    ["List all unknown includes" semanticdb-find-adebug-lost-includes
-     :active t
-     :help "Show a list of all includes semantic cannot find for this file." ])
+   ["What Is This?" semantic-decoration-fileless-include-describe
+    :active t
+    :help "Describe why this include has been marked this way." ]
+   ["List all unknown includes" semanticdb-find-adebug-lost-includes
+    :active t
+    :help "Show a list of all includes semantic cannot find for this file." ]
    "---"
-   (semantic-menu-item
-    ["Summarize includes current buffer" 
semantic-decoration-all-include-summary
-     :active t
-     :help "Show a summary for the current buffer containing this include." ])
-   (semantic-menu-item
-    ["List found includes (load unparsed)" semanticdb-find-test-translate-path
-     :active t
-     :help "List all includes found for this file, and parse unparsed files." 
])
-   (semantic-menu-item
-    ["List found includes (no loading)" 
semanticdb-find-test-translate-path-no-loading
-     :active t
-     :help "List all includes found for this file, do not parse unparsed 
files." ])
+   ["Summarize includes current buffer" semantic-decoration-all-include-summary
+    :active t
+    :help "Show a summary for the current buffer containing this include." ]
+   ["List found includes (load unparsed)" semanticdb-find-test-translate-path
+    :active t
+    :help "List all includes found for this file, and parse unparsed files." ]
+   ["List found includes (no loading)" 
semanticdb-find-test-translate-path-no-loading
+    :active t
+    :help "List all includes found for this file, do not parse unparsed 
files." ]
    "---"
-   (semantic-menu-item
-    ["Customize System Include Path" semantic-customize-system-include-path
-     :active (get 'semantic-dependency-system-include-path major-mode)
-     :help "Run customize for the system include path for this major mode." ])
-   (semantic-menu-item
-    ["Add a System Include Path" semantic-add-system-include
-     :active t
-     :help "Add an include path for this session." ])
-   (semantic-menu-item
-    ["Remove a System Include Path" semantic-remove-system-include
-     :active t
-     :help "Add an include path for this session." ])
+   ["Customize System Include Path" semantic-customize-system-include-path
+    :active (get 'semantic-dependency-system-include-path major-mode)
+    :help "Run customize for the system include path for this major mode." ]
+   ["Add a System Include Path" semantic-add-system-include
+    :active t
+    :help "Add an include path for this session." ]
+   ["Remove a System Include Path" semantic-remove-system-include
+    :active t
+    :help "Add an include path for this session." ]
    ))
 
 ;;; Includes that need to be parsed.
@@ -265,56 +237,41 @@ Used by the decoration style: 
`semantic-decoration-on-unparsed-includes'."
   "Unparsed Include Menu"
   (list
    "Unparsed Include"
-   (semantic-menu-item
-    ["What Is This?" semantic-decoration-unparsed-include-describe
-     :active t
-     :help "Describe why this include has been marked this way." ])
-   (semantic-menu-item
-    ["Visit This Include" semantic-decoration-include-visit
-     :active t
-     :help "Visit this include file so that header file's tags can be used." ])
-   (semantic-menu-item
-    ["Parse This Include" semantic-decoration-unparsed-include-parse-include
-     :active t
-     :help "Parse this include file so that header file's tags can be used." ])
-   (semantic-menu-item
-    ["Parse All Includes" 
semantic-decoration-unparsed-include-parse-all-includes
-     :active t
-     :help "Parse all the includes so the contents can be used." ])
+   ["What Is This?" semantic-decoration-unparsed-include-describe
+    :active t
+    :help "Describe why this include has been marked this way." ]
+   ["Visit This Include" semantic-decoration-include-visit
+    :active t
+    :help "Visit this include file so that header file's tags can be used." ]
+   ["Parse This Include" semantic-decoration-unparsed-include-parse-include
+    :active t
+    :help "Parse this include file so that header file's tags can be used." ]
+   ["Parse All Includes" 
semantic-decoration-unparsed-include-parse-all-includes
+    :active t
+    :help "Parse all the includes so the contents can be used." ]
    "---"
-   (semantic-menu-item
-    ["Summarize includes current buffer" 
semantic-decoration-all-include-summary
-     :active t
-     :help "Show a summary for the current buffer containing this include." ])
-   (semantic-menu-item
-    ["List found includes (load unparsed)" semanticdb-find-test-translate-path
-     :active t
-     :help "List all includes found for this file, and parse unparsed files." 
])
-   (semantic-menu-item
-    ["List found includes (no loading)" 
semanticdb-find-test-translate-path-no-loading
-     :active t
-     :help "List all includes found for this file, do not parse unparsed 
files." ])
-   (semantic-menu-item
-    ["List all unknown includes" semanticdb-find-adebug-lost-includes
-     :active t
-     :help "Show a list of all includes semantic cannot find for this file." ])
+   ["Summarize includes current buffer" semantic-decoration-all-include-summary
+    :active t
+    :help "Show a summary for the current buffer containing this include." ]
+   ["List found includes (load unparsed)" semanticdb-find-test-translate-path
+    :active t
+    :help "List all includes found for this file, and parse unparsed files." ]
+   ["List found includes (no loading)" 
semanticdb-find-test-translate-path-no-loading
+    :active t
+    :help "List all includes found for this file, do not parse unparsed 
files." ]
+   ["List all unknown includes" semanticdb-find-adebug-lost-includes
+    :active t
+    :help "Show a list of all includes semantic cannot find for this file." ]
    "---"
-   (semantic-menu-item
-    ["Customize System Include Path" semantic-customize-system-include-path
-     :active (get 'semantic-dependency-system-include-path major-mode)
-     :help "Run customize for the system include path for this major mode." ])
-   (semantic-menu-item
-    ["Add a System Include Path" semantic-add-system-include
-     :active t
-     :help "Add an include path for this session." ])
-   (semantic-menu-item
-    ["Remove a System Include Path" semantic-remove-system-include
-     :active t
-     :help "Add an include path for this session." ])
-   ;;["" semantic-decoration-unparsed-include-
-   ;; :active t
-   ;; :help "" ]
-   ))
+   ["Customize System Include Path" semantic-customize-system-include-path
+    :active (get 'semantic-dependency-system-include-path major-mode)
+    :help "Run customize for the system include path for this major mode." ]
+   ["Add a System Include Path" semantic-add-system-include
+    :active t
+    :help "Add an include path for this session." ]
+   ["Remove a System Include Path" semantic-remove-system-include
+    :active t
+    :help "Add an include path for this session." ]))
 
 
 ;;; MODES
diff --git a/lisp/cedet/semantic/format.el b/lisp/cedet/semantic/format.el
index 7d040fd..25a1858 100644
--- a/lisp/cedet/semantic/format.el
+++ b/lisp/cedet/semantic/format.el
@@ -92,12 +92,8 @@ Images can be used as icons instead of some types of text 
strings."
      (variable . font-lock-variable-name-face)
      (type . font-lock-type-face)
      ;; These are different between Emacsen.
-     (include . ,(if (featurep 'xemacs)
-                    'font-lock-preprocessor-face
-                  'font-lock-constant-face))
-     (package . ,(if (featurep 'xemacs)
-                    'font-lock-preprocessor-face
-                  'font-lock-constant-face))
+     (include . ,'font-lock-constant-face)
+     (package . , 'font-lock-constant-face)
      ;; Not a tag, but instead a feature of output
      (label . font-lock-string-face)
      (comment . font-lock-comment-face)
@@ -135,26 +131,23 @@ See that variable for details on adding new types."
 FACE-CLASS is a tag type found in `semantic-formatface-alist'.
 See that variable for details on adding new types."
   (let ((face (cdr-safe (assoc face-class semantic-format-face-alist)))
-       (newtext (concat precoloredtext))
-       )
-    (if (featurep 'xemacs)
-       (add-text-properties 0 (length newtext) (list 'face face) newtext)
-      (alter-text-property 0 (length newtext) 'face
-                          (lambda (current-face)
-                            (let ((cf
-                                   (cond ((facep current-face)
-                                          (list current-face))
-                                         ((listp current-face)
-                                          current-face)
-                                         (t nil)))
-                                  (nf
-                                   (cond ((facep face)
-                                          (list face))
-                                         ((listp face)
-                                          face)
-                                         (t nil))))
-                              (append cf nf)))
-                          newtext))
+       (newtext (concat precoloredtext)))
+    (alter-text-property 0 (length newtext) 'face
+                        (lambda (current-face)
+                          (let ((cf
+                                 (cond ((facep current-face)
+                                        (list current-face))
+                                       ((listp current-face)
+                                        current-face)
+                                       (t nil)))
+                                (nf
+                                 (cond ((facep face)
+                                        (list face))
+                                       ((listp face)
+                                        face)
+                                       (t nil))))
+                            (append cf nf)))
+                        newtext)
     newtext))
 
 ;;; Function Arguments
diff --git a/lisp/cedet/semantic/fw.el b/lisp/cedet/semantic/fw.el
index 6719e62..a9a014f 100644
--- a/lisp/cedet/semantic/fw.el
+++ b/lisp/cedet/semantic/fw.el
@@ -34,108 +34,45 @@
 
 ;;; Compatibility
 ;;
-(eval-and-compile
-  (if (featurep 'xemacs)
-      (progn
-       (defalias 'semantic-buffer-local-value 'symbol-value-in-buffer)
-        ;; FIXME: Why not just (require 'overlay)?
-       (defalias 'semantic-overlay-live-p
-         (lambda (o)
-           (and (extent-live-p o)
-                (not (extent-detached-p o))
-                (bufferp (extent-buffer o)))))
-       (defalias 'semantic-make-overlay
-         (lambda (beg end &optional buffer &rest rest)
-           "Xemacs `make-extent', supporting the front/rear advance options."
-           (let ((ol (make-extent beg end buffer)))
-             (when rest
-               (set-extent-property ol 'start-open (car rest))
-               (setq rest (cdr rest)))
-             (when rest
-               (set-extent-property ol 'end-open (car rest)))
-             ol)))
-       (defalias 'semantic-overlay-put             'set-extent-property)
-       (defalias 'semantic-overlay-get             'extent-property)
-       (defalias 'semantic-overlay-properties      'extent-properties)
-       (defalias 'semantic-overlay-move            'set-extent-endpoints)
-       (defalias 'semantic-overlay-delete          'delete-extent)
-       (defalias 'semantic-overlays-at
-         (lambda (pos)
-           (condition-case nil
-               (extent-list nil pos pos)
-             (error nil))
-           ))
-       (defalias 'semantic-overlays-in
-         (lambda (beg end) (extent-list nil beg end)))
-       (defalias 'semantic-overlay-buffer          'extent-buffer)
-       (defalias 'semantic-overlay-start           'extent-start-position)
-       (defalias 'semantic-overlay-end             'extent-end-position)
-       (defalias 'semantic-overlay-size            'extent-length)
-       (defalias 'semantic-overlay-next-change     'next-extent-change)
-       (defalias 'semantic-overlay-previous-change 'previous-extent-change)
-       (defalias 'semantic-overlay-lists
-         (lambda () (list (extent-list))))
-       (defalias 'semantic-overlay-p               'extentp)
-       (defalias 'semantic-event-window        'event-window)
-       (defun semantic-read-event ()
-         (let ((event (next-command-event)))
-           (if (key-press-event-p event)
-               (let ((c (event-to-character event)))
-                 (if (char-equal c (quit-char))
-                     (keyboard-quit)
-                   c)))
-           event))
-       (defun semantic-popup-menu (menu)
-         "Blocking version of `popup-menu'"
-         (popup-menu menu)
-         ;; Wait...
-         (while (popup-up-p) (dispatch-event (next-event))))
-       )
-    ;; Emacs Bindings
-    (defalias 'semantic-overlay-live-p          'overlay-buffer)
-    (defalias 'semantic-make-overlay            'make-overlay)
-    (defalias 'semantic-overlay-put             'overlay-put)
-    (defalias 'semantic-overlay-get             'overlay-get)
-    (defalias 'semantic-overlay-properties      'overlay-properties)
-    (defalias 'semantic-overlay-move            'move-overlay)
-    (defalias 'semantic-overlay-delete          'delete-overlay)
-    (defalias 'semantic-overlays-at             'overlays-at)
-    (defalias 'semantic-overlays-in             'overlays-in)
-    (defalias 'semantic-overlay-buffer          'overlay-buffer)
-    (defalias 'semantic-overlay-start           'overlay-start)
-    (defalias 'semantic-overlay-end             'overlay-end)
-    (defalias 'semantic-overlay-next-change     'next-overlay-change)
-    (defalias 'semantic-overlay-previous-change 'previous-overlay-change)
-    (defalias 'semantic-overlay-lists           'overlay-lists)
-    (defalias 'semantic-overlay-p               'overlayp)
-    (defalias 'semantic-read-event              'read-event)
-    (defalias 'semantic-popup-menu              'popup-menu)
-    (defun semantic-event-window (event)
-      "Extract the window from EVENT."
-      (car (car (cdr event))))
-
-    (defalias 'semantic-buffer-local-value 'buffer-local-value)
-
-    )
-
-
-  (defalias 'semantic-make-local-hook
-    (if (featurep 'emacs)
-        #'identity  #'make-local-hook))
-
-  (defalias 'semantic-mode-line-update
-    (if (featurep 'xemacs) #'redraw-modeline #'force-mode-line-update))
-
-  ;; Since Emacs 22 major mode functions should use `run-mode-hooks' to
-  ;; run major mode hooks.
-  (defalias 'semantic-run-mode-hooks
-    (if (fboundp 'run-mode-hooks)
-       'run-mode-hooks
-      'run-hooks))
+(defalias 'semantic-overlay-live-p          'overlay-buffer)
+(defalias 'semantic-make-overlay            'make-overlay)
+(defalias 'semantic-overlay-put             'overlay-put)
+(defalias 'semantic-overlay-get             'overlay-get)
+(defalias 'semantic-overlay-properties      'overlay-properties)
+(defalias 'semantic-overlay-move            'move-overlay)
+(defalias 'semantic-overlay-delete          'delete-overlay)
+(defalias 'semantic-overlays-at             'overlays-at)
+(defalias 'semantic-overlays-in             'overlays-in)
+(defalias 'semantic-overlay-buffer          'overlay-buffer)
+(defalias 'semantic-overlay-start           'overlay-start)
+(defalias 'semantic-overlay-end             'overlay-end)
+(defalias 'semantic-overlay-next-change     'next-overlay-change)
+(defalias 'semantic-overlay-previous-change 'previous-overlay-change)
+(defalias 'semantic-overlay-lists           'overlay-lists)
+(defalias 'semantic-overlay-p               'overlayp)
+(defalias 'semantic-read-event              'read-event)
+(defalias 'semantic-popup-menu              'popup-menu)
+(defalias 'semantic-buffer-local-value 'buffer-local-value)
+
+(defun semantic-event-window (event)
+  "Extract the window from EVENT."
+  (car (car (cdr event))))
+
+(defalias 'semantic-make-local-hook
+  (if (featurep 'emacs)
+      #'identity  #'make-local-hook))
+
+(defalias 'semantic-mode-line-update #'force-mode-line-update)
+
+;; Since Emacs 22 major mode functions should use `run-mode-hooks' to
+;; run major mode hooks.
+(defalias 'semantic-run-mode-hooks
+  (if (fboundp 'run-mode-hooks)
+      'run-mode-hooks
+    'run-hooks))
 
   ;; Fancy compat usage now handled in cedet-compat
-  (defalias 'semantic-subst-char-in-string 'subst-char-in-string)
-  )
+(defalias 'semantic-subst-char-in-string 'subst-char-in-string)
 
 (defun semantic-delete-overlay-maybe (overlay)
   "Delete OVERLAY if it is a semantic token overlay."
@@ -144,22 +81,7 @@
 
 ;;; Menu Item compatibility
 ;;
-(defun semantic-menu-item (item)
-  "Build an XEmacs compatible menu item from vector ITEM.
-That is remove the unsupported :help stuff."
-  (if (featurep 'xemacs)
-      (let ((n (length item))
-            (i 0)
-            slot l)
-        (while (< i n)
-          (setq slot (aref item i))
-          (if (and (keywordp slot)
-                   (eq slot :help))
-              (setq i (1+ i))
-            (setq l (cons slot l)))
-          (setq i (1+ i)))
-        (apply #'vector (nreverse l)))
-    item))
+(define-obsolete-function-alias 'semantic-menu-item #'identity "27.1")
 
 ;;; Positional Data Cache
 ;;
@@ -406,8 +328,7 @@ Use this when referencing a file that will be soon deleted.
 FILE, NOWARN, RAWFILE, and WILDCARDS are passed into `find-file-noselect'"
   ;; Hack -
   ;; Check if we are in set-auto-mode, and if so, warn about this.
-  (when (or  (and (featurep 'emacs) (boundp 'keep-mode-if-same))
-            (and (featurep 'xemacs) (boundp 'just-from-file-name)))
+  (when (boundp 'keep-mode-if-same)
     (let ((filename (or (and (boundp 'filename) filename)
                        "(unknown)")))
       (message "WARNING: semantic-find-file-noselect called for \
@@ -439,10 +360,7 @@ into `mode-local-init-hook'." file filename)
         (enable-local-eval nil)
         )
     (save-match-data
-      (if (featurep 'xemacs)
-         (find-file-noselect file nowarn rawfile)
-       (find-file-noselect file nowarn rawfile wildcards)))
-    ))
+      (find-file-noselect file nowarn rawfile wildcards))))
 
 ;;; Database restriction settings
 ;;
diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el
index 3c35583..2912915 100644
--- a/lisp/cedet/semantic/grammar.el
+++ b/lisp/cedet/semantic/grammar.el
@@ -209,11 +209,7 @@ That is tag names plus names defined in tag attribute 
`:rest'."
 (defsubst semantic-grammar-item-value (item)
   "Return symbol or character value of ITEM string."
   (if (string-match semantic-grammar-lex-c-char-re item)
-      (let ((c (read (concat "?" (substring item 1 -1)))))
-        (if (featurep 'xemacs)
-            ;; Handle characters as integers in XEmacs like in GNU Emacs.
-            (char-int c)
-          c))
+      (read (concat "?" (substring item 1 -1)))
     (intern item)))
 
 (defun semantic-grammar-prologue ()
@@ -833,12 +829,6 @@ Block definitions are read from the current table of 
lexical types."
   :group 'semantic
   :type 'regexp)
 
-(defsubst semantic-grammar-noninteractive ()
-  "Return non-nil if running without interactive terminal."
-  (if (featurep 'xemacs)
-      (noninteractive)
-    noninteractive))
-
 (defun semantic-grammar-create-package (&optional force uptodate)
   "Create package Lisp code from grammar in current buffer.
 If the Lisp code seems up to date, do nothing (if UPTODATE
@@ -951,7 +941,7 @@ Lisp code."
 
       ;; If running in batch mode, there is nothing more to do.
       ;; Save the generated file and quit.
-      (if (semantic-grammar-noninteractive)
+      (if noninteractive
           (let ((version-control t)
                 (delete-old-versions t)
                 (make-backup-files t)
@@ -1032,7 +1022,7 @@ For example, to process grammar files in current 
directory, invoke:
   \"emacs -batch -f semantic-grammar-batch-build-packages .\".
 
 See also the variable `semantic-grammar-file-regexp'."
-  (or (semantic-grammar-noninteractive)
+  (or noninteractive
       (error "\
 `semantic-grammar-batch-build-packages' must be used with -batch"
              ))
@@ -1281,10 +1271,8 @@ common grammar menu."
   "Setup a mode local grammar menu.
 MODE-MENU is an optional specific menu whose items are appended to the
 common grammar menu."
-  (let ((menu (intern (format "%s-menu" major-mode))))
-    (if (featurep 'xemacs)
-        (semantic-grammar-setup-menu-xemacs menu mode-menu)
-      (semantic-grammar-setup-menu-emacs menu mode-menu))))
+  (semantic-grammar-setup-menu-emacs
+   (intern (format "%s-menu" major-mode)) mode-menu))
 
 (defsubst semantic-grammar-in-lisp-p ()
   "Return non-nil if point is in Lisp code."
diff --git a/lisp/cedet/semantic/idle.el b/lisp/cedet/semantic/idle.el
index 92ec7f8..bd4f800 100644
--- a/lisp/cedet/semantic/idle.el
+++ b/lisp/cedet/semantic/idle.el
@@ -1114,65 +1114,61 @@ be called."
   "Semantic Breadcrumbs Mode Menu"
   (list
    "Breadcrumb Tag"
-   (semantic-menu-item
-    (vector
-     "Go to Tag"
-     (semantic-idle-breadcrumbs--tag-function
-      semantic-go-to-tag)
-     :active t
-     :help  "Jump to this tag"))
+   (vector
+    "Go to Tag"
+    (semantic-idle-breadcrumbs--tag-function
+     semantic-go-to-tag)
+    :active t
+    :help  "Jump to this tag")
    ;; TODO these entries need minor changes (optional tag argument) in
    ;; senator-copy-tag etc
-  ;;  (semantic-menu-item
-  ;;   (vector
-  ;;    "Copy Tag"
-  ;;    (semantic-idle-breadcrumbs--tag-function
-  ;;     senator-copy-tag)
-  ;;    :active t
-  ;;    :help   "Copy this tag"))
-  ;;   (semantic-menu-item
-  ;;    (vector
-  ;;     "Kill Tag"
-  ;;     (semantic-idle-breadcrumbs--tag-function
-  ;;      senator-kill-tag)
-  ;;     :active t
-  ;;     :help   "Kill tag text to the kill ring, and copy the tag to
-  ;; the tag ring"))
-  ;;   (semantic-menu-item
-  ;;    (vector
-  ;;     "Copy Tag to Register"
-  ;;     (semantic-idle-breadcrumbs--tag-function
-  ;;      senator-copy-tag-to-register)
-  ;;     :active t
-  ;;     :help   "Copy this tag"))
-  ;;   (semantic-menu-item
-  ;;    (vector
-  ;;     "Narrow to Tag"
-  ;;     (semantic-idle-breadcrumbs--tag-function
-  ;;      senator-narrow-to-defun)
-  ;;     :active t
-  ;;     :help   "Narrow to the bounds of the current tag"))
-  ;;   (semantic-menu-item
-  ;;    (vector
-  ;;     "Fold Tag"
-  ;;     (semantic-idle-breadcrumbs--tag-function
-  ;;      senator-fold-tag-toggle)
-  ;;     :active   t
-  ;;     :style    'toggle
-  ;;     :selected '(let ((tag (semantic-current-tag)))
-  ;;              (and tag (semantic-tag-folded-p tag)))
-  ;;     :help     "Fold the current tag to one line"))
-    "---"
-    (semantic-menu-item
-     (vector
-      "About this Header Line"
-      (lambda ()
-       (interactive)
-       (describe-function 'semantic-idle-breadcrumbs-mode))
-      :active t
-      :help   "Display help about this header line."))
-    )
-  )
+   ;;  (semantic-menu-item
+   ;;   (vector
+   ;;    "Copy Tag"
+   ;;    (semantic-idle-breadcrumbs--tag-function
+   ;;     senator-copy-tag)
+   ;;    :active t
+   ;;    :help   "Copy this tag"))
+   ;;   (semantic-menu-item
+   ;;    (vector
+   ;;     "Kill Tag"
+   ;;     (semantic-idle-breadcrumbs--tag-function
+   ;;      senator-kill-tag)
+   ;;     :active t
+   ;;     :help   "Kill tag text to the kill ring, and copy the tag to
+   ;; the tag ring"))
+   ;;   (semantic-menu-item
+   ;;    (vector
+   ;;     "Copy Tag to Register"
+   ;;     (semantic-idle-breadcrumbs--tag-function
+   ;;      senator-copy-tag-to-register)
+   ;;     :active t
+   ;;     :help   "Copy this tag"))
+   ;;   (semantic-menu-item
+   ;;    (vector
+   ;;     "Narrow to Tag"
+   ;;     (semantic-idle-breadcrumbs--tag-function
+   ;;      senator-narrow-to-defun)
+   ;;     :active t
+   ;;     :help   "Narrow to the bounds of the current tag"))
+   ;;   (semantic-menu-item
+   ;;    (vector
+   ;;     "Fold Tag"
+   ;;     (semantic-idle-breadcrumbs--tag-function
+   ;;      senator-fold-tag-toggle)
+   ;;     :active   t
+   ;;     :style    'toggle
+   ;;     :selected '(let ((tag (semantic-current-tag)))
+   ;;             (and tag (semantic-tag-folded-p tag)))
+   ;;     :help     "Fold the current tag to one line"))
+   "---"
+   (vector
+    "About this Header Line"
+    (lambda ()
+      (interactive)
+      (describe-function 'semantic-idle-breadcrumbs-mode))
+    :active t
+    :help   "Display help about this header line.")))
 
 (define-semantic-idle-service semantic-idle-breadcrumbs
   "Display breadcrumbs for the tag under point and its parents."
diff --git a/lisp/cedet/semantic/symref/list.el 
b/lisp/cedet/semantic/symref/list.el
index f6417b1..ce656d6 100644
--- a/lisp/cedet/semantic/symref/list.el
+++ b/lisp/cedet/semantic/symref/list.el
@@ -126,31 +126,23 @@ Display the references in `semantic-symref-results-mode'."
 (defvar semantic-symref-list-menu-entries
   (list
    "Symref"
-   (semantic-menu-item
-    ["Toggle Line Open"
-     semantic-symref-list-toggle-showing
-     :active t
-     :help "Toggle the current line open or closed."
-     ])
-   (semantic-menu-item
-    ["Expand All Entries"
-     semantic-symref-list-expand-all
-     :active t
-     :help "Expand every expandable entry."
-     ])
-   (semantic-menu-item
-    ["Contract All Entries"
-     semantic-symref-list-contract-all
-     :active t
-     :help "Close every expandable entry."
-     ])
-   (semantic-menu-item
-    ["Rename Symbol in Open hits"
-     semantic-symref-list-rename-open-hits
-     :active t
-     :help "Rename the searched for symbol in all hits that are currently 
open."
-     ])
-   )
+   ["Toggle Line Open"
+    semantic-symref-list-toggle-showing
+    :active t
+    :help "Toggle the current line open or closed." ]
+   ["Expand All Entries"
+    semantic-symref-list-expand-all
+    :active t
+    :help "Expand every expandable entry." ]
+   ["Contract All Entries"
+    semantic-symref-list-contract-all
+    :active t
+    :help "Close every expandable entry." ]
+   ["Rename Symbol in Open hits"
+    semantic-symref-list-rename-open-hits
+    :active t
+    :help "Rename the searched for symbol in all hits that are currently open."
+    ])
   "Menu entries for the Semantic Symref list mode.")
 
 (defvar semantic-symref-list-menu nil
diff --git a/lisp/cedet/semantic/util-modes.el 
b/lisp/cedet/semantic/util-modes.el
index 69df671..e345bd5 100644
--- a/lisp/cedet/semantic/util-modes.el
+++ b/lisp/cedet/semantic/util-modes.el
@@ -607,7 +607,7 @@ to indicate a parse in progress."
   )
 
 (defcustom semantic-stickyfunc-indent-string
-  (if (and window-system (not (featurep 'xemacs)))
+  (if window-system
       (concat
        (condition-case nil
           ;; Test scroll bar location
@@ -677,13 +677,10 @@ when it lands in the sticky line."
   "Value of the header line when entering stickyfunc mode.")
 
 (defconst semantic-stickyfunc-header-line-format
-  (cond ((featurep 'xemacs)
-        nil)
-       (t
-        '(:eval (list
-                 ;; Magic bit I found on emacswiki.
-                 (propertize " " 'display '((space :align-to 0)))
-                 (semantic-stickyfunc-fetch-stickyline)))))
+  '(:eval (list
+          ;; Magic bit I found on emacswiki.
+          (propertize " " 'display '((space :align-to 0)))
+          (semantic-stickyfunc-fetch-stickyline)))
   "The header line format used by stickyfunc mode.")
 
 ;;;###autoload
@@ -845,10 +842,8 @@ Argument EVENT describes the event that caused this 
function to be called."
   :type 'hook)
 
 (defvar semantic-highlight-func-mode-map
-  (let ((km (make-sparse-keymap))
-       (m3  (if (featurep 'xemacs) [ button3 ] [ mouse-3 ]))
-       )
-    (define-key km m3 'semantic-highlight-func-menu)
+  (let ((km (make-sparse-keymap)))
+    (define-key km [mouse-3] 'semantic-highlight-func-menu)
     km)
   "Keymap for highlight-func minor mode.")
 
diff --git a/lisp/cedet/semantic/wisent/comp.el 
b/lisp/cedet/semantic/wisent/comp.el
index 4e222fa..a73cdfa 100644
--- a/lisp/cedet/semantic/wisent/comp.el
+++ b/lisp/cedet/semantic/wisent/comp.el
@@ -161,12 +161,6 @@ If optional LEFT is non-nil insert spaces on left."
   (not (zerop (logand (aref x (/ i wisent-BITS-PER-WORD))
                       (ash 1 (% i wisent-BITS-PER-WORD))))))
 
-(defsubst wisent-noninteractive ()
-  "Return non-nil if running without interactive terminal."
-  (if (featurep 'xemacs)
-      (noninteractive)
-    noninteractive))
-
 (defvar wisent-debug-flag nil
   "Non-nil means enable some debug stuff.")
 
@@ -2662,7 +2656,7 @@ Report detailed information if `wisent-verbose-flag' or
     (wisent-print-grammar)
     (wisent-print-states))
   ;; Append output to log file when running in batch mode
-  (when (wisent-noninteractive)
+  (when noninteractive
     (wisent-append-to-log-file)
     (wisent-clear-log)))
 
diff --git a/lisp/cedet/srecode/mode.el b/lisp/cedet/srecode/mode.el
index a40b9d0..3a8fd91 100644
--- a/lisp/cedet/srecode/mode.el
+++ b/lisp/cedet/srecode/mode.el
@@ -69,62 +69,44 @@
 (defvar srecode-menu-bar
   (list
    "SRecoder"
-   (semantic-menu-item
-    ["Insert Template"
-     srecode-insert
-     :active t
-     :help "Insert a template by name."
-     ])
-   (semantic-menu-item
-    ["Insert Template Again"
-     srecode-insert-again
-     :active t
-     :help "Run the same template as last time again."
-     ])
-   (semantic-menu-item
-    ["Edit Template"
-     srecode-edit
-     :active t
-     :help "Edit a template for this language by name."
-     ])
+   ["Insert Template"
+    srecode-insert
+    :active t
+    :help "Insert a template by name."]
+   ["Insert Template Again"
+    srecode-insert-again
+    :active t
+    :help "Run the same template as last time again."]
+     ["Edit Template"
+    srecode-edit
+    :active t
+    :help "Edit a template for this language by name."]
    "---"
    '( "Insert ..." :filter srecode-minor-mode-templates-menu )
    '( "Generate ..." :filter srecode-minor-mode-generate-menu )
    "---"
-   (semantic-menu-item
-    ["Customize..."
-     (customize-group "srecode")
-     :active t
-     :help "Customize SRecode options"
-     ])
+   ["Customize..."
+    (customize-group "srecode")
+    :active t
+    :help "Customize SRecode options"]
    (list
     "Debugging Tools..."
-    (semantic-menu-item
-     ["Dump Template MAP"
-      srecode-get-maps
-      :active t
-      :help "Calculate (if needed) and display the current template file map."
-      ])
-    (semantic-menu-item
-     ["Dump Tables"
-      srecode-dump-templates
-      :active t
-      :help "Dump the current template table."
-      ])
-    (semantic-menu-item
-     ["Dump Dictionary"
-      srecode-dictionary-dump
-      :active t
-      :help "Calculate and dump a dictionary for point."
-      ])
-    (semantic-menu-item
-     ["Show Macro Help"
-      srecode-macro-help
-      :active t
-      :help "Display the different types of macros available."
-      ])
-    )
-   )
+    ["Dump Template MAP"
+     srecode-get-maps
+     :active t
+     :help "Calculate (if needed) and display the current template file map."]
+    ["Dump Tables"
+     srecode-dump-templates
+     :active t
+     :help "Dump the current template table."]
+    ["Dump Dictionary"
+     srecode-dictionary-dump
+     :active t
+     :help "Calculate and dump a dictionary for point."]
+    ["Show Macro Help"
+     srecode-macro-help
+     :active t
+     :help "Display the different types of macros available."]))
   "Menu for srecode minor mode.")
 
 (defvar srecode-minor-menu nil



reply via email to

[Prev in Thread] Current Thread [Next in Thread]