comparison lisp/x-toolbar.el @ 217:d44af0c54775 r20-4b7

Import from CVS: tag r20-4b7
author cvs
date Mon, 13 Aug 2007 10:08:34 +0200
parents 1f0dabaa0855
children 262b8bb4a523
comparison
equal deleted inserted replaced
216:43306a74e31c 217:d44af0c54775
328 :group 'toolbar) 328 :group 'toolbar)
329 329
330 (defvar toolbar-news-frame nil 330 (defvar toolbar-news-frame nil
331 "The frame in which news is displayed.") 331 "The frame in which news is displayed.")
332 332
333 (defvar toolbar-news-frame-properties nil 333 (defcustom toolbar-news-frame-properties nil
334 "The properties of the frame in which news is displayed.") 334 "*The properties of the frame in which news is displayed."
335 :type '(repeat (group :inline t
336 (symbol :tag "Property")
337 (sexp :tag "Value")))
338 :group 'toolbar)
335 339
336 (defun toolbar-gnus () 340 (defun toolbar-gnus ()
337 "Run Gnus in a separate frame." 341 "Run Gnus in a separate frame."
338 (interactive) 342 (interactive)
339 (when (or (not toolbar-news-frame) 343 (if (not toolbar-news-use-separate-frame)
340 (not (frame-live-p toolbar-news-frame))) 344 (gnus)
341 (setq toolbar-news-frame (make-frame toolbar-news-frame-properties)) 345 (unless (frame-live-p toolbar-news-frame)
342 (add-hook 'gnus-exit-gnus-hook 346 (setq toolbar-news-frame (make-frame toolbar-news-frame-properties))
343 (lambda () 347 (add-hook 'gnus-exit-gnus-hook
344 (when (frame-live-p toolbar-news-frame) 348 (lambda ()
345 (if (cdr (frame-list)) 349 (when (frame-live-p toolbar-news-frame)
346 (delete-frame toolbar-news-frame)) 350 (if (cdr (frame-list))
347 (setq toolbar-news-frame nil)))) 351 (delete-frame toolbar-news-frame))
348 (select-frame toolbar-news-frame) 352 (setq toolbar-news-frame nil))))
349 (raise-frame toolbar-news-frame) 353 (select-frame toolbar-news-frame)
350 (gnus)) 354 (raise-frame toolbar-news-frame)
351 (if (frame-iconified-p toolbar-news-frame) 355 (gnus))
352 (deiconify-frame toolbar-news-frame)) 356 (when (framep toolbar-news-frame)
353 (select-frame toolbar-news-frame) 357 (when (frame-iconified-p toolbar-news-frame)
354 (raise-frame toolbar-news-frame)) 358 (deiconify-frame toolbar-news-frame))
359 (select-frame toolbar-news-frame)
360 (raise-frame toolbar-news-frame))))
355 361
356 (defun toolbar-news () 362 (defun toolbar-news ()
357 "Run News (in a separate frame??)." 363 "Run News (in a separate frame??)."
358 (interactive) 364 (interactive)
359 (let ((command (assq toolbar-news-reader toolbar-news-commands-alist))) 365 (let ((command (assq toolbar-news-reader toolbar-news-commands-alist)))