Mercurial > hg > xemacs-beta
comparison lisp/gnus/gnus-xmas.el @ 104:cf808b4c4290 r20-1b4
Import from CVS: tag r20-1b4
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:16:51 +0200 |
parents | 4be1180a9e89 |
children | 360340f9fd5f |
comparison
equal
deleted
inserted
replaced
103:30eda07fe280 | 104:cf808b4c4290 |
---|---|
135 (setq gnus-newsgroup-selected-overlay | 135 (setq gnus-newsgroup-selected-overlay |
136 (make-extent (gnus-point-at-bol) (gnus-point-at-eol))) | 136 (make-extent (gnus-point-at-bol) (gnus-point-at-eol))) |
137 (set-extent-face gnus-newsgroup-selected-overlay | 137 (set-extent-face gnus-newsgroup-selected-overlay |
138 gnus-summary-selected-face))) | 138 gnus-summary-selected-face))) |
139 | 139 |
140 (defvar gnus-xmas-force-redisplay t | 140 (defvar gnus-xmas-force-redisplay nil |
141 "If non-nil, force a redisplay before recentering the summary buffer. | 141 "If non-nil, force a redisplay before recentering the summary buffer. |
142 This is ugly, but it works around a bug in `window-displayed-height'.") | 142 This is ugly, but it works around a bug in `window-displayed-height'.") |
143 | |
144 (defun gnus-xmas-switch-horizontal-scrollbar-off () | |
145 (set-specifier scrollbar-height (cons (current-buffer) 0))) | |
143 | 146 |
144 (defun gnus-xmas-summary-recenter () | 147 (defun gnus-xmas-summary-recenter () |
145 "\"Center\" point in the summary window. | 148 "\"Center\" point in the summary window. |
146 If `gnus-auto-center-summary' is nil, or the article buffer isn't | 149 If `gnus-auto-center-summary' is nil, or the article buffer isn't |
147 displayed, no centering will be performed." | 150 displayed, no centering will be performed." |
323 (defun gnus-xmas-read-event-char () | 326 (defun gnus-xmas-read-event-char () |
324 "Get the next event." | 327 "Get the next event." |
325 (let ((event (next-command-event))) | 328 (let ((event (next-command-event))) |
326 (sit-for 0) | 329 (sit-for 0) |
327 ;; We junk all non-key events. Is this naughty? | 330 ;; We junk all non-key events. Is this naughty? |
328 (while (not (key-press-event-p event)) | 331 (while (not (or (key-press-event-p event) |
332 (button-press-event-p event))) | |
333 (dispatch-event event) | |
329 (setq event (next-command-event))) | 334 (setq event (next-command-event))) |
330 (cons (and (key-press-event-p event) | 335 (cons (and (key-press-event-p event) |
331 (event-to-character event)) | 336 (event-to-character event)) |
332 event))) | 337 event))) |
333 | 338 |
431 (if (fboundp 'x-color-values) | 436 (if (fboundp 'x-color-values) |
432 'x-color-values | 437 'x-color-values |
433 (lambda (color) | 438 (lambda (color) |
434 (color-instance-rgb-components | 439 (color-instance-rgb-components |
435 (make-color-instance color)))))) | 440 (make-color-instance color)))))) |
436 | |
437 (defun gnus-xmas-region-active-p () | |
438 (and (fboundp 'region-active-p) | |
439 (region-active-p))) | |
440 | 441 |
441 (defun gnus-xmas-redefine () | 442 (defun gnus-xmas-redefine () |
442 "Redefine lots of Gnus functions for XEmacs." | 443 "Redefine lots of Gnus functions for XEmacs." |
443 (fset 'gnus-summary-make-display-table 'ignore) | 444 (fset 'gnus-summary-make-display-table 'ignore) |
444 (fset 'gnus-visual-turn-off-edit-menu 'identity) | 445 (fset 'gnus-visual-turn-off-edit-menu 'identity) |
456 (fset 'gnus-add-hook 'gnus-xmas-add-hook) | 457 (fset 'gnus-add-hook 'gnus-xmas-add-hook) |
457 (fset 'gnus-character-to-event 'character-to-event) | 458 (fset 'gnus-character-to-event 'character-to-event) |
458 (fset 'gnus-mode-line-buffer-identification | 459 (fset 'gnus-mode-line-buffer-identification |
459 'gnus-xmas-mode-line-buffer-identification) | 460 'gnus-xmas-mode-line-buffer-identification) |
460 (fset 'gnus-key-press-event-p 'key-press-event-p) | 461 (fset 'gnus-key-press-event-p 'key-press-event-p) |
461 (fset 'gnus-region-active-p 'gnus-xmas-region-active-p) | 462 (fset 'gnus-region-active-p 'region-active-p) |
462 | 463 |
463 (add-hook 'gnus-group-mode-hook 'gnus-xmas-group-menu-add) | 464 (add-hook 'gnus-group-mode-hook 'gnus-xmas-group-menu-add) |
464 (add-hook 'gnus-summary-mode-hook 'gnus-xmas-summary-menu-add) | 465 (add-hook 'gnus-summary-mode-hook 'gnus-xmas-summary-menu-add) |
465 (add-hook 'gnus-article-mode-hook 'gnus-xmas-article-menu-add) | 466 (add-hook 'gnus-article-mode-hook 'gnus-xmas-article-menu-add) |
466 (add-hook 'gnus-score-mode-hook 'gnus-xmas-score-menu-add) | 467 (add-hook 'gnus-score-mode-hook 'gnus-xmas-score-menu-add) |
473 (add-hook 'gnus-server-mode-hook 'gnus-xmas-server-menu-add) | 474 (add-hook 'gnus-server-mode-hook 'gnus-xmas-server-menu-add) |
474 (add-hook 'gnus-browse-mode-hook 'gnus-xmas-browse-menu-add) | 475 (add-hook 'gnus-browse-mode-hook 'gnus-xmas-browse-menu-add) |
475 | 476 |
476 (add-hook 'gnus-group-mode-hook 'gnus-xmas-setup-group-toolbar) | 477 (add-hook 'gnus-group-mode-hook 'gnus-xmas-setup-group-toolbar) |
477 (add-hook 'gnus-summary-mode-hook 'gnus-xmas-setup-summary-toolbar) | 478 (add-hook 'gnus-summary-mode-hook 'gnus-xmas-setup-summary-toolbar) |
479 | |
480 (add-hook 'gnus-summary-mode-hook 'gnus-xmas-switch-horizontal-scrollbar-off) | |
478 | 481 |
479 (when (and (<= emacs-major-version 19) | 482 (when (and (<= emacs-major-version 19) |
480 (<= emacs-minor-version 13)) | 483 (<= emacs-minor-version 13)) |
481 (setq gnus-article-x-face-too-ugly (when (eq (device-type) 'tty) | 484 (setq gnus-article-x-face-too-ugly (when (eq (device-type) 'tty) |
482 ".")) | 485 ".")) |