auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] [elpa] externals/auctex d563566 42/43: Merge branch 'mast


From: Tassilo Horn
Subject: [AUCTeX-diffs] [elpa] externals/auctex d563566 42/43: Merge branch 'master' into externals/auctex
Date: Tue, 20 Mar 2018 11:34:16 -0400 (EDT)

branch: externals/auctex
commit d5635660eb900d41a91018ed4d3245e91eb7d31c
Merge: aeeedbd c1f04df
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>

    Merge branch 'master' into externals/auctex
---
 Makefile.in                  |   2 +-
 bib-cite.el                  | 269 +++------------
 context.el                   |   2 +-
 doc/auctex.texi              |  29 +-
 doc/changes.texi             |   9 +
 font-latex.el                | 120 ++-----
 latex-flymake.el             | 104 ++++++
 latex.el                     | 321 +++++++-----------
 plain-tex.el                 |   2 +-
 preview.el                   |  14 +-
 prv-xemacs.el                | 759 -------------------------------------------
 style/alphanum.el            |   6 +-
 style/amsmath.el             |   5 +-
 style/babel.el               |   7 +-
 style/bidi.el                | 154 ++++++++-
 style/caption.el             |  22 +-
 style/currvita.el            |   2 +-
 style/dinbrief.el            |   4 +-
 style/dk-bib.el              |   4 +-
 style/doc.el                 |   4 +-
 style/empheq.el              |  12 +-
 style/enumitem.el            |  20 +-
 style/floatrow.el            |  17 +-
 style/fvextra.el             |   9 +-
 style/inputenc.el            |   4 +-
 style/jura.el                |   4 +-
 style/listings.el            |  16 +-
 style/ltx-base.el            |   4 +-
 style/ltxdoc.el              |   4 +-
 style/mdframed.el            |  13 +-
 style/minted.el              |   6 +-
 style/moodle.el              |   2 +-
 style/pdfsync.el             |   2 +-
 style/tcolorbox.el           |   7 +-
 style/tcolorboxlib-raster.el |   2 +-
 style/url.el                 |   8 +-
 tex-buf.el                   | 163 ++++------
 tex-fold.el                  |  85 ++---
 tex-font.el                  |  10 +-
 tex-info.el                  |  29 +-
 tex-jp.el                    |  50 +--
 tex.el                       | 386 +++++++---------------
 texmathp.el                  |  14 +-
 toolbar-x.el                 | 613 ++++------------------------------
 44 files changed, 895 insertions(+), 2424 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index abe2b2e..5a61a37 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -86,7 +86,7 @@ MULEELC = @MULEELC@
 AUCSRC = tex.el tex-buf.el tex-style.el plain-tex.el latex.el tex-info.el \
        texmathp.el multi-prompt.el tex-mik.el font-latex.el tex-font.el \
        context.el context-en.el context-nl.el tex-fold.el \
-       toolbar-x.el tex-bar.el bib-cite.el tex-ispell.el
+       toolbar-x.el tex-bar.el bib-cite.el tex-ispell.el latex-flymake.el
 AUCELC = $(AUCSRC:.el=.elc)
 
 STYLESRC = style/prosper.el \
diff --git a/bib-cite.el b/bib-cite.el
index 0ff47fb..5cb8a1d 100644
--- a/bib-cite.el
+++ b/bib-cite.el
@@ -589,7 +589,8 @@
 ;; ----------------------------------------------------------------------------
 ;;; Code:
 
