comparison 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
comparison
equal deleted inserted replaced
23:0edd3412f124 24:4103f0995bd7
6 ;; KEYWORDS: outlines, wp 6 ;; KEYWORDS: outlines, wp
7 ;; 7 ;;
8 ;; AUTHOR: Bob Weiner 8 ;; AUTHOR: Bob Weiner
9 ;; 9 ;;
10 ;; ORIG-DATE: 21-Oct-95 at 15:17:07 10 ;; ORIG-DATE: 21-Oct-95 at 15:17:07
11 ;; LAST-MOD: 3-Nov-95 at 19:44:10 by Bob Weiner 11 ;; LAST-MOD: 4-Dec-96 at 15:36:12 by Bob Weiner
12 ;; 12 ;;
13 ;; This file is part of Hyperbole. 13 ;; This file is part of Hyperbole.
14 ;; Available for use and distribution under the same terms as GNU Emacs. 14 ;; Available for use and distribution under the same terms as GNU Emacs.
15 ;; 15 ;;
16 ;; Copyright (C) 1995, Free Software Foundation, Inc. 16 ;; Copyright (C) 1995, Free Software Foundation, Inc.
295 (setq kvspec:string (format kvspec:string-format kvspec:current))) 295 (setq kvspec:string (format kvspec:string-format kvspec:current)))
296 (if (memq 'kvspec:string mode-line-format) 296 (if (memq 'kvspec:string mode-line-format)
297 nil 297 nil
298 (setq mode-line-format (copy-sequence mode-line-format)) 298 (setq mode-line-format (copy-sequence mode-line-format))
299 (let ((elt (or (memq 'mode-line-buffer-identification mode-line-format) 299 (let ((elt (or (memq 'mode-line-buffer-identification mode-line-format)
300 (memq 'modeline-buffer-identification mode-line-format)))) 300 (memq 'modeline-buffer-identification
301 (setcdr elt (cons 'kvspec:string (cdr elt)))))) 301 mode-line-format))))
302 (if elt
303 (setcdr elt (cons 'kvspec:string (cdr elt)))
304 ;;
305 ;; XEmacs 19.14 introduced extents into the modeline that we
306 ;; must work around.
307 (if (and hyperb:xemacs-p (string-lessp "19.14" hyperb:xemacs-p))
308 (let ((mf modeline-format)
309 elt)
310 (while mf
311 (setq elt (car mf))
312 (if (and (consp elt) (eq (cdr elt) 'modeline-buffer-identification))
313 (progn (setcdr mf (cons 'kvspec:string (cdr mf)))
314 (setq mf nil)))
315 (setq mf (cdr mf)))))))))
302 316
303 (defun kvspec:update-view () 317 (defun kvspec:update-view ()
304 "Update view according to current setting of local 'kvspec:current' variable." 318 "Update view according to current setting of local 'kvspec:current' variable."
305 (let ((modified-p (buffer-modified-p)) 319 (let ((modified-p (buffer-modified-p))
306 (buffer-read-only)) 320 (buffer-read-only))