(cperl-make-face ,arg ,descr))
(or (boundp (quote ,arg)) ; We use unquoted variants too
(defvar ,arg (quote ,arg) ,descr))))
- (if (featurep 'xemacs)
- (defmacro cperl-etags-snarf-tag (file line)
- `(progn
- (beginning-of-line 2)
- (list ,file ,line)))
- (defmacro cperl-etags-snarf-tag (_file _line)
- '(etags-snarf-tag)))
- (if (featurep 'xemacs)
- (defmacro cperl-etags-goto-tag-location (elt)
- ;;(progn
- ;; (switch-to-buffer (get-file-buffer (elt ,elt 0)))
- ;; (set-buffer (get-file-buffer (elt ,elt 0)))
- ;; Probably will not work due to some save-excursion???
- ;; Or save-file-position?
- ;; (message "Did I get to line %s?" (elt ,elt 1))
- `(goto-line (string-to-int (elt ,elt 1))))
- ;;)
- (defmacro cperl-etags-goto-tag-location (elt)
- `(etags-goto-tag-location ,elt))))
+ (defmacro cperl-etags-snarf-tag (_file _line)
+ '(etags-snarf-tag))
+ (defmacro cperl-etags-goto-tag-location (elt)
+ `(etags-goto-tag-location ,elt)))
(defun cperl-choose-color (&rest list)
(let (answer)
:type '(choice (const null) boolean)
:group 'cperl-affected-by-hairy)
-(defvar zmacs-regions) ; Avoid warning
-
-(defcustom cperl-electric-parens-mark
- (and window-system
- (or (and (boundp 'transient-mark-mode) ; For Emacs
- transient-mark-mode)
- (and (boundp 'zmacs-regions) ; For XEmacs
- zmacs-regions)))
+(defcustom cperl-electric-parens-mark window-system
"Not-nil means that electric parens look for active mark.
Default is yes if there is visual feedback on mark."
:type 'boolean
:type 'face
:group 'cperl-faces)
-;; Some double-evaluation happened with font-locks... Needed with 21.2...
-(defvar cperl-singly-quote-face (featurep 'xemacs))
-
(defcustom cperl-invalid-face 'underline
"Face for highlighting trailing whitespace."
:type 'face
;;; Portability stuff:
-(defmacro cperl-define-key (emacs-key definition &optional xemacs-key)
- `(define-key cperl-mode-map
- ,(if xemacs-key
- `(if (featurep 'xemacs) ,xemacs-key ,emacs-key)
- emacs-key)
- ,definition))
-
(defvar cperl-del-back-ch
(car (append (where-is-internal 'delete-backward-char)
(where-is-internal 'backward-delete-char-untabify)))
(defun cperl-putback-char (c) ; Emacs 19
(push c unread-command-events)) ; Avoid undefined warning
-(if (featurep 'xemacs)
- (defun cperl-putback-char (c) ; XEmacs >= 19.12
- (push (character-to-event c) unread-command-events)))
-
(defvar cperl-do-not-fontify
;; FIXME: This is not doing what it claims!
(if (string< emacs-version "19.30")
(cperl-val 'cperl-info-on-command-no-prompt))
(progn
;; don't clobber the backspace binding:
- (cperl-define-key "\C-hf" 'cperl-info-on-current-command [(control h) f])
- (cperl-define-key "\C-c\C-hf" 'cperl-info-on-command
- [(control c) (control h) f])))
+ (define-key cperl-mode-map "\C-hf" 'cperl-info-on-current-command)
+ (define-key cperl-mode-map "\C-c\C-hf" 'cperl-info-on-command)))
(setq local-abbrev-table cperl-mode-abbrev-table)
(if (cperl-val 'cperl-electric-keywords)
(abbrev-mode 1))
(set (make-local-variable 'paragraph-start) (concat "^$\\|" page-delimiter))
(set (make-local-variable 'paragraph-separate) paragraph-start)
(set (make-local-variable 'paragraph-ignore-fill-prefix) t)
- (if (featurep 'xemacs)
- (set (make-local-variable 'paren-backwards-message) t))
(set (make-local-variable 'indent-line-function) #'cperl-indent-line)
(set (make-local-variable 'require-final-newline) mode-require-final-newline)
(set (make-local-variable 'comment-start) "# ")
(set (make-local-variable 'imenu-sort-function) nil)
(set (make-local-variable 'vc-rcs-header) cperl-vc-rcs-header)
(set (make-local-variable 'vc-sccs-header) cperl-vc-sccs-header)
- (when (featurep 'xemacs)
- ;; This one is obsolete...
- (set (make-local-variable 'vc-header-alist)
- `((SCCS ,(car cperl-vc-sccs-header))
- (RCS ,(car cperl-vc-rcs-header)))))
(cond ((boundp 'compilation-error-regexp-alist-alist);; xemacs 20.x
(set (make-local-variable 'compilation-error-regexp-alist-alist)
(cons (cons 'cperl (car cperl-compilation-error-regexp-alist))
(or (boundp 'font-lock-unfontify-region-function)
(setq font-lock-unfontify-region-function
#'font-lock-default-unfontify-region))
- (unless (featurep 'xemacs) ; Our: just a plug for wrong font-lock
- (set (make-local-variable 'font-lock-unfontify-region-function)
- ;; not present with old Emacs
- #'cperl-font-lock-unfontify-region-function))
+ ;; Our: just a plug for wrong font-lock
+ (set (make-local-variable 'font-lock-unfontify-region-function)
+ ;; not present with old Emacs
+ #'cperl-font-lock-unfontify-region-function)
;; Reset syntaxification cache.
(set (make-local-variable 'cperl-syntax-done-to) nil)
(set (make-local-variable 'font-lock-syntactic-keywords)
indentable t))
;; Need to remove face as well...
(goto-char min)
- ;; 'emx not supported by Emacs since at least 21.1.
- (and (featurep 'xemacs) (eq system-type 'emx)
- (eq (point) 1)
- (let ((case-fold-search t))
- (looking-at "extproc[ \t]")) ; Analogue of #!
- (cperl-commentify min
- (point-at-eol)
- nil))
(while (and
(< (point) max)
(re-search-forward search max t))
(or topdir
(setq topdir default-directory))
(let ((tags-file-name "TAGS")
- (case-fold-search (and (featurep 'xemacs) (eq system-type 'emx)))
+ (case-fold-search nil)
xs rel)
(save-excursion
(cond (inbuffer nil) ; Already there
((file-exists-p tags-file-name)
- (if (featurep 'xemacs)
- (visit-tags-table-buffer)
- (visit-tags-table-buffer tags-file-name)))
- (t (set-buffer (find-file-noselect tags-file-name))))
+ (visit-tags-table-buffer tags-file-name))
+ (t
+ (set-buffer (find-file-noselect tags-file-name))))
(cond
(dir
(cond ((eq erase 'ignore))
to l1 l2 l3)
;; (setq cperl-hierarchy '(() () ())) ; Would write into '() later!
(setq cperl-hierarchy (list l1 l2 l3))
- (if (featurep 'xemacs) ; Not checked
- (progn
- (or tags-file-name
- ;; Does this work in XEmacs?
- (call-interactively 'visit-tags-table))
- (message "Updating list of classes...")
- (set-buffer (get-file-buffer tags-file-name))
- (cperl-tags-hier-fill))
- (or tags-table-list
- (call-interactively 'visit-tags-table))
- (mapc
- (function
- (lambda (tagsfile)
- (message "Updating list of classes... %s" tagsfile)
- (set-buffer (get-file-buffer tagsfile))
- (cperl-tags-hier-fill)))
- tags-table-list)
- (message "Updating list of classes... postprocessing..."))
+ (or tags-table-list
+ (call-interactively 'visit-tags-table))
+ (mapc
+ (function
+ (lambda (tagsfile)
+ (message "Updating list of classes... %s" tagsfile)
+ (set-buffer (get-file-buffer tagsfile))
+ (cperl-tags-hier-fill)))
+ tags-table-list)
+ (message "Updating list of classes... postprocessing...")
(mapc remover (car cperl-hierarchy))
(mapc remover (nth 1 cperl-hierarchy))
(setq to (list nil (cons "Packages: " (nth 1 cperl-hierarchy))
'variable-documentation))))
(Man-switches "")
(manual-program (if is-func "perldoc -f" "perldoc")))
- (cond
- ((featurep 'xemacs)
- (defvar Manual-program)
- (defvar Manual-switches)
- (let ((Manual-program "perldoc")
- (Manual-switches (if is-func (list "-f"))))
- (manual-entry word)))
- (t
- (Man-getpage-in-background word)))))
+ (Man-getpage-in-background word)))
;;;###autoload
(defun cperl-perldoc-at-point ()
"Create a virtual manpage in Emacs from the POD in the file."
(interactive)
(require 'man)
- (cond
- ((featurep 'xemacs)
- (defvar Manual-program)
- (let ((Manual-program "perldoc"))
- (manual-entry buffer-file-name)))
- (t
- (let* ((manual-program "perldoc")
- (Man-switches ""))
- (Man-getpage-in-background buffer-file-name)))))
+ (let ((manual-program "perldoc")
+ (Man-switches ""))
+ (Man-getpage-in-background buffer-file-name)))
(defun cperl-pod2man-build-command ()
"Builds the entire background manpage and cleaning command."