Remove XEmacs compat code from lisp/obsolete/*.el
* lisp/obsolete/crisp.el (crisp-kill-region) (crisp-region-active): * lisp/obsolete/eudcb-ph.el (eudc-ph-open-session): * lisp/obsolete/fast-lock.el (fast-lock-save-faces): * lisp/obsolete/iswitchb.el (iswitchb-completion-help) (iswitchb-case): * lisp/obsolete/otodo-mode.el (todo-mode): * lisp/obsolete/pgg-parse.el (pgg-parse-armor): * lisp/obsolete/pgg.el (pgg-verify-region): * lisp/obsolete/tpu-edt.el (activate-mark-hook, tpu-mark) (tpu-set-mark, tpu-load-xkeys): * lisp/obsolete/tpu-mapper.el (tpu-map-key, tpu-mapper): Remove XEmacs compat code.
This commit is contained in:
parent
bf5b95d932
commit
d51f684aef
9 changed files with 32 additions and 129 deletions
|
@ -231,27 +231,13 @@ does not load the scroll-all package."
|
|||
|
||||
;; The cut and paste routines are different between XEmacs and Emacs
|
||||
;; so we need to set up aliases for the functions.
|
||||
|
||||
(defalias 'crisp-set-clipboard
|
||||
(if (fboundp 'clipboard-kill-ring-save)
|
||||
'clipboard-kill-ring-save
|
||||
'copy-primary-selection))
|
||||
|
||||
(defalias 'crisp-kill-region
|
||||
(if (fboundp 'clipboard-kill-region)
|
||||
'clipboard-kill-region
|
||||
'kill-primary-selection))
|
||||
|
||||
(defalias 'crisp-yank-clipboard
|
||||
(if (fboundp 'clipboard-yank)
|
||||
'clipboard-yank
|
||||
'yank-clipboard-selection))
|
||||
(defalias 'crisp-set-clipboard 'clipboard-kill-ring-save)
|
||||
(defalias 'crisp-kill-region 'clipboard-kill-region)
|
||||
(defalias 'crisp-yank-clipboard 'clipboard-yank)
|
||||
|
||||
(defun crisp-region-active ()
|
||||
"Compatibility function to test for an active region."
|
||||
(if (featurep 'xemacs)
|
||||
zmacs-region-active-p
|
||||
mark-active))
|
||||
mark-active)
|
||||
|
||||
(defun crisp-version (&optional arg)
|
||||
"Version number of the CRiSP emulator package.
|
||||
|
|
|
@ -176,9 +176,7 @@ SERVER is either a string naming the server or a list (NAME PORT)."
|
|||
(setq eudc-ph-process-buffer (get-buffer-create (format " *PH-%s*" host)))
|
||||
(with-current-buffer eudc-ph-process-buffer
|
||||
(erase-buffer)
|
||||
(setq eudc-ph-read-point (point))
|
||||
(and (featurep 'xemacs) (featurep 'mule)
|
||||
(set-buffer-file-coding-system 'binary t)))
|
||||
(setq eudc-ph-read-point (point)))
|
||||
(setq process (open-network-stream "ph" eudc-ph-process-buffer host port))
|
||||
(if (null process)
|
||||
(throw 'done nil))
|
||||
|
|
|
@ -283,10 +283,7 @@ If a number, only buffers greater than this size have processing messages."
|
|||
(other :tag "always" t)
|
||||
(integer :tag "size")))
|
||||
|
||||
(defvar fast-lock-save-faces
|
||||
(when (featurep 'xemacs)
|
||||
;; XEmacs uses extents for everything, so we have to pick the right ones.
|
||||
font-lock-face-list)
|
||||
(defvar fast-lock-save-faces nil
|
||||
"Faces that will be saved in a Font Lock cache file.
|
||||
If nil, means information for all faces will be saved.")
|
||||
|
||||
|
@ -707,35 +704,7 @@ See `fast-lock-get-face-properties'."
|
|||
(while regions
|
||||
(add-text-properties (nth 0 regions) (nth 1 regions) plist)
|
||||
(setq regions (nthcdr 2 regions))))))))
|
||||
|
||||
;; Functions for XEmacs:
|
||||
|
||||
(unless (boundp 'font-lock-syntactic-keywords)
|
||||
(defvar font-lock-syntactic-keywords nil))
|
||||
|
||||
(unless (boundp 'font-lock-inhibit-thing-lock)
|
||||
(defvar font-lock-inhibit-thing-lock nil))
|
||||
|
||||
(unless (fboundp 'font-lock-compile-keywords)
|
||||
(defalias 'font-lock-compile-keywords #'identity))
|
||||
|
||||
(unless (fboundp 'font-lock-eval-keywords)
|
||||
(defun font-lock-eval-keywords (keywords)
|
||||
(if (symbolp keywords)
|
||||
(font-lock-eval-keywords (if (fboundp keywords)
|
||||
(funcall keywords)
|
||||
(eval keywords t)))
|
||||
keywords)))
|
||||
|
||||
(unless (fboundp 'font-lock-value-in-major-mode)
|
||||
(defun font-lock-value-in-major-mode (alist)
|
||||
(if (consp alist)
|
||||
(cdr (or (assq major-mode alist) (assq t alist)))
|
||||
alist)))
|
||||
|
||||
(unless (fboundp 'current-message)
|
||||
(defun current-message ()
|
||||
""))
|
||||
|
||||
;; Install ourselves:
|
||||
|
||||
|
|
|
@ -977,17 +977,7 @@ Return the modified list with the last element prepended to it."
|
|||
(set-buffer buf))
|
||||
|
||||
(with-output-to-temp-buffer temp-buf
|
||||
(if (featurep 'xemacs)
|
||||
|
||||
;; XEmacs extents are put on by default, doesn't seem to be
|
||||
;; any way of switching them off.
|
||||
(display-completion-list (or iswitchb-matches iswitchb-buflist)
|
||||
:help-string "iswitchb "
|
||||
:activate-callback
|
||||
(lambda (_x _y _z)
|
||||
(message "doesn't work yet, sorry!")))
|
||||
;; else running Emacs
|
||||
(display-completion-list (or iswitchb-matches iswitchb-buflist))))
|
||||
(display-completion-list (or iswitchb-matches iswitchb-buflist)))
|
||||
(setq iswitchb-common-match-inserted nil))))
|
||||
|
||||
;;; KILL CURRENT BUFFER
|
||||
|
@ -1326,9 +1316,7 @@ This is an example function which can be hooked on to
|
|||
"Return non-nil if we should ignore case when matching.
|
||||
See the variable `iswitchb-case' for details."
|
||||
(if iswitchb-case
|
||||
(if (featurep 'xemacs)
|
||||
(isearch-no-upper-case-p iswitchb-text)
|
||||
(isearch-no-upper-case-p iswitchb-text t))))
|
||||
(isearch-no-upper-case-p iswitchb-text t)))
|
||||
|
||||
;;;###autoload
|
||||
(define-minor-mode iswitchb-mode
|
||||
|
|
|
@ -908,8 +908,7 @@ If INCLUDE-SEP is non-nil, return point after the separator."
|
|||
;;;###autoload
|
||||
(define-derived-mode todo-mode nil "TODO"
|
||||
"Major mode for editing TODO lists."
|
||||
(when (featurep 'xemacs)
|
||||
(easy-menu-add todo-menu)))
|
||||
nil)
|
||||
|
||||
(with-suppressed-warnings ((lexical date entry))
|
||||
(defvar date)
|
||||
|
|
|
@ -496,8 +496,7 @@
|
|||
(defun pgg-parse-armor (string)
|
||||
(with-temp-buffer
|
||||
(buffer-disable-undo)
|
||||
(unless (featurep 'xemacs)
|
||||
(set-buffer-multibyte nil))
|
||||
(set-buffer-multibyte nil)
|
||||
(insert string)
|
||||
(pgg-decode-armor-region (point-min)(point))))
|
||||
|
||||
|
|
|
@ -376,8 +376,7 @@ signer's public key from `pgg-default-keyserver-address'."
|
|||
(if (null signature) nil
|
||||
(with-temp-buffer
|
||||
(buffer-disable-undo)
|
||||
(unless (featurep 'xemacs)
|
||||
(set-buffer-multibyte nil))
|
||||
(set-buffer-multibyte nil)
|
||||
(insert-file-contents signature)
|
||||
(cdr (assq 2 (pgg-decode-armor-region
|
||||
(point-min)(point-max)))))))
|
||||
|
|
|
@ -650,12 +650,8 @@ GOLD is the ASCII 7-bit escape sequence <ESC>OP.")
|
|||
(setq tpu-mark-flag (if transient-mark-mode "" (if (tpu-mark) " @" " ")))
|
||||
(force-mode-line-update))
|
||||
|
||||
(cond ((featurep 'xemacs)
|
||||
(add-hook 'zmacs-deactivate-region-hook 'tpu-update-mode-line)
|
||||
(add-hook 'zmacs-activate-region-hook 'tpu-update-mode-line))
|
||||
(t
|
||||
(add-hook 'activate-mark-hook 'tpu-update-mode-line)
|
||||
(add-hook 'deactivate-mark-hook 'tpu-update-mode-line)))
|
||||
(add-hook 'activate-mark-hook 'tpu-update-mode-line)
|
||||
(add-hook 'deactivate-mark-hook 'tpu-update-mode-line)
|
||||
|
||||
|
||||
;;;
|
||||
|
@ -727,15 +723,13 @@ Otherwise sets the tpu-match markers to nil and returns nil."
|
|||
"TPU-edt version of the mark function.
|
||||
Return the appropriate value of the mark for the current
|
||||
version of Emacs."
|
||||
(cond ((featurep 'xemacs) (mark (not zmacs-regions)))
|
||||
(t (and mark-active (mark (not transient-mark-mode))))))
|
||||
(and mark-active (mark (not transient-mark-mode))))
|
||||
|
||||
(defun tpu-set-mark (pos)
|
||||
"TPU-edt version of the `set-mark' function.
|
||||
Sets the mark at POS and activates the region according to the
|
||||
current version of Emacs."
|
||||
(set-mark pos)
|
||||
(when (featurep 'xemacs) (when pos (zmacs-activate-region))))
|
||||
(set-mark pos))
|
||||
|
||||
(defun tpu-string-prompt (prompt history-symbol)
|
||||
"Read a string with PROMPT."
|
||||
|
@ -2306,17 +2300,14 @@ Accepts a prefix argument for the number of tpu-pan-columns to scroll."
|
|||
;;;
|
||||
(defun tpu-load-xkeys (file)
|
||||
"Load the TPU-edt X-windows key definitions FILE.
|
||||
If FILE is nil, try to load a default file. The default file names are
|
||||
`~/.tpu-lucid-keys' for XEmacs, and `~/.tpu-keys' for Emacs."
|
||||
If FILE is nil, try to load a default file. The default file name is
|
||||
`~/.tpu-keys'."
|
||||
(interactive "fX key definition file: ")
|
||||
(cond (file
|
||||
(setq file (expand-file-name file)))
|
||||
(tpu-xkeys-file
|
||||
(setq file (expand-file-name tpu-xkeys-file)))
|
||||
((featurep 'xemacs)
|
||||
(setq file (convert-standard-filename
|
||||
(expand-file-name "~/.tpu-lucid-keys"))))
|
||||
(t
|
||||
(t
|
||||
(setq file (convert-standard-filename
|
||||
(expand-file-name "~/.tpu-keys")))
|
||||
(and (not (file-exists-p file))
|
||||
|
|
|
@ -46,24 +46,14 @@
|
|||
;;;
|
||||
(defun tpu-map-key (ident descrip func gold-func)
|
||||
(interactive)
|
||||
(if (featurep 'xemacs)
|
||||
(progn
|
||||
(setq tpu-key-seq (read-key-sequence
|
||||
(format "Press %s%s: " ident descrip))
|
||||
tpu-key (format "[%s]" (event-key (aref tpu-key-seq 0))))
|
||||
(unless (equal tpu-key tpu-return)
|
||||
(set-buffer "Keys")
|
||||
(insert (format"(global-set-key %s %s)\n" tpu-key func))
|
||||
(set-buffer "Gold-Keys")
|
||||
(insert (format "(define-key tpu-gold-map %s %s)\n" tpu-key gold-func))))
|
||||
(message "Press %s%s: " ident descrip)
|
||||
(setq tpu-key-seq (read-event)
|
||||
tpu-key (format "[%s]" tpu-key-seq))
|
||||
(unless (equal tpu-key tpu-return)
|
||||
(set-buffer "Keys")
|
||||
(insert (format"(define-key tpu-global-map %s %s)\n" tpu-key func))
|
||||
(set-buffer "Gold-Keys")
|
||||
(insert (format "(define-key tpu-gold-map %s %s)\n" tpu-key gold-func))))
|
||||
(message "Press %s%s: " ident descrip)
|
||||
(setq tpu-key-seq (read-event)
|
||||
tpu-key (format "[%s]" tpu-key-seq))
|
||||
(unless (equal tpu-key tpu-return)
|
||||
(set-buffer "Keys")
|
||||
(insert (format"(define-key tpu-global-map %s %s)\n" tpu-key func))
|
||||
(set-buffer "Gold-Keys")
|
||||
(insert (format "(define-key tpu-gold-map %s %s)\n" tpu-key gold-func)))
|
||||
(set-buffer "Directions")
|
||||
tpu-key)
|
||||
|
||||
|
@ -103,8 +93,7 @@ your local X guru can try to figure out why the key is being ignored."
|
|||
|
||||
;; Make sure the window is big enough to display the instructions
|
||||
|
||||
(if (featurep 'xemacs) (set-screen-size (selected-screen) 80 36)
|
||||
(set-frame-size (selected-frame) 80 36))
|
||||
(set-frame-size (selected-frame) 80 36)
|
||||
|
||||
;; Create buffers - Directions, Keys, Gold-Keys
|
||||
|
||||
|
@ -162,14 +151,9 @@ your local X guru can try to figure out why the key is being ignored."
|
|||
|
||||
;; Save <CR> for future reference
|
||||
|
||||
(cond
|
||||
((featurep 'xemacs)
|
||||
(setq tpu-return-seq (read-key-sequence "Hit carriage-return <CR> to continue "))
|
||||
(setq tpu-return (concat "[" (format "%s" (event-key (aref tpu-return-seq 0))) "]")))
|
||||
(t
|
||||
(message "Hit carriage-return <CR> to continue ")
|
||||
(setq tpu-return-seq (read-event))
|
||||
(setq tpu-return (concat "[" (format "%s" tpu-return-seq) "]"))))
|
||||
(message "Hit carriage-return <CR> to continue ")
|
||||
(setq tpu-return-seq (read-event))
|
||||
(setq tpu-return (concat "[" (format "%s" tpu-return-seq) "]"))
|
||||
|
||||
;; Build the keymap file
|
||||
|
||||
|
@ -308,24 +292,14 @@ your local X guru can try to figure out why the key is being ignored."
|
|||
;;
|
||||
")
|
||||
|
||||
(cond ((featurep 'xemacs)
|
||||
(insert (format "(setq tpu-help-enter \"%s\")\n" tpu-enter-seq))
|
||||
(insert (format "(setq tpu-help-return \"%s\")\n" tpu-return-seq))
|
||||
(insert "(setq tpu-help-N \"[#<keypress-event N>]\")\n")
|
||||
(insert "(setq tpu-help-n \"[#<keypress-event n>]\")\n")
|
||||
(insert "(setq tpu-help-P \"[#<keypress-event P>]\")\n")
|
||||
(insert "(setq tpu-help-p \"[#<keypress-event p>]\")\n"))
|
||||
(t
|
||||
(insert (format "(setq tpu-help-enter \"%s\")\n" tpu-enter))))
|
||||
(insert (format "(setq tpu-help-enter \"%s\")\n" tpu-enter))
|
||||
|
||||
(append-to-buffer "Keys" 1 (point))
|
||||
(set-buffer "Keys")
|
||||
|
||||
;; Save the key mapping program
|
||||
|
||||
(let ((file
|
||||
(convert-standard-filename
|
||||
(if (featurep 'xemacs) "~/.tpu-lucid-keys" "~/.tpu-keys"))))
|
||||
(let ((file (convert-standard-filename "~/.tpu-keys")))
|
||||
(set-visited-file-name
|
||||
(read-file-name (format "Save key mapping to file (default %s): " file) "" file)))
|
||||
(save-buffer)
|
||||
|
|
Loading…
Add table
Reference in a new issue