;ELC   
;;; Compiled by root@porky.devel.redhat.com on Wed Apr  7 03:36:26 2004
;;; from file /usr/src/build/385100-i386/BUILD/emacs-w3m-1.3.6/w3m-hist.el
;;; in Emacs version 21.3.1
;;; with bytecomp version 2.85.4.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`w3m-hist.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(condition-case nil :symbol-for-testing-whether-colon-keyword-is-available-or-not (void-variable (let (w3m-colon-keywords) (load "w3m-kwds.el" nil t t) (while w3m-colon-keywords (set (car w3m-colon-keywords) (car w3m-colon-keywords)) (setq w3m-colon-keywords (cdr w3m-colon-keywords))))))
#@3850 A buffer-local variable which contains a tree-structured complex list
of all the links you have visited.  For instance, it looks like the
following:

[Branch-1.0.0.0]:                 +--> U1.0.0.0.0 --> U1.0.0.0.1
                                  |
    [Branch-1.0]:         +--> U1.0.0 --> U1.0.1 --> U1.0.2
                          |
         [Trunk]: U0 --> U1 --> U2 --> U3 --> U4 --> U5 --> U6
                                 |
    [Branch-2.0]:                +--> U2.0.0 --> U2.0.1
                                 |
    [Branch-2.1]:                +--> U2.1.0 --> U2.1.1 --> U2.1.2
                                                    |
[Branch-2.1.1.0]:                                   +--> U2.1.1.0.0

In this case, the history element U1.0.0.0.0 represents the first link
of the first branch which is sprouted from the history element U1.0.0.

The trunk or each branch is a simple list which will have some history
elements.  History elements in the trunk or each branch should be
arranged in order of increasing precedence (the newest history element
should be the last element of the list).  Each history element
represents a link which consists of the following records:

	(URL PROPERTIES BRANCH BRANCH ...)

Where URL should be a string of an address of a link.  PROPERTIES is a
plist which contains any kind of data to propertize the URL as follows:

	(KEYWORD VALUE KEYWORD VALUE ...)

The rest BRANCHes are branches of the history element.  Branches
should also be arranged in order of increasing precedence (the newest
one should be located in the rightmost).  Each BRANCH will also be a
tree-structured complex list.  Thus the history structure will grow up
infinitely.  Do you have enough memories for it? :-p

The history management system keeps URL string and PROPERTIES of each
history element to be shared by all the w3m buffers.  Note that if
there is need to use buffer-local properties, use the variable
`w3m-history-flat' instead.

There are special rules on the w3m history management system.  As you
might expect, the operation BACK on U2.0.0 goes to U2, one more BACK
goes to U1.  Well, where should we go next when the operation FORWARD
is performed on U1?  The rule is, to select the newest link you have
visited.  So, that operation should go to U1.0.0.

One more rule.  If you visit to the link U4 from U1.0.1 directly, jump
is occurred instead of to sprout the new branch from U1.0.1.

In addition, the variable `w3m-history' has a list of pointers in its
`car' cell which looks like the following:

	(PREV CURRENT NEXT)

Where the list PREV points the previous history element, the list
CURRENT points the current one, the list NEXT points the next one.
Each list contains an odd number of integers, e.g., (0) points U0,
(2 0 1) points U2.0.1, etc.  Finally the value of `w3m-history' will
be as such as follows:

(((1) (2) (2 1 0))
 ("http://www.U0.org/" (:title "U0" :foo "bar"))
 ("http://www.U1.org/" (:title "U1" :foo "bar")
  (("http://www.U100.org/" (:title "U100" :foo "bar")
    (("http://www.U10000.org/" (:title "U10000" :foo "bar"))
     ("http://www.U10001.org/" (:title "U10001" :foo "bar"))))
   ("http://www.U101.org/" (:title "U101" :foo "bar"))
   ("http://www.U102.org/" (:title "U102" :foo "bar"))))
 ("http://www.U2.org/" (:title "U2" :foo "bar")
  (("http://www.U200.org/" (:title "U200" :foo "bar"))
   ("http://www.U201.org/" (:title "U201" :foo "bar")))
  (("http://www.U210.org/" (:title "U210" :foo "bar"))
   ("http://www.U211.org/" (:title "U211" :foo "bar")
    (("http://www.U21100.org/" (:title "U21100" :foo "bar"))))
   ("http://www.U212.org/" (:title "U212" :foo "bar"))))
 ("http://www.U3.org/" (:title "U3" :foo "bar"))
 ("http://www.U4.org/" (:title "U4" :foo "bar"))
 ("http://www.U5.org/" (:title "U5" :foo "bar"))
 ("http://www.U6.org/" (:title "U6" :foo "bar")))
(defvar w3m-history nil (#$ . 930))
#@775 A buffer-local variable to keep a flattened alist of `w3m-history'.
Each element will have the following records:

	(URL PROPERTIES POSITION [LOCAL-PROPERTIES])

