Mercurial > hg > xemacs-beta
comparison lisp/w3/w3-display.el @ 22:8fc7fe29b841 r19-15b94
Import from CVS: tag r19-15b94
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:50:29 +0200 |
parents | 859a2309aef8 |
children | 4103f0995bd7 |
comparison
equal
deleted
inserted
replaced
21:b88636d63495 | 22:8fc7fe29b841 |
---|---|
1 ;;; w3-display.el --- display engine v99999 | 1 ;;; w3-display.el --- display engine v99999 |
2 ;; Author: wmperry | 2 ;; Author: wmperry |
3 ;; Created: 1997/02/08 06:51:44 | 3 ;; Created: 1997/02/14 17:51:17 |
4 ;; Version: 1.123 | 4 ;; Version: 1.127 |
5 ;; Keywords: faces, help, hypermedia | 5 ;; Keywords: faces, help, hypermedia |
6 | 6 |
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
8 ;;; Copyright (c) 1996 by William M. Perry (wmperry@cs.indiana.edu) | 8 ;;; Copyright (c) 1996 by William M. Perry (wmperry@cs.indiana.edu) |
9 ;;; Copyright (c) 1996, 1997 Free Software Foundation, Inc. | 9 ;;; Copyright (c) 1996, 1997 Free Software Foundation, Inc. |
30 (require 'css) | 30 (require 'css) |
31 (require 'font) | 31 (require 'font) |
32 (require 'w3-widget) | 32 (require 'w3-widget) |
33 (require 'w3-imap) | 33 (require 'w3-imap) |
34 | 34 |
35 (define-widget-keywords :emacspeak-help) | |
35 (autoload 'sentence-ify "flame") | 36 (autoload 'sentence-ify "flame") |
36 (autoload 'string-ify "flame") | 37 (autoload 'string-ify "flame") |
37 (autoload '*flame "flame") | 38 (autoload '*flame "flame") |
38 (if (not (fboundp 'flatten)) (autoload 'flatten "flame")) | 39 (if (not (fboundp 'flatten)) (autoload 'flatten "flame")) |
39 (defvar w3-cookie-cache nil) | 40 (defvar w3-cookie-cache nil) |
367 (add-text-properties w3-scratch-start-point | 368 (add-text-properties w3-scratch-start-point |
368 (point) (list 'face w3-active-faces | 369 (point) (list 'face w3-active-faces |
369 'start-open t | 370 'start-open t |
370 'end-open t | 371 'end-open t |
371 'rear-nonsticky t | 372 'rear-nonsticky t |
372 'duplicable t | 373 'duplicable t)) |
373 'read-only t)) | |
374 (if (car w3-active-voices) | 374 (if (car w3-active-voices) |
375 (add-text-properties w3-scratch-start-point (point) | 375 (add-text-properties w3-scratch-start-point (point) |
376 (list 'personality (car w3-active-voices)))) | 376 (list 'personality (car w3-active-voices)))) |
377 ) | 377 ) |
378 | 378 |
633 ((or w3-delay-image-loads ; Delaying images | 633 ((or w3-delay-image-loads ; Delaying images |
634 (not (fboundp 'valid-specifier-domain-p)) ; Can't do images | 634 (not (fboundp 'valid-specifier-domain-p)) ; Can't do images |
635 (eq (device-type) 'tty)) ; Why bother? | 635 (eq (device-type) 'tty)) ; Why bother? |
636 (w3-add-delayed-graphic widget)) | 636 (w3-add-delayed-graphic widget)) |
637 ((not (w3-image-loadable-p src nil)) ; Hey, we can't load it! | 637 ((not (w3-image-loadable-p src nil)) ; Hey, we can't load it! |
638 (w3-warn 'images (format "Skipping image %s" (url-basepath src t))) | 638 (message "Skipping image %s" (url-basepath src t)) |
639 (w3-add-delayed-graphic widget)) | 639 (w3-add-delayed-graphic widget)) |
640 (t ; Grab the images | 640 (t ; Grab the images |
641 (let ( | 641 (let ( |
642 (url-request-method "GET") | 642 (url-request-method "GET") |
643 (old-asynch url-be-asynchronous) | 643 (old-asynch url-be-asynchronous) |
677 (message "Enhancing image... done") | 677 (message "Enhancing image... done") |
678 (kill-buffer (current-buffer)) | 678 (kill-buffer (current-buffer)) |
679 (cond | 679 (cond |
680 ((w3-image-invalid-glyph-p glyph) | 680 ((w3-image-invalid-glyph-p glyph) |
681 (setq glyph nil) | 681 (setq glyph nil) |
682 (w3-warn 'image (format "Reading of %s failed." url))) | 682 (message "Reading of %s failed." url)) |
683 ((eq (aref glyph 0) 'xbm) | 683 ((eq (aref glyph 0) 'xbm) |
684 (let ((temp-fname (url-generate-unique-filename "%s.xbm"))) | 684 (let ((temp-fname (url-generate-unique-filename "%s.xbm"))) |
685 (save-excursion | 685 (save-excursion |
686 (set-buffer (generate-new-buffer " *xbm-garbage*")) | 686 (set-buffer (generate-new-buffer " *xbm-garbage*")) |
687 (erase-buffer) | 687 (erase-buffer) |
1214 ;;(if align (push (intern (downcase align)) w3-display-alignment-stack)) | 1214 ;;(if align (push (intern (downcase align)) w3-display-alignment-stack)) |
1215 (save-excursion | 1215 (save-excursion |
1216 (save-restriction | 1216 (save-restriction |
1217 (narrow-to-region (point) (point)) | 1217 (narrow-to-region (point) (point)) |
1218 (setq fill-column avgwidth | 1218 (setq fill-column avgwidth |
1219 inhibit-read-only t | 1219 ;; inhibit-read-only t |
1220 w3-last-fill-pos (point-min) | 1220 w3-last-fill-pos (point-min) |
1221 i 0) | 1221 i 0) |
1222 ;; skip over columns that have leftover content | 1222 ;; skip over columns that have leftover content |
1223 (while (and (< i num-cols) | 1223 (while (and (< i num-cols) |
1224 (/= 0 (aref table-rowspans i))) | 1224 (/= 0 (aref table-rowspans i))) |
1490 (defun w3-display-node (node &optional nofaces) | 1490 (defun w3-display-node (node &optional nofaces) |
1491 (let ( | 1491 (let ( |
1492 (content-stack (list (list node))) | 1492 (content-stack (list (list node))) |
1493 (right-margin-stack (list fill-column)) | 1493 (right-margin-stack (list fill-column)) |
1494 (left-margin-stack (list 0)) | 1494 (left-margin-stack (list 0)) |
1495 (inhibit-read-only t) | 1495 ;; (inhibit-read-only t) |
1496 node | 1496 node |
1497 insert-before | 1497 insert-before |
1498 insert-after | 1498 insert-after |
1499 tag | 1499 tag |
1500 args | 1500 args |
1610 st | 1610 st |
1611 (append | 1611 (append |
1612 (list 'link :args nil | 1612 (list 'link :args nil |
1613 :value "" :tag "" | 1613 :value "" :tag "" |
1614 :action 'w3-follow-hyperlink | 1614 :action 'w3-follow-hyperlink |
1615 :from | 1615 :from (set-marker (make-marker) st) |
1616 (set-marker (make-marker) st) | |
1617 :help-echo 'w3-widget-echo | 1616 :help-echo 'w3-widget-echo |
1617 :emacspeak-help 'w3-widget-echo | |
1618 ) | 1618 ) |
1619 (alist-to-plist args)))) | 1619 (alist-to-plist args)))) |
1620 (w3-handle-content node) | 1620 (w3-handle-content node) |
1621 ) | 1621 ) |
1622 ) | 1622 ) |
1761 fill-column (min (- (or w3-strict-width (window-width)) | 1761 fill-column (min (- (or w3-strict-width (window-width)) |
1762 w3-right-margin) | 1762 w3-right-margin) |
1763 (or w3-maximum-line-length | 1763 (or w3-maximum-line-length |
1764 (window-width))) | 1764 (window-width))) |
1765 fill-prefix "") | 1765 fill-prefix "") |
1766 (set (make-local-variable 'inhibit-read-only) t)) | 1766 ;; (set (make-local-variable 'inhibit-read-only) t) |
1767 ) | |
1767 (w3-handle-content node) | 1768 (w3-handle-content node) |
1768 ) | 1769 ) |
1769 (*invisible | 1770 (*invisible |
1770 (w3-handle-empty-tag)) | 1771 (w3-handle-empty-tag)) |
1771 (meta | 1772 (meta |