;ELC ;;; compiled by jwz@thalidomide on Sat May 14 17:08:58 1994 ;;; from file /th/jwz/emacs19/lisp/w3/w3-lemacs.el ;;; emacs version 19.10 Lucid (beta23). ;;; bytecomp version 2.24; 26-Apr-94. ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "This file was compiled for Emacs 19.")) (defvar w3-links-menu nil "\ Menu for w3-mode in lemacs") (byte-code "!!!\"!M" [boundp w3-image-type-restriction nil w3-image-size-restriction w3-allowed-image-types mapcar #[(x) "@C" [x] 1] w3-graphic-converter-alist make-variable-buffer-local w3-links-menu w3-ins-or-del-graphic #[(typ) " \n\"\n\" C\nB" [assoc typ w3-allowed-image-types mapcar #[(x) " @? " [typ x] 2]] 3]] 3) (fset 'w3-setup-options-menu #[nil "!#\" ϯ Bԯ)" [boundp w3-options-menu nil put variable-documentation "The options menu for w3" mapcar #[(data) "@ D E&)" [data typ vector w3-ins-or-del-graphic :style radio :selected assoc w3-allowed-image-types] 9] w3-graphic-converter-alist formats "Options" "Image Loading" ["Delay all images" (setq w3-delay-image-loads t w3-graphics-always-show-entities nil) :style radio :selected (and w3-delay-image-loads (not w3-graphics-always-show-entities))] ["Show only graphic entities" (setq w3-delay-image-loads t w3-graphics-always-show-entities t) :style radio :selected (and w3-delay-image-loads w3-graphics-always-show-entities)] ["Show all images" (setq w3-delay-image-loads nil w3-graphics-always-show-entities t) :style radio :selected (not w3-delay-image-loads)] ["Show inlined MPEGs" (setq w3-delay-mpeg-loads (not w3-delay-mpeg-loads)) :style toggle :selected (not w3-delay-mpeg-loads)] "Restrict Image Loads By Type" ["Flush Image Cache" (setq w3-graphics-list nil) w3-graphics-list] ["Hypertext Gopher Mode" (setq w3-use-hypertext-gopher (not w3-use-hypertext-gopher)) :style toggle :selected w3-use-hypertext-gopher] ["Hypertext Dired Mode" w3-toggle-hypertext-dired :style toggle :selected w3-use-hypertext-dired] ["Clear History" (setq w3-history-list nil) w3-history-list]] 7 "\ Setup the complicated 19.10 options menu"]) (byte-code "!\nY !#" [boundp emacs-major-version emacs-minor-version 10 w3-setup-options-menu w3-options-menu ("Options" ["Delay Image Load" (setq w3-delay-image-loads (not w3-delay-image-loads)) t] ["Flush Image Cache" (setq w3-graphics-list nil) w3-graphics-list] ("Hypertext Gopher Mode" ["Turn On" (setq w3-use-hypertext-gopher t) (not w3-use-hypertext-gopher)] ["Turn Off" (setq w3-use-hypertext-gopher nil) w3-use-hypertext-gopher]) ("Hypertext Dired Mode" ["Turn On" (setq w3-directory-format 'hypertext) (eq 'dired w3-directory-format)] ["Turn Off" (setq w3-directory-format 'dired) (eq 'hypertext w3-directory-format)]) ["Clear History" (setq w3-history-list nil) w3-history-list]) put variable-documentation "The options menu for w3"] 4) (defvar w3-use-hypertext-dired (eq w3-directory-format 'hypertext) "\ Whether to display directory listings in hypertext or not.") (fset 'w3-toggle-hypertext-dired #[nil "?‰" [w3-use-hypertext-dired hypertext dired w3-directory-format] 3 "\ Toggle how to display directory listings" nil]) (defvar w3-lucid-max-menu-item-size 40 "\ *Maximum size of a menu item in the link or hotlist menus.") (fset 'w3-create-faces #[nil " !\n! ! ! !!!! !\n!\n\"!\"!\" ! \" ! \"!\" ! \" !? \"" [make-face w3-default-style w3-header-style w3-bold-style w3-italic-style w3-underline-style w3-node-style w3-address-style w3-tt-style w3-visited-node-style face-differs-from-default-p copy-face bold-italic bold italic default set-face-underline-p t] 3 "\ Create faces, the lucid way"]) (byte-code "MMMMM" [w3-delete-zone delete-extent w3-zone-end extent-end-position w3-zone-start extent-start-position w3-zone-eq eq w3-insert insert] 2) (fset 'w3-zone-hidden-p #[(start end) " T! T!\"" [extent-at start extent-property invisible] 3 "\ Return t iff the region from start to end is invisible."]) (fset 'w3-unhide-zone #[(start end) "\n #" [map-extents #[(ext) "\n!U \n!U\n\"\n!ȇ" [start extent-start-position ext end extent-end-position extent-property invisible delete-extent t] 3] start end] 4 "\ Make a region from START TO END visible. (lemacs)"]) (fset 'w3-hide-zone #[(start end) "\n \"#" [set-extent-property make-extent start end invisible t] 4 "\ Make a region from START to END invisible. (lemacs)"]) (defun w3-fix-extent-endpoints nil "\ Make sure no extents contain trailing whitespace/newlines" nil) (byte-code "MMM" [w3-all-zones #[nil "p! \nB !u\n*" [next-extent nil all cur] 3] w3-truncate-menu-item #[(string) "G X OP" [string w3-lucid-max-menu-item-size 0 "$"] 3] w3-add-hotlist-menu #[nil "=  @@! @A@D# B Ai\nA\nA\"#я \"#*" [major-mode w3-mode nil w3-hotlist hot hot-menu vector w3-truncate-menu-item w3-fetch t w3-links-menu add-menu ("Navigate") "Links" w3-breakup-menu w3-max-menu-length (byte-code "!" [delete-menu-item ("Navigate" "Links")] 2) ((error)) ("Navigate") "Hotlist" (byte-code "!" [delete-menu-item ("Navigate" "Hotlist")] 2)] 7]] 2) (fset 'w3-find-specific-link #[(link) "!\nAb \"\n@\" !v\n@\")" [map-extents #[(ext maparg) "\n\"\n\n!B" [link extent-property ext w3-ident extent-start-position] 4] dat message "Found link %s" link force-highlight-extent t input-pending-p sit-for 1 nil] 4 "\ Find LINK in the current document"]) (fset 'w3-zone-data #[(zone) " \" \" \" \" \" \" \n    B  BB  B  B\n\nB." [extent-property zone w3 w3graphic w3form w3expandlist w3mpeg w3delayed dely mpeg list form grph link nil] 9 "\ Return the data associated with zone"]) (fset 'w3-zone-at #[(pt) " p# p# p# p# p# p# \n        \n\n  ." [extent-at pt w3 w3form w3graphic w3expandlist w3mpeg w3delayed dely mpeg list grph form link nil] 10 "\ Return the extent at point PT that is either a link or a forms area."]) (fset 'w3-mouse-handler #[(e) " !\n! >A@A@ >A@ >A@@\n >A@ >A@!!8!A@ӚԪA@!#\n\n@!\"@!\"  @!\"!." [event-point e pt extent-properties-at props w3 link w3form form w3delayed dely w3mpeg mpeg w3graphic imag message w3-quotify-percents "Form entry (name=%s, type=%s)" 2 "" "text" "Delayed image (%s)" "Inlined image (%s)" "Delayed mpeg (%s)"] 7 "\ Function to message the url under the mouse cursor"]) (fset 'w3-next-extent #[(xt) "p !T`d$ )" [nil x map-extents #[(extent maparg) " \" \" " [extent-property extent w3 w3form x] 3] xt extent-end-position] 5 "\ Return the next extent after XT that is a link or a forms area."]) (fset 'w3-forward-link #[(p) "US!`#`#!!b!)" [p 1 w3-forward-link w3-next-extent extent-at nil w3 w3form x extent-start-position error "No more links."] 6 "\ Move forward to the next link in the document. Error if no more links." "P"]) (fset 'w3-previous-extent #[(xt) "pe !`$ )" [nil x map-extents #[(extent maparg) " \" \" Ň" [extent-property extent w3 w3form x nil] 3] xt extent-start-position] 6]) (fset 'w3-back-link #[(p) "US!`!! !b!)" [p 1 w3-back-link w3-previous-extent extent-at x extent-start-position error "No previous link."] 4 "\ Go back link" "P"]) (fset 'w3-add-zone #[(start end style data &optional highlight) " \n\" # # @A# # #@= #A@ A@#)" [make-extent start end ext set-extent-property face style highlight data start-open t end-open w3 priority 2 w3-ident] 4 "\ Add highlighting (lucid)"]) (fset 'w3-follow-mouse #[(e) " ! " [mouse-set-point e w3-follow-link] 2 nil "e"]) (fset 'w3-follow-inlined-image-mouse #[(e) " ! " [mouse-set-point e w3-follow-inlined-image] 2 "\ Follow an inlined image from the mouse" "e"]) (fset 'w3-follow-inlined-image #[nil "`p#\n\"@!!)" [extent-at w3graphic grph w3-maybe-relative extent-property message "No inlined image at point."] 5 "\ Follow an inlined image, regardless of whether it is a hyperlink or not." nil]) (byte-code "!! # # # # #" [boundp hyperb:version emacs-major-version define-key w3-mode-map button2 w3-follow-mouse (control button2) w3-follow-inlined-image-mouse (control button2) button3 w3-popup-menu] 4) (fset 'w3-toplevel-menu-exists-p #[(name) " \n\"" [assoc name current-menubar] 3 "\ Search for a top level menu called NAME. Return non-nil iff it exists"]) (fset 'w3-build-lemacs-menu #[nil " !!\nB\n @@ @A@D# B Ak B !!A#A#A# A A\"#\nA\nA\"#!A#A#!A#*" [w3-hotlist hot nil hot-menu current-menubar set-menubar default-menubar map-extents w3-build-links-helper "Links" w3-links-menu vector w3-maybe-relative t "Hotlist" set-buffer-menubar copy-sequence add-menu ("Help") "WWW" w3-help-menu w3-main-menu "Navigate" w3-navigate-menu ("Navigate") w3-breakup-menu w3-max-menu-length ("Navigate") w3-toplevel-menu-exists-p "Options" ("Options") w3-options-menu "Annotate" w3-annotation-menu] 7 "\ Build lemacs menus from w3-links-list"]) (fset 'w3-build-links-helper #[(extent maparg) " \" A@ 8!! A@D#C)ˇ" [extent-property extent w3 x w3-links-menu vector w3-truncate-menu-item w3-strip-leading-spaces 2 w3-maybe-relative t nil] 7 "\ Build a list of links using map-extents for lucid"]) (fset 'w3-popup-menu #[(e) " ! !" [mouse-set-point e popup-menu w3-popup-menu] 2 "\ Pop up a menu of common w3 commands" "e"]) (fset 'w3-x-popup-dialog #[(pos descr) " @\nB A\n @ @C#C An\n!ʍ+" [0 nil dialog event echo-keystrokes descr vector t popup-dialog-box dialog-done (byte-code " ! ! !; !\"f ! != !=\"L !G !>" [next-command-event event menu-event-p event-object throw dialog-done abort menu-no-selection-hook signal quit nil button-release-event-p beep message "Please make a choice from the dialog"] 4)] 6 "\ My hacked up function to do a blocking popup menu..."]) (fset 'w3-x-popup-menu #[(pos menudesc) " ! ! ! \"A@AA$" [button-press-event-p last-command-event button-release-event-p menu-event-p w3-x-really-popup-menu pos menudesc completing-read "Please choose: " nil t] 5 "\ If last command was a mouse command use a popup-menu, otherwise do a completing read"]) (fset 'w3-x-really-popup-menu #[(pos menudesc) " A@A @@ @@C#\nB Am\nB\n!ˍ+" [0 nil menu event echo-keystrokes menudesc vector t "WWW" popup-menu popup-done (byte-code " ! ! !; !\"g ! != !=\"M !H !?" [next-command-event event menu-event-p event-object throw popup-done abort menu-no-selection-hook signal quit nil button-release-event-p beep message "please make a choice from the menu."] 4)] 5 "\ My hacked up function to do a blocking popup menu..."]) (defun w3-setup-version-specifics nil "\ Set up routine for Lucid emacs 19.9 and newer") (fset 'w3-store-in-x-clipboard #[(str) " \"!" [x-own-selection str PRIMARY x-selection-owner-p] 3 "\ Store string STR into the clipboard in X"]) (fset 'w3-view-graphic #[(src) " \n\"BC! A\"! !v ! \"*" [assoc src w3-graphics-list nil y x x-create-screen "iconic" "true" x-set-screen-icon-pixmap message "Press a key to remove the picture" input-pending-p sit-for 1 delete-screen error "Could not find %s in image cache."] 4 "\ View the graphic specified by SRC" (byte-code "\n$C" [completing-read "View Graphic: " w3-graphics-list nil t] 5)]) (fset 'w3-load-delayed-images #[nil "! @! @!| @! Ak\n\"*\n" [nil rest buffer-read-only map-extents #[(ext maparg) " \" Bć" [extent-property ext w3delayed rest nil] 3] extent-start-position extent-end-position delete-extent mapcar #[(data) "\n\"" [apply w3-insert-graphic data] 3] w3-delayed-images] 4 "\ Load inlined images that were delayed, if necessary." nil]) (fset 'w3-load-delayed-mpegs #[nil "! @! @!| @! Ak\n\"\n*" [nil rest buffer-read-only map-extents #[(ext maparg) " \" Bć" [extent-property ext w3delayed rest nil] 3] extent-start-position extent-end-position delete-extent mapcar #[(data) " @ A\"" [w3-insert-mpeg data] 3] w3-delayed-movies] 4 "\ Load all delayed mpeg movies for this buffer" nil]) (fset 'w3-insert-mpeg #[(src pt) " \" \" !! E\"\n \"\n % B#+" [make-extent pt ext make-x-window-glyph w3-mpeg-size win append w3-mpeg-args "-window" int-to-string x-window-glyph-xid src set-extent-begin-glyph set-extent-property w3-mpeg apply start-process nil w3-mpeg-program] 9 "\ Insert an mpeg file SRC at point PT"]) (fset 'w3-mpeg-kill-processes #[(&optional buffer) "!" [map-extents #[(ext maparg) " \"?? @! !)" [extent-property ext w3-mpeg data delete-process delete-extent nil] 4]] 2 "\ Kill all mpeg_play processes associated with this buffer" nil]) (fset 'w3-load-single-delayed-mpeg #[(st nd src pt) "\n | \n\")" [nil buffer-read-only st nd w3-insert-mpeg src] 3 "\ Load a single delayed mpeg"]) (fset 'w3-load-single-delayed-graphic #[(st nd src pt align alt) "\n | $)" [nil buffer-read-only st nd w3-insert-graphic src pt align alt] 5 "\ Load a single delayed image."]) (fset 'w3-insert-graphic #[(name pt align alt &optional force) " A  \n    @ \" ! ! \"! \"A!8\" \"8#\"##%% B#'\"¯\"%\")!*8V8*V \"8#\"##%% B#'\"¯\"%\") ! !?#3\" !8뚫!qdb !!)+ BB#f@U#S#A!B C_Y#bDc#T#)#%%%\"%E\")\"##%% B\"%F\"). " [nil "GET" t name w3-generate-unique-filename fname lnk err w3-source w3-request-extra-headers w3-request-data w3-be-asynchronous w3-request-method buffer-read-only add-to-list bit string-match w3-nonrelative-link w3-parse-relative-link " *W3GRAPH*" w3-file-attributes attribs w3-working-buffer assoc w3-graphics-list message "Reusing image..." force 8 w3-allowed-image-types w3-lazy-message "Skipping image %s [%s]" w3-basepath make-annotation alt pt text anno set-annotation-data align set-annotation-action w3-annotation-action-2 w3-image-size-restriction 0 7 "Skipping image %s [%s bytes]" w3-retrieve w3-convert-graphic-to-useable-format featurep xpm "Reading image %s..." w3-current-file file-attributes get-buffer-create "Conversion errors" "\n------------------------\n" "Log of: " "\n" insert-buffer "Got a 0 length pixmap!" (byte-code " !" [make-pixmap fname bit] 2) ((error (byte-code "!qdb ű!!)" [get-buffer-create "Conversion errors" "\n------------------------\n" "Log of: " name "\n" insert-buffer w3-working-buffer message "Reading of pixmap failed!"] 4))) (delete-file fname) ((error)) 9 pixmap-width screen-pixel-width 0.5 "\n\n" w3-annotation-action-3 w3-annotation-action-1] 11 "\ Insert the graphic pointed to by the URL NAME, at buffer position POINT, with alignment specified by ALIGN (one of 'center 'top or 'bottom). If the conversion of the picture fails for any reason, use ALT as the alternative text. If the reading of the pixmap is successful, the url and a pointer to the pixmap are stored in w3-graphics-list for possible re-use later."]) (fset 'w3-annotation-action-1 #[(data) " @!" [w3-fetch data] 2 "\ Annotation function that passes a failed image off to an external viewer"]) (fset 'w3-annotation-action-2 #[(data) " !q ! \"" [extent-buffer extent delete-annotation apply w3-insert-graphic data] 3 "\ Annotation function that tries to load 1 delayed image."]) (fset 'w3-annotation-action-3 #[(data event) " 8 ! ! @=; !;!+" [2 data event-x-pixel event event-y-pixel y x url ismap w3-fetch "?" "," nil] 6 "\ Annotation function that tries send off an imagemap click"]) (fset 'w3-mode-version-specifics #[nil " \"" [w3-build-lemacs-menu w3-track-mouse w3-mouse-handler mode-motion-hook add-hook activate-menubar-hook w3-add-hotlist-menu w3-popup-menu mode-popup-menu] 3 "\ Lucid emacs specific stuff for w3-mode"]) (fset 'w3-lookup-image #[(pixmap) "`!\" \"@" [rassq extent-property extent-at begin-glyph w3-graphics-list] 4 "\ Return the URL that pixmap was grabbed from"]) (fset 'w3-write-zones #[(st nd &optional buf) "p!qdb $!ʱc)" [buf get-buffer-create " *w3-cache*" map-extents #[(ext maparg) " ! ! !#c\n\n@= \" \"@ !#c\n@\nA@#c\nAAVc)" [extent-properties ext props format "(let ((x (make-extent %d %d)))\n" extent-start-position extent-end-position begin-glyph "(setq w3-delayed-images (cons (list \"%s\" (set-marker (make-marker) %d) 'center \"\") w3-delayed-images))" rassq extent-property w3-graphics-list "(set-extent-property x '%S '%S)\n" ")\n"] 7] st nd "(rename-buffer \"" buffer-name "\")\n" "(display-buffer (current-buffer))\n" ")"] 5 "\ Write the zones in buffer BUF from ST to ND into lisp expressions that can be 'eval'd."]) (fset 'w3-map-links #[(function &optional buffer from to maparg) "\n %" [map-extents #[(x y) " \" ! \"Ƈ" [extent-property x w3 function w3-zone-data y nil] 3] buffer from to maparg] 6 "\ Map FUNCTION over the hypertext links which overlap region in BUFFER, starting at FROM and ending at TO. FUNCTION is called with the arguments linkdata, MAPARG. The arguments FROM, TO, MAPARG, and BUFFER default to the beginning of BUFFER, the end of BUFFER, nil, and (current-buffer), respectively."]) (provide 'w3-lemacs)