[Top][All Lists]

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

[elpa] externals/auctex 400b002 28/80: Remove obsolete codes

From: Tassilo Horn
Subject: [elpa] externals/auctex 400b002 28/80: Remove obsolete codes
Date: Wed, 16 Oct 2019 11:07:11 -0400 (EDT)

branch: externals/auctex
commit 400b0027a5cd3bd6c01f28ff97d55d9de9225863
Author: Ikumi Keita <address@hidden>
Commit: Ikumi Keita <address@hidden>

    Remove obsolete codes
    * preview.el.in (preview-mouse-open-eps): Remove xemacs compatibility
    Don't use obsolete variable `default-major-mode'.
 preview.el.in | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/preview.el.in b/preview.el.in
index 8748c8f..3134232 100644
--- a/preview.el.in
+++ b/preview.el.in
@@ -1149,25 +1149,22 @@ for the file extension."
 (defun preview-mouse-open-eps (file &optional position)
   "Display eps FILE in a view buffer on click.
 Place point at POSITION, else beginning of file."
-  (let ((default-major-mode
+  (let ((default-mode
           ;; FIXME: Yuck!  Just arrange for the file name to have the right
           ;; extension instead!
-         (or
-          (assoc-default "x.ps" auto-mode-alist #'string-match)
-          (default-value 'major-mode)))
+         (assoc-default "x.ps" auto-mode-alist #'string-match))
        (buff (get-file-buffer file)))
       (if buff
          (pop-to-buffer buff)
        (view-file-other-window file))
+      (if (and (eq major-mode (default-value 'major-mode))
+              default-mode)
+         (funcall default-mode))
       (goto-char (or position (point-min)))
-      (if (eq major-mode 'ps-mode)          ; Bundled with GNU Emacs
-         (message "%s" (substitute-command-keys "\
+      (message "%s" (substitute-command-keys "\
 Try \\[ps-run-start] \\[ps-run-buffer] and \
-\\<ps-run-mode-map>\\[ps-run-mouse-goto-error] on error offset." )))
-      (if (eq major-mode 'postscript-mode) ; Bundled with XEmacs, limited
-         (message "%s" (substitute-command-keys "\
-Try \\[ps-shell] and \\[ps-execute-buffer]."))))))
+\\<ps-run-mode-map>\\[ps-run-mouse-goto-error] on error offset.")))))
 (defun preview-gs-flag-error (ov err)
   "Make an eps error flag in overlay OV for ERR string."

reply via email to

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