2004-01-06 Steve Youngs <sryoungs@bigpond.net.au>
[gnus] / lisp / gnus-ems.el
index 14d91b1..6fd34cf 100644 (file)
@@ -37,8 +37,7 @@
 (defvar gnus-down-mouse-2 [down-mouse-2])
 (defvar gnus-widget-button-keymap nil)
 (defvar gnus-mode-line-modified
-  (if (or (featurep 'xemacs)
-         (< emacs-major-version 20))
+  (if (featurep 'xemacs)
       '("--**-" . "-----")
     '("**" "--")))
 
         (truncate-string-to-width valstr ,max-width)
        valstr)))
 
-(eval-and-compile
-  (defalias 'gnus-char-width
-    (if (fboundp 'char-width)
-       'char-width
-      (lambda (ch) 1)))) ;; A simple hack.
-
 (eval-and-compile
   (if (featurep 'xemacs)
       (gnus-xmas-define)
   "Non-nil means the mark and region are currently active in this buffer."
   mark-active) ; aliased to region-exists-p in XEmacs.
 
-(if (fboundp 'add-minor-mode)
-    (defalias 'gnus-add-minor-mode 'add-minor-mode)
-  (defun gnus-add-minor-mode (mode name map &rest rest)
-    (set (make-local-variable mode) t)
-    (unless (assq mode minor-mode-alist)
-      (push `(,mode ,name) minor-mode-alist))
-    (unless (assq mode minor-mode-map-alist)
-      (push (cons mode map)
-           minor-mode-map-alist))))
-
 (defun gnus-x-splash ()
   "Show a splash screen using a pixmap in the current buffer."
   (let ((dir (nnheader-find-etc-directory "gnus"))
     (apply 'create-image file type data-p props)))
 
 (defun gnus-put-image (glyph &optional string category)
-  (insert-image glyph (or string " "))
-  (put-text-property (1- (point)) (point) 'gnus-image-category category)
-  (unless string
-    (put-text-property (1- (point)) (point)
-                      'gnus-image-text-deletable t))
-  glyph)
+  (let ((point (point)))
+    (insert-image glyph (or string " "))
+    (put-text-property point (point) 'gnus-image-category category)
+    (unless string
+      (put-text-property (1- (point)) (point)
+                        'gnus-image-text-deletable t))
+    glyph))
 
 (defun gnus-remove-image (image &optional category)
   (dolist (position (message-text-with-property 'display))