diff lisp/hyperbole/kotl/kvspec.el @ 24:4103f0995bd7 r19-15b95

Import from CVS: tag r19-15b95
author cvs
date Mon, 13 Aug 2007 08:51:03 +0200
parents 376386a54a3c
children c53a95d3c46d
line wrap: on
line diff
--- a/lisp/hyperbole/kotl/kvspec.el	Mon Aug 13 08:50:31 2007 +0200
+++ b/lisp/hyperbole/kotl/kvspec.el	Mon Aug 13 08:51:03 2007 +0200
@@ -8,7 +8,7 @@
 ;; AUTHOR:       Bob Weiner
 ;;
 ;; ORIG-DATE:    21-Oct-95 at 15:17:07
-;; LAST-MOD:      3-Nov-95 at 19:44:10 by Bob Weiner
+;; LAST-MOD:      4-Dec-96 at 15:36:12 by Bob Weiner
 ;;
 ;; This file is part of Hyperbole.
 ;; Available for use and distribution under the same terms as GNU Emacs.
@@ -297,8 +297,22 @@
       nil
     (setq mode-line-format (copy-sequence mode-line-format))
     (let ((elt (or (memq 'mode-line-buffer-identification mode-line-format)
-		   (memq 'modeline-buffer-identification mode-line-format))))
-      (setcdr elt (cons 'kvspec:string (cdr elt))))))
+		   (memq 'modeline-buffer-identification
+			 mode-line-format))))
+      (if elt
+	  (setcdr elt (cons 'kvspec:string (cdr elt)))
+	;;
+	;; XEmacs 19.14 introduced extents into the modeline that we
+	;; must work around.
+	(if (and hyperb:xemacs-p (string-lessp "19.14" hyperb:xemacs-p))
+	    (let ((mf modeline-format)
+		  elt)
+	      (while mf
+		(setq elt (car mf))
+		(if (and (consp elt) (eq (cdr elt) 'modeline-buffer-identification))
+		    (progn (setcdr mf (cons 'kvspec:string (cdr mf)))
+			   (setq mf nil)))
+		(setq mf (cdr mf)))))))))
 
 (defun kvspec:update-view ()
   "Update view according to current setting of local 'kvspec:current' variable."