-(eval-when-compile (require 'cl))
+(eval-when-compile
+  (require 'cl-lib))
 
 (defgroup bib-cite nil
   "bib-cite, LaTeX minor-mode to display \cite, \ref and \label commands."
@@ -759,32 +760,17 @@ runs bib-find, and [mouse-3] runs bib-display."
        (progn
          (bib-cite-setup-highlight-mouse-keymap)
          (bib-highlight-mouse)
-         (when (featurep 'xemacs)
-           (make-local-hook 'after-change-functions))
          (add-hook 'after-change-functions
-                   'bib-cite-setup-mouse-function nil t)))
-    (if (featurep 'xemacs)
-       (progn
-         (or (local-variable-p 'current-menubar (current-buffer))
-             (set-buffer-menubar current-menubar))
-         (add-submenu nil bib-cite-minor-mode-menu))))
+                   'bib-cite-setup-mouse-function nil t))))
    (t
    ;;;Undo the minor-mode
     ;; mouse overlay
-    (cond
-     ((featurep 'xemacs)
-      (while bib-ext-list
-       (delete-extent (car bib-ext-list))
-       (setq bib-ext-list (cdr bib-ext-list))))
-     (t
-      (remove-hook 'after-change-functions 'bib-cite-setup-mouse-function t)
-      (let ((before-change-functions) (after-change-functions))
-       ;; FIXME This detroys all mouse-faces and local-maps!
-       ;; FIXME Hope no other package is using them in this buffer!
-       (remove-text-properties (point-min) (point-max)
-                               '(mouse-face t local-map t)))))
-    (if (featurep 'xemacs)
-       (delete-menu-item '("BCite"))))))
+    (remove-hook 'after-change-functions 'bib-cite-setup-mouse-function t)
+    (let ((before-change-functions) (after-change-functions))
+      ;; FIXME This detroys all mouse-faces and local-maps!
+      ;; FIXME Hope no other package is using them in this buffer!
+      (remove-text-properties (point-min) (point-max)
+                             '(mouse-face t local-map t))))))
 
 ;;This must be eval'ed when the LaTeX mode is in use.
 ;; bib-highlight-mouse-keymap is a local variable so each buffer can have it's
@@ -799,46 +785,22 @@ runs bib-find, and [mouse-3] runs bib-display."
    ;;;        menus to display.  Maybe on `highlighted' commands we could only
    ;;;        display the bib-cite stuff (or a subset of it).
        (let ((m (copy-keymap (current-local-map))))
+         ;; emacs 19
          (cond
-          ((featurep 'xemacs)
-           (set-keymap-name m 'bib-highlight-mouse-keymap)
-           (cond
-            ;;action-key stuff from Vladimir Alexiev <address@hidden>
-            ((commandp 'action-key)
-             ;; for hyperbole. The Right Way is to define implicit buttons
-             ;; (defib) bib-cite and label-ref instead of overriding
-             ;; action-key and assist key, so that eg smart key help can
-             ;; be obtained, but I'm lazy.
-             (substitute-key-definition 'action-key 'bib-find m global-map)
-             (substitute-key-definition 'assist-key 'bib-display m global-map)
-             (substitute-key-definition 'action-key-depress
-                                        'bib-find-mouse m global-map)
-             (substitute-key-definition 'assist-key-depress
-                                        'bib-display-mouse m global-map)
-             (substitute-key-definition 'action-mouse-key nil m global-map)
-             (substitute-key-definition 'assist-mouse-key nil m global-map))
-            (t                               ; xemacs, not hyperbole
-             (define-key m "" 'bib-find-mouse) ;   bug Fixed in V2.17
-             (define-key m "
" 'bib-display-mouse) ;bug Fixed in V2.17
-             ;;(define-key m [(shift button1)] 'bib-display-mouse)
-             (define-key m [button3] 'bib-display-mouse)
-             (define-key m [button2] 'bib-find-mouse))))
-           (t                                 ; emacs 19
-            (cond
-             ((commandp 'action-key)
-              (substitute-key-definition 'action-key 'bib-find m global-map)
-              (substitute-key-definition 'assist-key 'bib-display m global-map)
-              (substitute-key-definition 'action-mouse-key-emacs19
-                                         'bib-find-mouse m global-map)
-              (substitute-key-definition 'assist-mouse-key-emacs19
-                                         'bib-display-mouse m global-map)
-              (substitute-key-definition 'action-key-depress-emacs19
-                                         nil m global-map)
-              (substitute-key-definition 'assist-key-depress-emacs19
-                                         nil m global-map))
-             (t                               ; emacs 19, not hyperbole
-              (define-key m [down-mouse-3] 'bib-display-mouse)
-              (define-key m [mouse-2] 'bib-find-mouse)))))
+          ((commandp 'action-key)
+           (substitute-key-definition 'action-key 'bib-find m global-map)
+           (substitute-key-definition 'assist-key 'bib-display m global-map)
+           (substitute-key-definition 'action-mouse-key-emacs19
+                                      'bib-find-mouse m global-map)
+           (substitute-key-definition 'assist-mouse-key-emacs19
+                                      'bib-display-mouse m global-map)
+           (substitute-key-definition 'action-key-depress-emacs19
+                                      nil m global-map)
+           (substitute-key-definition 'assist-key-depress-emacs19
+                                      nil m global-map))
+          (t                               ; emacs 19, not hyperbole
+           (define-key m [down-mouse-3] 'bib-display-mouse)
+           (define-key m [mouse-2] 'bib-find-mouse)))
          m)))
 
 ;;;###autoload
@@ -888,83 +850,6 @@ runs bib-find, and [mouse-3] runs bib-display."
                minor-mode-map-alist)))
 
 
-;;; Add a menu entry to bibtex.el (Perhaps I should not do this).
-(cond
- ((and (featurep 'xemacs)
-       (or window-system
-          (fboundp 'smart-menu)))      ;text menus by Bob Weiner
-  ;;
-  ;; xemacs under X with AUCTeX
-  ;;
-
-  ;; Add to bibtex.el's popup menu
-  (defvar bib-cite-xemacs-bibtex-mode-menu
-    '("---"
-      "Bib-Cite"
-      "---"
-      ["Search apropos BibTeX files" bib-apropos t]
-      ["Create AUCTeX auto parsing file" bib-create-auto-file t])
-    "Submenu of bibtex-mode menu, used by bib-cite.")
-
-  (if (boundp 'bibtex-menu)
-      ;; Add menu now
-      (setq bibtex-menu
-           (append
-            bibtex-menu
-            bib-cite-xemacs-bibtex-mode-menu))
-    ;; Setup to add menu later
-    (defun bib-cite-bibtex-mode-hook ()
-      (if (boundp 'bibtex-menu)
-         (progn
-           (setq bibtex-menu
-                 (append
-                  bibtex-menu
-                  bib-cite-xemacs-bibtex-mode-menu))
-           (remove-hook 'bibtex-mode-hook 'bib-cite-bibtex-mode-hook))))
-    (add-hook 'bibtex-mode-hook 'bib-cite-bibtex-mode-hook))
-  )
-
- ((and (not (featurep 'xemacs))
-       (string-equal "19" (substring emacs-version 0 2))
-       (or window-system
-          (fboundp 'tmm-menubar)))     ; 19.30 - Will autoload if necessary
-  ;;
-  ;; emacs-19 under X-windows (or non-X with tmm)
-  ;;
-
-  ;; This *almost* makes me want to switch over to XEmacs...
-
-  ;; to AUCTeX auto file for a bibtex buffer
-  (eval-after-load
-   "bibtex"
-   '(progn
-      (add-hook 'bibtex-mode-hook 'TeX-bibtex-set-BibTeX-dialect)
-      (cond
-       ((lookup-key bibtex-mode-map [menu-bar move/edit])
-       (define-key-after
-         (lookup-key bibtex-mode-map [menu-bar move/edit])
-         [bib-nil] '("---" . nil) '"--")
-       (define-key-after
-         (lookup-key bibtex-mode-map [menu-bar move/edit])
-         [bib-apropos] '("Search Apropos" . bib-apropos) 'bib-nil)
-       (define-key-after
-         (lookup-key bibtex-mode-map [menu-bar move/edit])
-         [auc-tex-parse]
-         '("Create AUCTeX auto parsing file" . bib-create-auto-file)
-         'bib-apropos))
-       ((lookup-key bibtex-mode-map [menu-bar bibtex-edit])
-       (define-key-after
-         (lookup-key bibtex-mode-map [menu-bar bibtex-edit])
-         [bib-nil] '("---" . nil) '"--")
-       (define-key-after
-         (lookup-key bibtex-mode-map [menu-bar bibtex-edit])
-         [bib-apropos] '("Search Apropos" . bib-apropos) 'bib-nil)
-       (define-key-after
-         (lookup-key bibtex-mode-map [menu-bar bibtex-edit])
-         [auc-tex-parse]
-         '("Create AUCTeX auto parsing file" . bib-create-auto-file)
-         'bib-apropos)))))))
-
 ;; Following from bibtex.el
 (defvar
   bib-cite-bibtex-font-lock-keywords
@@ -1227,19 +1112,6 @@ to create a bibtex file containing only the references 
used in the document."
       (put-text-property (point-min)(or limit (point-max))
                         'face 'red-bold))))
 
-(when (featurep 'xemacs)
-  (defun bib-cite-fontify-help-xemacs (defaults)
-    (if (fboundp 'font-lock-set-defaults-1) ; >= XEmacs 19.14
-        (with-current-buffer "*Help*"
-          (setq font-lock-defaults-computed nil
-                font-lock-keywords nil)
-          (font-lock-set-defaults-1
-           (and defaults (font-lock-find-font-lock-defaults defaults)))
-          (font-lock-fontify-buffer)
-          (setq font-lock-defaults-computed nil
-                font-lock-keywords nil)
-          (font-lock-set-defaults-1)))))
-
 (defun bib-cite--fontify-help ()
   ;; FIXME: This looks ugly and incorrect.
   (if font-lock-mode
@@ -1254,10 +1126,6 @@ to create a bibtex file containing only the references 
used in the document."
   (cond
    ((not (featurep 'font-lock))
     nil)                                ;No font-lock! Stop here.
-   ;; font-lock under Emacs and XEmacs
-   ((featurep 'xemacs)
-    ;; XEmacs
-    (bib-cite-fontify-help-xemacs 'bibtex-mode))
    (t
     ;; Emacs
     (with-current-buffer "*Help*"
@@ -1270,11 +1138,6 @@ to create a bibtex file containing only the references 
used in the document."
   (cond
    ((not (featurep 'font-lock))
     nil)                                ;No font-lock! Stop here.
-   ;; font-lock under Emacs and XEmacs
-   ((featurep 'xemacs)
-    ;; XEmacs, not necessary to do s.th. special for font-latex, we do *not*
-    ;; want the buffer-local faces!
-    (bib-cite-fontify-help-xemacs 'latex-mode))
    (t
     ;; Emacs
     (with-current-buffer "*Help*"
@@ -1337,9 +1200,8 @@ See variables bib-etags-command and bib-etags-filename"
     ;;  buffer and returns an error because TAGS buffer does have
     ;;  tags-file-name set.
     ;;  To get around this.  I'm setting this variable in the TAGS buffer.
-    ;; Skip this in XEmacs (Changed by Anders Stenman)
-    (if (and (not (featurep 'xemacs))
-            (get-file-buffer the-tags-file))
+    ;; (Changed by Anders Stenman)
+    (if (get-file-buffer the-tags-file)
        (with-current-buffer (get-file-buffer the-tags-file)
          (set (make-local-variable 'tags-file-name) the-tags-file))))
 
@@ -1381,21 +1243,12 @@ See variables bib-etags-command and bib-etags-filename"
       ;; * peta Wed Nov  8 16:27:29 1995 -- better remove the mouse face
       ;;   properties first.
       (setq bib-ext-list nil)          ;Reconstructed below...
-      (if (featurep 'xemacs)
-         (while local-extent-list
-           (setq extent (car local-extent-list))
-           (if (or (extent-detached-p extent)
-                   (and (<= (point-min)(extent-start-position extent))
-                        (>= (point-max)(extent-end-position extent))))
-               (delete-extent extent)
-             (setq bib-ext-list (cons extent bib-ext-list)))
-           (setq local-extent-list (cdr local-extent-list)))
-       ;; Remove properties for regular emacs
-       ;; FIXME This detroys all mouse-faces and local-maps!
-       ;; FIXME Hope no other package is using them in this buffer!
-       (let ((before-change-functions) (after-change-functions))
-         (remove-text-properties (point-min) (point-max)
-                                 '(mouse-face t local-map t))))
+      ;; Remove properties for regular emacs
+      ;; FIXME This detroys all mouse-faces and local-maps!
+      ;; FIXME Hope no other package is using them in this buffer!
+      (let ((before-change-functions) (after-change-functions))
+       (remove-text-properties (point-min) (point-max)
+                               '(mouse-face t local-map t)))
       (goto-char (point-min))
       (while
          (re-search-forward
@@ -1405,29 +1258,19 @@ See variables bib-etags-command and bib-etags-filename"
           nil t)
        (setq s (match-beginning 0))
        (setq e (match-end 0))
-       (cond
-        ((featurep 'xemacs)
-         (setq extent (make-extent s e))
-         (setq bib-ext-list (cons extent bib-ext-list))
-         (set-extent-property extent 'highlight t)
-         (set-extent-property extent 'start-open t)
-         (set-extent-property extent 'balloon-help 'bib-label-help)
-         (set-extent-property extent 'help-echo 'bib-label-help-echo)
-         (set-extent-property extent 'keymap bib-highlight-mouse-keymap))
-        (t
-         (let ((before-change-functions) (after-change-functions)
-               ;;(this-overlay (make-overlay s e))
-               )
+       (let ((before-change-functions) (after-change-functions)
+             ;;(this-overlay (make-overlay s e))
+             )
 ;;;  Even using overlays doesn't help here.  If bib-highlight-mouse-keymap
 ;;;  does not include the AucTeX menus, then these disappear when we click
 ;;;  onto a



reply via email to

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