Where URL is a string of an address of a link, PROPERTIES is a plist
to propertize the URL.  The sequence PROPERTIES is exactly the same
with the corresponding contents of `w3m-history'.  POSITION is a list
of integers to designate the current position in the history.  The
sequence LOCAL-PROPERTIES is similar to PROPERTIES, but it is buffer-
local.  You can use the functions `w3m-history-plist-get',
`w3m-history-plist-put', `w3m-history-add-properties' and
`w3m-history-remove-properties' to manipulate the buffer-local
properties.  See the documentation for the variable `w3m-history' for
more information.
(defvar w3m-history-flat nil (#$ . 4822))
(byte-code "\300\301!\210\300\302!\207" [make-variable-buffer-local w3m-history w3m-history-flat] 2)
#@92 Seek properties corresponding to URL in all the w3m buffers except for
the current-buffer.
(defalias 'w3m-history-seek-properties #[(url) "p\306\307 \"\310\n\204, 	\203, 	\211A@q\210\311=\203\n \312\f!\211A@)\211\203 q\210\n+\207" [current buffers properties major-mode url x delq buffer-list nil w3m-mode w3m-history-assoc] 4 (#$ . 5745)])
#@95 Function used to keep properties of each history element to be shared
by all the w3m buffers.
(defalias 'w3m-history-share-properties #[(url properties) "\306 p\307\n\203k \n\211A@q\210\310=\203 \311\f!\211\203 A\240\210\211\nAA)@\211\211A@\fA8\203a \211A@\211\nAA)8\211A@8\202; *A\240\210\202 	q+\207" [flat current buffers major-mode url properties buffer-list nil w3m-mode w3m-history-assoc x position w3m-history element] 4 (#$ . 6102)])
#@62 Return non-nil if the previous history element is available.
(defalias 'w3m-history-previous-link-available-p #[nil "\211@@)\207" [w3m-history x] 2 (#$ . 6592)])
#@58 Return non-nil if the next history element is available.
(defalias 'w3m-history-next-link-available-p #[nil "\211@A)A@\207" [w3m-history x] 2 (#$ . 6762)])
#@205 Return a history element of the current position.  The value looks
like the following:

     (URL PROPERTIES BRANCH BRANCH ...)

See the documentation for the variable `w3m-history' for more
information.
(defalias 'w3m-history-current #[nil "\2053 \211@A)@\211\211A@A8\n\2031 \n\211A@\211AA)8\n\211A@8\202 *\207" [w3m-history x position element] 3 (#$ . 6927)])
#@351 Move forward COUNT times in the history structure and return a history
element of the position.  If COUNT is omitted, it defaults to number
one.  If COUNT is negative, moving backward is performed.  If there is
no room in the history, move as far as possible.  The position
pointers of `w3m-history' will have new values when SET-CURRENT is
non-nil.
(defalias 'w3m-history-forward #[(&optional count set-current) "\205\254	?\205# @\306\n@!\306\n\211A@)!\306\n\211AA)@!E)\204. \307\211\2044 \310V\203\371 \211@A)A@\211\f\211\203\351 \311\211\211\211A\f\211A\f@\2118\f\203\212 \f\211A\f@\211AA)8\f\211A\f@\2118\202b \211AA)\211\203\270 GS\306\211@A)A@!\211\fGS\f\233\310D\241\210\202\333 GT\211V\203\333 \306\211@A)A@!\211\fGS\f\233\240\210,\211\211@A)\fC\244\240\210)\203nS\211\310V\2044 \202n\310W\203n\211@@)\211\211\203aGS\2118\312!\203?\312!\203,\311\202O\306!\313Z\233\311\241\210\202O\306!\233S\240\210*\211@A)\311\241\210@B\240\210)\203nT\211\310W\204\377 \211@A)@\211\211A@A8\n\203\240\n\211A@\211AA)8\n\211A@8\202\200*\f\203\253\f\240\210)\207" [w3m-history set-current position x oposition count copy-sequence 1 0 nil zerop 2 next branches element number branch previous class] 6 (#$ . 7312)])
#@351 Move backward COUNT times in the history structure and return a history
element of the position.  If COUNT is omitted, it defaults to number
one.  If COUNT is negative, moving forward is performed.  If there is
no room in the history, move as far as possible.  The position
pointers of `w3m-history' will have new values when SET-CURRENT is
non-nil.
(defalias 'w3m-history-backward #[(&optional count set-current) "\205\254	?\205# @\306\n@!\306\n\211A@)!\306\n\211AA)@!E)\204. \307\211\2044 \310V\203\246 \211@@)\211\f\211\203\226 \fGS\211\f8\311!\203t \311!\203a \312\f\202\204 \306\f!\f\313Z\f\233\312\241\210\202\204 \306\f!\f\f\233S\240\210*\211@A)\312\241\210\f@B\240\210)\203nS\211\310V\2044 \202n\310W\203n\211@A)A@\211\211\203a\312\211\211\211A\211A@\2118\203\211A@\211AA)8\211A@\2118\202\332 \211AA)\211\2030GS\306\211@A)A@!\211GS\233\310D\241\210\202SGT\211V\203S\306\211@A)A@!\211GS\233\240\210,\211\211@A)C\244\240\210)\203nT\211\310W\204\254 \211@A)@\211\211A@A8\n\203\240\n\211A@\211AA)8\n\211A@8\202\200*\f\203\253\f\240\210)\207" [w3m-history set-current position x oposition count copy-sequence 1 0 zerop nil 2 previous class number next branches element branch] 6 (#$ . 8680)])
#@176 Set the buffer-local variable `w3m-history-flat' with the value of a
flattened alist of `w3m-history'.  See the documentation for the
variable `w3m-history-flat' for details.
(defalias 'w3m-history-flat #[nil "\306	\205\311 	A\307C\306\211\211\211\f\211A@\211\203\303 @;\203\264 @\211A@)\310\f!EB\211AA)\211\203] \311\"\311\307\211D\f\"\fG\fB\202 \f\211@T\240\210\312\203 \n\203 \313\n\211@S\240!\203 \nA\313\f\211@S\240!\203\233 \fA\f\211AA)\211\f\211@T\240\210\202f \f\307\240\210\fA\f\211A@)T\240\210\306\211\202g \311\"G\nB\202 .\237\211\207" [w3m-history-flat w3m-history children flag branches element nil 0 reverse append t zerop position history x] 7 (#$ . 10044)])
#@272 Make a tree-structured history in the variable `w3m-history' from the
value of `w3m-history-flat'.  The optional NEWPOS should be a list
of pointers which will be the `car' of the new value of `w3m-history'
if it is specified.  It defaults to the beginning of a history.
(defalias 'w3m-history-tree #[(&optional newpos) "\203j\306\211\211\211\306\211DC\211A@\211\203\223 \f\211AA)@\203\200 \211A@\nG	V\204M \nGS\n\233\307	\nGZ\310Z\306\211D\"\241\210	\n8\203* \211A@\nG\311Z	V\204w \nGS\n\233\307	\nGZ\312Z\306\211DC\"\241\210	\311\\\n8\202* \n\f@\240\210\nA\f\211A@)\240\210\202 \203\242 B\202f\306\211\313CEB\211\211@A)A@\211\203e\306\211\211\211A\211A@\2118\203 \211A@\f\211AA)8\211A@\2118\202\331 \f\211AA)\211\2030GS\314\211@A)A@!\211GS\233\313D\241\210\202UGT\211V\203U\314\211@A)A@!\211GS\233\240\210,\211\211@A)C\244\240\210)-\207\306\211\207" [w3m-history-flat position rest positions element flat nil make-list -1 2 -3 0 copy-sequence w3m-history x newpos next branches number branch] 6 (#$ . 10789)])
#@445 Return a history element if URL is `equal' to the `car' of an element
of `w3m-history-flat'.  Elements of the return value is actually the
contents of the history structure.  If SET-CURRENT is non-nil, the
history element corresponding to URL will be set as the current
history element.  If REPLACE-PROPS is non-nil, existing properties
will be completely replaced with PROPERTIES, otherwise PROPERTIES will
be merged into existing properties.
(defalias 'w3m-history-assoc #[(url &optional set-current properties replace-props) "\306	\"\307\211\211\203\305\211A@)?\205 \203y \203G \310@\211A@)#\211AA)\211\204* \203s \211A@)\203f \211A@)@BB\211AA)\211\204L \237\202\250 \203\245 \211A@)\203\230 \211A@)@BB\211AA)\211\204~ \237*\203\303 \203\303 @\240\210A\241\210\202\330 \204\314 \203\330 A\240\210\311\"\210)\203\305\3128\211@A)\n\240\210\nGS\211\n8\307\307\313!\203\313!\203\307\202,\314\n!\312Z\n\233\307\241\210\202,\314\n!\n\233S\240\210@\n\240\210\211@A)@A\n\211A@\2118\n\203m\n\211A@\211AA)8\n\211A@\2118\202L\211AA)\211\203\230GS\314\211@A)@!\211GS\n\233\315D\241\210\202\271GT\211V\203\271\314\211@A)@!\211GS\n\233\240\210\211@A)A\n\240\210,*\207" [url w3m-history-flat position element x shared-plist assoc nil plist-put w3m-history-share-properties 2 zerop copy-sequence 0 properties replace-props rest set-current w3m-history class number branch branches] 6 (#$ . 11945)])
#@593 Push URL and PROPERTIES onto both `w3m-history' and `w3m-history-flat'
as a new current history element.  URL should be a string of an
address of a link.  PROPERTIES is a plist to propertize the URL.  If
the history element for URL has already been registered in the history
structure, URL will be set as the current history element.  If REPLACE-
PROPS is non-nil, existing properties will be completely replaced with
PROPERTIES, otherwise PROPERTIES will be merged into existing
properties.  See the documentation for the variables `w3m-history' and
`w3m-history-flat' for more information.
(defalias 'w3m-history-push #[(url &optional properties replace-props) "\306\211\n\204\272 \307!?\205 \f\203m \203; \310@\211A@)#\211AA)\211\204  \203h \211A@)\203Z \211A@)@BB\211AA)\211\204@ \237\202\231 \203\226 \211A@)\203\212 \211A@)@BB\211AA)\211\204q \237*\f\203\244 \311\"\210)D\312\312	D\313	\314\"C\202\367\315\316$\203\311 \n@\202\367\307!?\205\325 \f\203.\203\374 \310@\211A@)#\211AA)\211\204\341 \203)\211A@)\203\211A@)@BB\211AA)\211\204\237\202Z\203W\211A@)\203K\211A@)@BB\211AA)\211\2042\237*\f\203e\311\"\210)\317\n\211@A)@!\211GS\320@\nA\233V\203\247T\2118	\211@A)A8T\2118	\233\202	A\203\314	@GS\233S\320D\241\210	@\233DCC\241\210\202\337\233\233@T\240\210	DC\241\210EC\244\n\211\211@A)@\306E\240+*\207" [position element w3m-history url shared-plist properties nil w3m-history-seek-properties plist-put w3m-history-share-properties (nil (0) nil) append ((0)) w3m-history-assoc t copy-sequence 0 replace-props rest x w3m-history-flat class number] 6 (#$ . 13531)])
#@213 Copy the buffer-local variables `w3m-history' and `w3m-history-flat'
from BUFFER to the current buffer.  This function keeps properties of
each history element to be shared between BUFFER and the current
buffer.
(defalias 'w3m-history-copy #[(buffer) "p\306\211q\210\f\203- \307\f\211@@)!\307\f\211@A)@!\307\f\211@A)A@!E	\nq\210	\205d \306\211\n\203[ \307@!A\211AA)\306\241\210\nB\n\202: \n\237	*\310	!+\207" [flat position current buffer w3m-history x nil copy-sequence w3m-history-tree w3m-history-flat rest element] 5 (#$ . 15330)])
#@460 Extract a value from the properties of a history element.  KEYWORD is
usually a symbol.  This function returns the value corresponding to
the KEYWORD, or nil if KEYWORD is not one of the keyword on the
properties.  If URL is omitted, it is performed on the current history
element.  If SET-CURRENT is non-nil, the history element corresponding
to URL will be set as the current history element.  LOCAL specifies
whether to access the buffer-local properties.
(defalias 'w3m-history-plist-get #[(keyword &optional url set-current local) "\204 \306 @\307\205/ \310\n\"\211\205/ \311\203' 	\211AA)A@\202- 	\211A@)\")\207" [url element set-current local x keyword w3m-history-current nil w3m-history-assoc plist-get] 4 (#$ . 15901)])
#@404 Change value in the properties of a history element of KEYWORD to
VALUE, and return the new properties.  KEYWORD is usually a symbol and
VALUE is any object.  If URL is omitted, it is performed on the
current history element.  If SET-CURRENT is non-nil, the history
element corresponding to URL will be set as the current history
element.  LOCAL specifies whether to access the buffer-local
properties.
(defalias 'w3m-history-plist-put #[(keyword value &optional url set-current local) "\306	\n\211\203 \307	\n\"\211\202! \310 \211\205! \307@\n\"\211*\203\247\203\331 \311\211AA)A@#\306\203\224 \203b \311@\211A@)#\211AA)\211\204E \203\216 \211A@)\203\201 \211A@)@BB\211AA)\211\204g \237\202\303 \203\300 \211A@)\203\263 \211A@)@BB\211AA)\211\204\231 \237*\211AA)\205\324 C\241)\202\253\211A@)\311#\306\203F\203\311@\211A@)#\211AA)\211\204\367 \203@\211A@)\2033\211A@)@BB\211AA)\211\204\237\202u\203r\211A@)\203e\211A@)@BB\211AA)\211\204K\237*\203\225\203\225@\240\210A\241\210\202\243\312	\206\235\310 @\"\210*\202\253\313\314\315\")\207" [element url set-current local x keyword nil w3m-history-assoc w3m-history-current plist-put w3m-history-share-properties error "%s" "No history element found to be modified" value rest properties shared-plist] 5 (#$ . 16649)])
#@383 Add each keyword-value pair of PROPERTIES to the properties of a
history element.  Returns t if any property was changed, nil
otherwise.  If URL is omitted, it is performed on the current history
element.  If SET-CURRENT is non-nil, the history element corresponding
to URL will be set as the current history element.  LOCAL specifies
whether to access the buffer-local properties.
(defalias 'w3m-history-add-properties #[(properties &optional url set-current local) "\306	\n\211\203 \307	\n\"\211\202! \310 \211\205! \307@\n\"\211*\203\2034 \211AA)A@\202: \211A@)\211\306\306\306\306\203\202 @\211A@)\211AA)\311\"\232\204J \312#\313\202J \203\266 @\211A@)\211AA)\203\260 BB\202\202 \313\202\202 \205\374 \237\203\327 \211AA)\205\322 C\241\210\202\373 \203\357 \203\357 @\240\210A\241\210\202\373 \314	\206\367 \310 @\"\210\313.\202\315\316\317\")\207" [element url set-current local x former nil w3m-history-assoc w3m-history-current plist-get plist-put t w3m-history-share-properties error "%s" "No history element found to add properties" plist keyword value changed rest properties] 5 (#$ . 18121)])
#@459 Remove each keyword of the keyword-value pair of PROPERTIES from the
properties of a history element.  The values in PROPERTIES are ignored
(treated as nil).  Returns t if any property was changed, nil
otherwise.  If URL is omitted, it is performed on the current history
element.  If SET-CURRENT is non-nil, the history element corresponding
to URL will be set as the current history element.  LOCAL specifies
whether to access the buffer-local properties.
(defalias 'w3m-history-remove-properties #[(properties &optional url set-current local) "\306	\n\211\203 \307	\n\"\211\202! \310 \211\205! \307@\n\"\211*\203\356 \2034 \211AA)A@\202: \211A@)\211\211\205\352 \306\211\211\211\211\203k @B\211AA)\211\204V \203\247 @\211A@)\211AA)>\204\224 \204\232 \311\202k BB\202k \205\351 \203\304 \211AA)\205\277 \237C\241\210\202\350 \203\335 \237@\240\210A\241\210\202\350 \312	\206\345 \310 @\306\"\210\311-*\202\362 \313\314\315\")\207" [element url set-current local x former nil w3m-history-assoc w3m-history-current t w3m-history-share-properties error "%s" "No history element found to remove properties" plist rest changed value keyword keywords properties] 6 (#$ . 19345)])
#@325 Rename the name of the url in a history element with NEW-URL.  If OLD-
URL is omitted, renaming is performed on the current history element.
If SET-CURRENT is non-nil, the history element corresponding to URL
will be set as the current history element.  If THIS-BUFFER is nil,
renaming will be done for all the w3m buffers.
(defalias 'w3m-history-rename-url #[(new-url &optional old-url set-current this-buffer) "\306	\n\211\203 \307\n\"\211\202! \310 \211\205! \307@\n\"\211*\203f \f\240\210\211AA)@\211\211A@A8\203^ \211A@\211AA)8\211A@8\202= *\f\240\210\202k \311\312\313\"\210)?\205\341 p\314\315 \"\306\203\335 \211A@q\210\316=\203 \307	!\211\203 \f\240\210\211AA)@\211\211A@A8\203\325 \211A@\211AA)8\211A@8\202\264 *\f\240\210\202 q+\207" [element old-url set-current url new-url x nil w3m-history-assoc w3m-history-current error "%s" "No history element found to be renamed" delq buffer-list w3m-mode position w3m-history this-buffer current buffers major-mode] 4 (#$ . 20620)])
#@96 Store the current cursor position in the history structure.  URL
defaults to the current link.
(defalias 'w3m-history-store-position #[(&optional url) "\211@A)@\205 \303\304\305 \306`F\n\307\310$\210t\205 \311\312!\207" [w3m-history x url w3m-history-add-properties :window-start window-start :position nil t message "The current cursor position has registered"] 6 (#$ . 21696) nil])
#@84 Restore the saved cursor position for the page.  URL defaults to the
current link.
(defalias 'w3m-history-restore-position #[(&optional url) "\211@A)@\2054 \305\306\n\307\310$\307\211\203, \305\311\n\307\310$\211\203, \312\307\f\"\210b\2023 t\2053 \313\314!*\207" [w3m-history x url position start w3m-history-plist-get :window-start nil t :position set-window-start message "No cursor position registered"] 6 (#$ . 22090) nil])
#@188 Add the arrived database to the history structure unreasonably.
If arg CLEAR-HISTORY is given, the current history will be cleared
in advance.  It's only a joke, you should NEVER use it.
(defalias 'w3m-history-add-arrived-db #[(&optional clear-history) "\306=\204 \307\310	\"\210\n\205Z \311\312!\313\314!\210\205Z \203! \315\315\315\211\316\317\n\"\210\320\321\322G!8\"\210\203U \321\322G!8@!\210\320\321\211A@\"\210\2028 *\323\324\325\"\207" [major-mode this-command w3m-arrived-db clear-history w3m-history w3m-history-flat w3m-mode error "`%s' must be invoked from a w3m buffer" yes-or-no-p "Are you sure you really want to destroy the history? " message "" nil mapatoms #[(symbol) "\205  \301N\211\203 \303!\304	DD\nB\211\207\303!C\nB\211\207" [symbol title url-title symbol-name :title] 3] apply w3m-history-push random w3m-goto-url "about://history/" t title url-title] 4 (#$ . 22532) "P"])
(provide 'w3m-hist)
