emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master a3c2634 3/5: Get rid of gnus-ems-redefine


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master a3c2634 3/5: Get rid of gnus-ems-redefine
Date: Wed, 10 Feb 2016 03:42:35 +0000

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

    Get rid of gnus-ems-redefine
    
    * lisp/gnus/gnus-ems.el (gnus-mouse-face-prop): Remove.
---
 lisp/gnus/gnus-art.el  |    8 +++-----
 lisp/gnus/gnus-cite.el |    2 --
 lisp/gnus/gnus-ems.el  |   41 -----------------------------------------
 lisp/gnus/gnus-msg.el  |    4 ----
 lisp/gnus/gnus-salt.el |    3 ---
 lisp/gnus/gnus-spec.el |    5 ++---
 lisp/gnus/gnus-sum.el  |   10 ++++------
 lisp/gnus/gnus.el      |    4 ----
 8 files changed, 9 insertions(+), 68 deletions(-)

diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 147c258..96d2adb 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -6197,7 +6197,7 @@ If nil, don't show those extra buttons."
               (gnus-mime-display-alternative
                ',ihandles ',not-pref ',begend ,id))
             keymap ,gnus-mime-button-map
-            ,gnus-mouse-face-prop ,gnus-article-mouse-face
+            mouse-face ,gnus-article-mouse-face
             face ,gnus-article-button-face
             gnus-part ,id
             article-type multipart
@@ -6222,7 +6222,7 @@ If nil, don't show those extra buttons."
                 (gnus-mime-display-alternative
                  ',ihandles ',handle ',begend ,id))
               keymap ,gnus-mime-button-map
-              ,gnus-mouse-face-prop ,gnus-article-mouse-face
+              mouse-face ,gnus-article-mouse-face
               face ,gnus-article-button-face
               gnus-part ,id
               gnus-data ,handle
@@ -8189,7 +8189,7 @@ url is put as the `gnus-button-url' overlay property on 
the button."
   (gnus-add-text-properties
    from to
    (nconc (and gnus-article-mouse-face
-              (list gnus-mouse-face-prop gnus-article-mouse-face))
+              (list 'mouse-face gnus-article-mouse-face))
          (list 'gnus-callback fun)
          (and data (list 'gnus-data data))))
   (widget-convert-button 'link from to :action 'gnus-widget-press-button
@@ -9018,8 +9018,6 @@ For example:
   (interactive)
   (gnus-mime-security-run-function 'mm-pipe-part))
 
-(gnus-ems-redefine)
-
 (provide 'gnus-art)
 
 (run-hooks 'gnus-art-load-hook)
diff --git a/lisp/gnus/gnus-cite.el b/lisp/gnus/gnus-cite.el
index 502a3be..aa3635f 100644
--- a/lisp/gnus/gnus-cite.el
+++ b/lisp/gnus/gnus-cite.el
@@ -1248,8 +1248,6 @@ When enabled, it automatically turns on `font-lock-mode'."
   "Turn off `gnus-message-citation-mode'."
   (gnus-message-citation-mode -1))
 
-(gnus-ems-redefine)
-
 (provide 'gnus-cite)
 
 ;; Local Variables:
diff --git a/lisp/gnus/gnus-ems.el b/lisp/gnus/gnus-ems.el
index 167bc80..7c3a2cc 100644
--- a/lisp/gnus/gnus-ems.el
+++ b/lisp/gnus/gnus-ems.el
@@ -65,47 +65,6 @@
         (truncate-string-to-width valstr ,max-width)
        valstr)))
 
-(eval-and-compile
-  (if (featurep 'xemacs)
-      (gnus-xmas-define)
-    (defvar gnus-mouse-face-prop 'mouse-face
-      "Property used for highlighting mouse regions.")))
-
-(defvar gnus-tmp-unread)
-(defvar gnus-tmp-replied)
-(defvar gnus-tmp-score-char)
-(defvar gnus-tmp-indentation)
-(defvar gnus-tmp-opening-bracket)
-(defvar gnus-tmp-lines)
-(defvar gnus-tmp-name)
-(defvar gnus-tmp-closing-bracket)
-(defvar gnus-tmp-subject-or-nil)
-(defvar gnus-check-before-posting)
-(defvar gnus-mouse-face)
-(defvar gnus-group-buffer)
-
-(defun gnus-ems-redefine ()
-  (cond
-   ((featurep 'mule)
-    ;; Mule and new Emacs definitions
-
-    ;; [Note] Now there are three kinds of mule implementations,
-    ;; original MULE, XEmacs/mule and Emacs 20+ including
-    ;; MULE features.  Unfortunately these APIs are different.  In
-    ;; particular, Emacs (including original Mule) and XEmacs are
-    ;; quite different.  However, this version of Gnus doesn't support
-    ;; anything other than XEmacs 20+ and Emacs 20.3+.
-
-    ;; Predicates to check are following:
-    ;; (boundp 'MULE) is t only if Mule (original; anything older than
-    ;;                     Mule 2.3) is running.
-    ;; (featurep 'mule) is t when other mule variants are running.
-
-    ;; It is possible to detect XEmacs/mule by (featurep 'mule) and
-    ;; (featurep 'xemacs).  In this case, the implementation for
-    ;; XEmacs/mule may be shareable between XEmacs and XEmacs/mule.
-    )))
-
 (provide 'gnus-ems)
 
 ;;; gnus-ems.el ends here
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index b95bec2..ff16e4a 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -2006,10 +2006,6 @@ this is a reply."
                         (insert "From: " (message-make-from) "\n"))))
                  nil 'local)))))
 
-;;; Allow redefinition of functions.
-
-(gnus-ems-redefine)
-
 (provide 'gnus-msg)
 
 ;;; gnus-msg.el ends here
diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el
index d3e82fd..bc25ae6 100644
--- a/lisp/gnus/gnus-salt.el
+++ b/lisp/gnus/gnus-salt.el
@@ -889,9 +889,6 @@ it in the environment specified by BINDINGS."
          (set-window-point
           (gnus-get-buffer-window (current-buffer) t) (cdr region)))))))
 
