comparison lisp/gnus/gnus-spec.el @ 108:360340f9fd5f r20-1b6

Import from CVS: tag r20-1b6
author cvs
date Mon, 13 Aug 2007 09:18:39 +0200
parents ec9a17fef872
children
comparison
equal deleted inserted replaced
107:523141596bda 108:360340f9fd5f
113 (1- (point))) 113 (1- (point)))
114 gnus-mouse-face-prop gnus-mouse-face)) 114 gnus-mouse-face-prop gnus-mouse-face))
115 (defvar gnus-group-line-format-spec 115 (defvar gnus-group-line-format-spec
116 (gnus-byte-code 'gnus-group-line-format-spec)) 116 (gnus-byte-code 'gnus-group-line-format-spec))
117 117
118 (defvar gnus-format-specs 118 (defvar gnus-format-specs
119 `((version . ,emacs-version) 119 `((version . ,emacs-version)
120 (group "%M\%S\%p\%P\%5y: %(%g%)%l\n" ,gnus-group-line-format-spec) 120 (group "%M\%S\%p\%P\%5y: %(%g%)%l\n" ,gnus-group-line-format-spec)
121 (summary-dummy "* %(: :%) %S\n" 121 (summary-dummy "* %(: :%) %S\n"
122 ,gnus-summary-dummy-line-format-spec) 122 ,gnus-summary-dummy-line-format-spec)
123 (summary "%U\%R\%z\%I\%(%[%4L: %-20,20n%]%) %s\n" 123 (summary "%U\%R\%z\%I\%(%[%4L: %-20,20n%]%) %s\n"
124 ,gnus-summary-line-format-spec)) 124 ,gnus-summary-line-format-spec))
125 "Alist of format specs.") 125 "Alist of format specs.")
126 126
127 (defvar gnus-article-mode-line-format-spec nil) 127 (defvar gnus-article-mode-line-format-spec nil)
128 (defvar gnus-summary-mode-line-format-spec nil) 128 (defvar gnus-summary-mode-line-format-spec nil)
349 tilde-form nil) 349 tilde-form nil)
350 (setq spec-beg (1- (point))) 350 (setq spec-beg (1- (point)))
351 351
352 ;; Parse this spec fully. 352 ;; Parse this spec fully.
353 (while 353 (while
354 (cond 354 (cond
355 ((looking-at "\\([-.0-9]+\\)\\(,[-0-9]+\\)?") 355 ((looking-at "\\([-.0-9]+\\)\\(,[-0-9]+\\)?")
356 (setq pad-width (string-to-number (match-string 1))) 356 (setq pad-width (string-to-number (match-string 1)))
357 (when (match-beginning 2) 357 (when (match-beginning 2)
358 (setq max-width (string-to-number (buffer-substring 358 (setq max-width (string-to-number (buffer-substring
359 (1+ (match-beginning 2)) 359 (1+ (match-beginning 2))
437 (setq el (gnus-tilde-max-form el max-width))) 437 (setq el (gnus-tilde-max-form el max-width)))
438 (push el flist))) 438 (push el flist)))
439 (insert elem-type) 439 (insert elem-type)
440 (push (car elem) flist)))) 440 (push (car elem) flist))))
441 (setq fstring (buffer-string))) 441 (setq fstring (buffer-string)))
442 442
443 ;; Do some postprocessing to increase efficiency. 443 ;; Do some postprocessing to increase efficiency.
444 (setq 444 (setq
445 result 445 result
446 (cond 446 (cond
447 ;; Emptyness. 447 ;; Emptyness.
498 (eval form)))) 498 (eval form))))
499 499
500 (defun gnus-compile () 500 (defun gnus-compile ()
501 "Byte-compile the user-defined format specs." 501 "Byte-compile the user-defined format specs."
502 (interactive) 502 (interactive)
503 (when gnus-xemacs
504 (error "Can't compile specs under XEmacs"))
503 (let ((entries gnus-format-specs) 505 (let ((entries gnus-format-specs)
504 (byte-compile-warnings '(unresolved callargs redefine)) 506 (byte-compile-warnings '(unresolved callargs redefine))
505 entry gnus-tmp-func) 507 entry gnus-tmp-func)
506 (save-excursion 508 (save-excursion
507 (gnus-message 7 "Compiling format specs...") 509 (gnus-message 7 "Compiling format specs...")