;ELC
;;; Compiled by LTX@Xue-LingTaos-MacBook-Pro.local on Wed Mar 16 23:09:36 2011
;;; from file /Users/LTX/Projects/Emacs/emacs/lisp/longlines.el
;;; in Emacs version 24.0.50.1
;;; with all optimizations.

;;; This file contains utf-8 non-ASCII characters,
;;; and so cannot be loaded into Emacs 22 or earlier.
(and (boundp 'emacs-version)
     (< (aref emacs-version (1- (length emacs-version))) ?A)
     (string-lessp emacs-version "23")
     (error "`longlines.el' was compiled for Emacs 23 or later"))

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


(custom-declare-group 'longlines nil "Automatic wrapping of long lines when loading files." :group 'fill)
#@231 Non-nil means long lines are automatically wrapped after each command.
Otherwise, you can perform filling using `fill-paragraph' or
`auto-fill-mode'.  In any case, the soft newlines will be removed
when the file is saved to disk.
(custom-declare-variable 'longlines-auto-wrap 't '(#$ . 650) :group 'longlines :type 'boolean)
#@429 Non-nil means wrapping and filling happen at the edge of the window.
Otherwise, `fill-column' is used, regardless of the window size.  This
does not work well when the buffer is displayed in multiple windows
with differing widths.

If the value is an integer, that specifies the distance from the
right edge of the window at which wrapping occurs.  For any other
non-nil value, wrapping occurs 2 characters from the right edge.
(custom-declare-variable 'longlines-wrap-follows-window-size 'nil '(#$ . 982) :group 'longlines :type 'boolean)
#@222 Non-nil means each hard newline is marked on the screen.
(The variable `longlines-show-effect' controls what they look like.)
You can also enable the display temporarily, using the command
`longlines-show-hard-newlines'.
(custom-declare-variable 'longlines-show-hard-newlines 'nil '(#$ . 1529) :group 'longlines :type 'boolean)
#@105 A string to display when showing hard newlines.
This is used when `longlines-show-hard-newlines' is on.
(custom-declare-variable 'longlines-show-effect '(propertize "Â¶\n" 'face 'escape-glyph) '(#$ . 1864) :group 'longlines :type 'string)
(byte-code "\301B\302\301!\204\303\301\304\"\210\305B\302\305!\204\303\305\304\"\210\306B\302\306!\204-\303\306\304\"\210\307B\302\307!\204<\303\307\304\"\210\310B\302\310!\204K\303\310\304\"\210\311\301!\210\311\305!\210\311\306!\210\311\307!\210\311\310!\207" [current-load-list longlines-wrap-beg default-boundp set-default nil longlines-wrap-end longlines-wrap-point longlines-showing longlines-decoded make-variable-buffer-local] 3)
#@97 Non-nil if Longlines mode is enabled.
Use the command `longlines-mode' to change this variable.
(defvar longlines-mode nil (#$ . 2564))
(make-variable-buffer-local 'longlines-mode)
#@493 Toggle Long Lines mode.
In Long Lines mode, long lines are wrapped if they extend beyond
`fill-column'.  The soft newlines used for line wrapping will not
show up when the text is yanked or saved to disk.

If the variable `longlines-auto-wrap' is non-nil, lines are automatically
wrapped whenever the buffer is changed.  You can always call
`fill-paragraph' to fill individual paragraphs.

If the variable `longlines-show-hard-newlines' is non-nil, hard newlines
are indicated with a symbol.
(defalias 'longlines-mode #[(&optional arg) "\306 	\307=\203\n?\202\310	!\311V\211\203'\312\313\314\"\210\315\303!\210\316\317\320\321\"\210\322\323\324\316\325$\210\322\326\327\316\325$\210\315\330!\210\315\331!\210\315\304!\210\332\315\305!\210\333\315\334!\210\335\317\330\336\"\210@\203\213@\250\203u@\311Y\203u@\337 W\203u@\202v\340A\315\341!\210\337 AZ!)\322\342\343\316\325$\210\325\211\316\344 \316\211BCD1EF\214~\210G\204\254\345 \210\325G\346ed\"\210)\347D!\210.(\203\306H\204\306\350 \210I\351=\203\352\322\352\345\316\325$\210+\204\340\322\353\354\316\325$\210\322\353\355\316\325$\210\202
I\356=\203
\322\357\345\316\325$\210\315\360!\2100<\2040C0\317\360\355\325#\210\322\361\362\316\325$\210\322\363\364\316\325$\210\203\226\365\311!\210\202\226\366\321\"H\2036\367 \210\325\316\325\316\211BCE1FG\203V\214~\210\370ed\"\210\316G)-\371\323\324\325#\210\371\361\362\325#\210\371\363\364\325#\210\371\326\327\325#\210\371\342\343\325#\210@\203~\372\341!\210\372\304!\210\372\305!\210\372\334!\210\372\303!\210\372\330!\210\372\312!\210\373\374\n\203\240\375\202\241\376\"\210\377\201J!\203\314\306 \203\267\306 \232\203\314\201K\201L\n\203\307\201M\202\312\201N\"\210)\201O \210\n\207" [#1=#:last-message arg longlines-mode require-final-newline isearch-search-fun-function replace-search-function current-message toggle prefix-numeric-value 0 use-hard-newlines 1 never make-local-variable nil add-to-list buffer-file-format longlines add-hook change-major-mode-hook longlines-mode-off t before-revert-hook longlines-before-revert-hook buffer-substring-filters longlines-auto-wrap longlines-search-function longlines-search-forward replace-re-search-function longlines-re-search-forward longlines-encode-string window-width 2 fill-column window-configuration-change-hook longlines-window-change-function buffer-modified-p longlines-decode-buffer longlines-wrap-region set-buffer-modified-p longlines-show-hard-newlines mail-mode mail-setup-hook mail-citation-hook mail-indent-citation longlines-decode-region message-mode message-setup-hook message-indent-citation-function after-change-functions longlines-after-change-function post-command-hook longlines-post-command-function auto-fill-mode delete longlines-unshow-hard-newlines longlines-encode-region remove-hook kill-local-variable run-hooks longlines-mode-hook longlines-mode-on-hook longlines-mode-off-hook called-interactively-p longlines-wrap-follows-window-size dw buffer-file-truename buffer-file-name mod inhibit-read-only buffer-undo-list longlines-decoded longlines-showing major-mode any message "Longlines mode %sabled" "en" "dis" force-mode-line-update] 7 (#$ . 2752) (list (or current-prefix-arg 'toggle))])
(byte-code "\301\302\303\304\300!\205\n\305\211%\207" [longlines-mode-map add-minor-mode longlines-mode " ll" boundp nil] 6)
#@117 Turn off longlines mode.
This function exists to be called by `change-major-mode-hook' when the
major mode changes.
(defalias 'longlines-mode-off #[nil "\300\301!\207" [longlines-mode 0] 2 (#$ . 6152)])
#@114 Make hard newlines visible by adding a face.
With optional argument ARG, make the hard newlines invisible again.
(defalias 'longlines-show-hard-newlines #[(&optional arg) "\203\302 \207\303\304ed\"\207" [arg longlines-showing longlines-unshow-hard-newlines t longlines-show-region] 3 (#$ . 6362) "P"])
#@49 Make hard newlines between BEG and END visible.
(defalias 'longlines-show-region #[(beg end) "	^	]\306\n\307\310$\311 \312\211\312\310\211\f\203<\313\f\211T\314\315!$\210\306\fT\307\310$\211\204%\316
!.	\207" [beg end pmin pmax pos mod text-property-not-all hard nil buffer-modified-p t put-text-property display copy-sequence restore-buffer-modified-p buffer-undo-list inhibit-read-only inhibit-modification-hooks buffer-file-name buffer-file-truename longlines-show-effect] 7 (#$ . 6674)])
#@37 Make hard newlines invisible again.
(defalias 'longlines-unshow-hard-newlines #[nil "\306\307ed\310\306$\311 \312\211\211\306\211\211\2032\313\211T\314#\210\307Td\310\306$\211\204\315!.\207" [longlines-showing buffer-file-truename buffer-file-name inhibit-modification-hooks inhibit-read-only buffer-undo-list nil text-property-not-all hard buffer-modified-p t remove-text-properties (display) restore-buffer-modified-p mod pos] 8 (#$ . 7195) nil])
#@150 Wrap each successive line, starting with the line before BEG.
Stop when we reach lines after END that don't need wrapping, or the
end of the buffer.
(defalias 'longlines-wrap-region #[(beg end) "\304 `\nb\210\305y\210\306 \203m\204`Y\203\306 \203	b\210\307!)\207" [mod longlines-wrap-point beg end buffer-modified-p -1 longlines-wrap-line set-buffer-modified-p] 2 (#$ . 7673)])
#@203 If the current line needs to be wrapped, wrap it and return nil.
If wrapping is performed, point remains on the line.  If the line does
not need to be wrapped, move point to the next line and return t.
(defalias 'longlines-wrap-line #[nil "\301 \203\302\303!\210\304u\210\305\304!\210\306u\210\307\207\310 \203H\307\210n\306u\210\204(l\2038\305\304!\210`V\203FS\202F\311\312!\210\304u\210\305\304!\210\306u\210\307\207\306y\210\313\207" [longlines-wrap-point longlines-set-breakpoint insert-before-markers 10 -1 delete-char 1 nil longlines-merge-lines-p insert-before-markers-and-inherit 32 t] 2 (#$ . 8070)])
#@140 Place point where we should break the current line, and return t.
If the line should not be broken, return nil; point remains on the
line.
(defalias 'longlines-set-breakpoint #[nil "\301!\210\302\303\304 \305#\205iV\205\306 \206\301!\210\307 \207" [fill-column move-to-column re-search-forward "[^ ]" line-end-position 1 longlines-find-break-backward longlines-find-break-forward] 4 (#$ . 8698)])
#@108 Move point backward to the first available breakpoint and return t.
If no breakpoint is found, return nil.
(defalias 'longlines-find-break-backward #[nil "\301\302\303 \304#\205+\212\302\303 x\210n)?\205+\304u\210\203*\305\300!\203*\302\303 x\210\306 \207\307\207" [fill-nobreak-predicate search-backward " " line-beginning-position 1 run-hook-with-args-until-success longlines-find-break-backward t] 4 (#$ . 9111)])
#@108 Move point forward to the first available breakpoint and return t.
If no break point is found, return nil.
(defalias 'longlines-find-break-forward #[nil "\301\302\303 \304#\205!\302\303 w\210l?\205!\203 \305\300!\203 \306 \207\307\207" [fill-nobreak-predicate search-forward " " line-end-position 1 run-hook-with-args-until-success longlines-find-break-forward t] 4 (#$ . 9540)])
#@133 Return t if part of the next line can fit onto the current line.
Otherwise, return nil.  Text cannot be moved across hard newlines.
(defalias 'longlines-merge-lines-p #[nil "\212\302\210m?\2055\303`\304\"?\2055iZ\305y\210\302f\306=\203#\307\2024\310\311\312 \305#\2030i\2022iT	X))\207" [fill-column space nil get-text-property hard 1 32 t search-forward " " line-end-position] 4 (#$ . 9932)])
#@112 Turn all newlines between BEG and END into hard newlines.
If BEG and END are nil, the point and mark are used.
(defalias 'longlines-decode-region #[(&optional beg end) "\204`	\204\303\304!\212	]	^b\210\305\306\n\304#\205*\307\310\224\310\225\"\210\202*\207" [beg end reg-max mark t search-forward "\n" set-hard-newline-properties 0] 4 (#$ . 10341)])
#@53 Turn all newlines in the buffer into hard newlines.
(defalias 'longlines-decode-buffer #[nil "\300ed\"\207" [longlines-decode-region] 3 (#$ . 10710)])
#@194 Replace each soft newline between BEG and END with exactly one space.
Hard newlines are left intact.  The optional argument BUFFER exists for
compatibility with `format-alist', and is ignored.
(defalias 'longlines-encode-region #[(beg end &optional buffer) "\212	]\304 	^b\210\305\306\307#\203$\310\311\224\312\"\204
\313\314!\210\202
\315\n!\210	+\207" [beg end mod reg-max buffer-modified-p search-forward "\n" t get-text-property 0 hard replace-match " " set-buffer-modified-p] 4 (#$ . 10868)])
#@100 Return a copy of STRING with each soft newline replaced by a space.
Hard newlines are left intact.
(defalias 'longlines-encode-string #[(string) "\303!\304\305	\"\211\203%\306\n\307	#\204	\n\310I\210\304\305	\nT#\211\204
	*\207" [string str pos copy-sequence string-match "\n" get-text-property hard 32] 5 (#$ . 11381)])
#@180 Toggle automatic line wrapping.
With optional argument ARG, turn on line wrapping if and only if ARG is positive.
If automatic line wrapping is turned on, wrap the entire buffer.
(defalias 'longlines-auto-wrap #[(&optional arg) "\203\f\302!\303V\202	?\211\203\304\305ed\"\210\306\307!\207\310\306\311!\207" [arg longlines-auto-wrap prefix-numeric-value 0 t longlines-wrap-region message "Auto wrap enabled." nil "Auto wrap disabled."] 4 (#$ . 11717) "P"])
#@144 Update `longlines-wrap-beg' and `longlines-wrap-end'.
This is called by `after-change-functions' to keep track of the region
that has changed.
(defalias 'longlines-after-change-function #[(beg end len) "\205\"	?\205\"\n\203\n^\202\f\203\f
]\202 
\211\207" [longlines-auto-wrap undo-in-progress longlines-wrap-beg beg longlines-wrap-end end] 2 (#$ . 12190)])
#@127 Perform line wrapping on the parts of the buffer that have changed.
This is called by `post-command-hook' after each command.
(defalias 'longlines-post-command-function #[nil "\205:	\205:\n\305=\204\n\306=\203\307`\310\311!\"\210\203$\312	\f\"\210\n\313=\2045\n\314=\2045\315	\f\"\210\316\211\211\207" [longlines-auto-wrap longlines-wrap-beg this-command longlines-showing longlines-wrap-end yank yank-pop longlines-decode-region mark t longlines-show-region fill-paragraph fill-region longlines-wrap-region nil] 5 (#$ . 12569)])
#@107 Re-wrap the buffer if the window width has changed.
This is called by `window-configuration-change-hook'.
(defalias 'longlines-window-change-function #[nil "\250\203\303Y\203\304 W\203\202\305\n\304 	ZU?\205+\304 	Z\306ed\")\207" [longlines-wrap-follows-window-size dw fill-column 0 window-width 2 longlines-wrap-region] 3 (#$ . 13119)])
(defalias 'longlines-search-function #[nil "\203\f	\203\n\303\207\304\207\n\203	\203\305\207\306\207	\203\307\207\310\207" [isearch-word isearch-forward isearch-regexp word-search-forward word-search-backward re-search-forward re-search-backward longlines-search-forward longlines-search-backward] 1])
(defalias 'longlines-search-forward #[(string &optional bound noerror count) "\305\306\307	!\n\f$)\207" [search-spaces-regexp string bound noerror count " *[ \n]" re-search-forward regexp-quote] 5])
(defalias 'longlines-search-backward #[(string &optional bound noerror count) "\305\306\307	!\n\f$)\207" [search-spaces-regexp string bound noerror count " *[ \n]" re-search-backward regexp-quote] 5])
(defalias 'longlines-re-search-forward #[(string &optional bound noerror count) "\305\306	\n\f$)\207" [search-spaces-regexp string bound noerror count " *[ \n]" re-search-forward] 5])
(defalias 'longlines-before-revert-hook #[nil "\300\301\302\303\304$\210\305\306!\207" [add-hook after-revert-hook longlines-after-revert-hook nil t longlines-mode 0] 5])
(defalias 'longlines-after-revert-hook #[nil "\300\301\302\303#\210\304\305!\207" [remove-hook after-revert-hook longlines-after-revert-hook t longlines-mode 1] 4])
(byte-code "\300\301\302\303\304\211\305\306\304\257\"\207" [add-to-list format-alist longlines "Automatically wrap long lines." nil longlines-encode-region t] 9)
#@31 Unload the longlines library.
(defalias 'longlines-unload-function #[nil "r\302 \303\211\203	@\211q\210\304 \210	A\211\204\n+\303\207" [buffer #1=#:--cl-dolist-temp-- buffer-list nil longlines-mode-off] 3 (#$ . 14879)])
(provide 'longlines)