-;;; Allow redefinition of functions.
-(gnus-ems-redefine)
-
 (provide 'gnus-salt)
 
 ;;; gnus-salt.el ends here
diff --git a/lisp/gnus/gnus-spec.el b/lisp/gnus/gnus-spec.el
index 87b9b25..380474d 100644
--- a/lisp/gnus/gnus-spec.el
+++ b/lisp/gnus/gnus-spec.el
@@ -79,7 +79,6 @@ text properties. This is only needed on XEmacs, as Emacs does 
this anyway."
 (defvar gnus-tmp-news-method)
 (defvar gnus-tmp-news-server)
 (defvar gnus-mouse-face)
-(defvar gnus-mouse-face-prop)
 (defvar gnus-tmp-header)
 (defvar gnus-tmp-from)
 
@@ -228,7 +227,7 @@ Return a list of updated types."
 (defun gnus-mouse-face-function (form type)
   `(gnus-put-text-property
     (point) (progn ,@form (point))
-    gnus-mouse-face-prop
+    mouse-face
     ,(if (equal type 0)
         'gnus-mouse-face
        `(quote ,(symbol-value (intern (format "gnus-mouse-face-%d" type)))))))
@@ -743,7 +742,7 @@ If PROPS, insert the result."
                    gnus-tmp-name))
          gnus-tmp-closing-bracket)
         (point))
-       gnus-mouse-face-prop gnus-mouse-face)
+       'mouse-face gnus-mouse-face)
       (insert " " gnus-tmp-subject-or-nil "\n"))
 
 (provide 'gnus-spec)
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index b02e8fd..9d0d1fc 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -12462,7 +12462,7 @@ If REVERSE, save parts that do not match TYPE."
          (forward-line -1)             ; back to `b'
          (gnus-add-text-properties
           b (1- e) (list 'gnus-number gnus-reffed-article-number
-                         gnus-mouse-face-prop gnus-mouse-face))
+                         'mouse-face gnus-mouse-face))
          (gnus-data-enter
           after-article gnus-reffed-article-number
           gnus-unread-mark b (car pslist) 0 (- e b))
@@ -12604,16 +12604,16 @@ If REVERSE, save parts that do not match TYPE."
       (let* ((beg (point-at-bol))
             (end (point-at-eol))
             ;; Fix by Mike Dugan <address@hidden>.
-            (from (if (get-text-property beg gnus-mouse-face-prop)
+            (from (if (get-text-property beg 'mouse-face)
                       beg
                     (or (next-single-property-change
-                         beg gnus-mouse-face-prop nil end)
+                         beg 'mouse-face nil end)
                         beg)))
             (to
              (if (= from end)
                  (- from 2)
                (or (next-single-property-change
-                    from gnus-mouse-face-prop nil end)
+                    from 'mouse-face nil end)
                    end))))
        ;; If no mouse-face prop on line we will have to = from = end,
        ;; so we highlight the entire line instead.
@@ -13118,8 +13118,6 @@ BOOKMARK is a bookmark name or a bookmark record."
 
 (gnus-summary-make-all-marking-commands)
 
-(gnus-ems-redefine)
-
 (provide 'gnus-sum)
 
 (run-hooks 'gnus-sum-load-hook)
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 996bb9e..2690e5e 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -4435,10 +4435,6 @@ prompt the user for the name of an NNTP server to use."
   (require 'debbugs-gnu)
   (debbugs-gnu nil "gnus"))
 
-;; Allow redefinition of Gnus functions.
-
-(gnus-ems-redefine)
-
 (provide 'gnus)
 
 ;;; gnus.el ends here



reply via email to

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