;ELC ;;; Compiled by [email protected] on Sat Jun 12 01:31:27 2010 ;;; from file /home/boggles/.elisp/boxquote.el ;;; in Emacs version 22.2.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 "`boxquote.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\302\303!\204 \303\304M\210\305\306M\210\302\307!\204 \310\307\311\"\210\302\312!\204( \310\312\313\"\210\314\315\316\317\320\321\322\323&\207" [require rect fboundp defgroup (macro . #[(&rest rest) "\300\207" [nil] 1]) defcustom (macro . #[(symbol init docstring &rest rest) "\303 \nF\207" [symbol init docstring defvar] 4]) line-beginning-position defalias #[(&optional n) "\212\301!\210`)\207" [n beginning-of-line] 2 "Return the `point' of the beginning of the current line."] line-end-position #[(&optional n) "\212\210`)\207" [n] 1 "Return the `point' of the end of the current line."] custom-declare-group boxquote nil "Mark regions of text with a half-box." :group editing :prefix "boxquote-"] 8) #@57 *Text that will be used at the top and tail of the box. (custom-declare-variable 'boxquote-top-and-tail '"----" '(#$ . -1314) :type 'string :group 'boxquote) #@43 *Text used for the top corner of the box. (custom-declare-variable 'boxquote-top-corner '"," '(#$ . -1478) :type 'string :group 'boxquote) #@46 *Text used for the bottom corner of the box. (custom-declare-variable 'boxquote-bottom-corner '"`" '(#$ . -1623) :type 'string :group 'boxquote) #@37 *Text used for the side of the box. (custom-declare-variable 'boxquote-side '"| " '(#$ . -1774) :type 'string :group 'boxquote) #@50 *Format string to use when creating a box title. (custom-declare-variable 'boxquote-title-format '"[ %s ]" '(#$ . -1908) :type 'string :group 'boxquote) #@68 *Should a `boxquote-insert-file' title the box with the file name? (custom-declare-variable 'boxquote-title-files 't '(#$ . -2067) :type '(choice (const :tag "Title the box with the file name" t) (const :tag "Don't title the box with the file name" nil)) :group 'boxquote) #@67 *Function to apply to a file's name when using it to title a box. (custom-declare-variable 'boxquote-file-title-function '#'file-name-nondirectory '(#$ . -2346) :type 'function :group 'boxquote) #@72 *Should a `boxquote-insert-buffer' title the box with the buffer name? (custom-declare-variable 'boxquote-title-buffers 't '(#$ . -2547) :type '(choice (const :tag "Title the box with the buffer name" t) (const :tag "Don't title the box with the buffer name" nil)) :group 'boxquote) #@69 *Function to apply to a buffer's name when using it to title a box. (custom-declare-variable 'boxquote-buffer-title-function '#'identity '(#$ . -2836) :type 'function :group 'boxquote) #@230 *Hooks to perform when on a region prior to boxquoting. Note that all forms of boxquoting use `boxquote-region' to create the boxquote. Because of this any hook you place here will be invoked by any of the boxquoting functions. (custom-declare-variable 'boxquote-region-hook 'nil '(#$ . -3028) :type 'hook :group 'boxquote) #@59 *Hooks to perform on the yanked text prior to boxquoting. (custom-declare-variable 'boxquote-yank-hook 'nil '(#$ . -3359) :type 'hook :group 'boxquote) #@74 *Hooks to perform on the text from an inserted file prior to boxquoting. (custom-declare-variable 'boxquote-insert-file-hook 'nil '(#$ . -3517) :type 'hook :group 'boxquote) #@663 *Function for working out the title for a `boxquote-kill-ring-save'. The string returned from this function will be used as the title for a boxquote when the saved text is yanked into a buffer with \[boxquote-yank]. An example of a non-trivial value for this variable might be: (lambda () (if (string= mode-name "Article") (aref gnus-current-headers 4) (buffer-name))) In this case, if you are a `gnus' user, \[boxquote-kill-ring-save] could be used to copy text from an article buffer and, when it is yanked into another buffer using \[boxquote-yank], the title of the boxquote would be the ID of the article you'd copied the text from. (custom-declare-variable 'boxquote-kill-ring-save-title '#'buffer-name '(#$ . -3698) :type 'function :group 'boxquote) #@72 *Format string to use when formatting a function description box title (custom-declare-variable 'boxquote-describe-function-title-format '"C-h f %s RET" '(#$ . -4485) :type 'string :group 'boxquote) #@72 *Format string to use when formatting a variable description box title (custom-declare-variable 'boxquote-describe-variable-title-format '"C-h v %s RET" '(#$ . -4690) :type 'string :group 'boxquote) #@67 *Format string to use when formatting a key description box title (custom-declare-variable 'boxquote-describe-key-title-format '"C-h k %s" '(#$ . -4895) :type 'string :group 'boxquote) #@74 *Format string to use when formatting a `where-is' description box title (custom-declare-variable 'boxquote-where-is-title-format '"C-h w %s RET" '(#$ . -5086) :type 'string :group 'boxquote) #@65 *Format string to use when formatting a `where-is' description. (custom-declare-variable 'boxquote-where-is-body-format '"%s is on %s" '(#$ . -5284) :type 'string :group 'boxquote) #@27 Are we running in XEmacs? (defalias 'boxquote-xemacs-p #[nil "\300\301!\205 \301J\207" [boundp running-xemacs] 2 (#$ . 5471)]) #@210 Find the start and end points of a boxquote. If `point' is inside a boxquote then a cons is returned, the `car' is the start `point' and the `cdr' is the end `point'. NIL is returned if no boxquote is found. (defalias 'boxquote-points #[nil "\212\306 \210\307\310!\310 !Q\307\310!P\307\310 !\310 !Q\311\312!\211\205( \312K\313\216\312\314M\210\315\n!\203? `\312!B\202_ \315\f!\203Q \312\n\316\"\312!B\202_ \315!\205_ \312\n\316\"\317 B+\211@\205o A\205o -\207" [boxquote-top-corner boxquote-top-and-tail re-top boxquote-side re-left boxquote-bottom-corner beginning-of-line "^" regexp-quote fboundp find-box-end ((byte-code "\203 \302 M\210\202 \303\302!\210\302\207" [#1=#:--cl-letf-bound-- #2=#:--cl-letf-save-- find-box-end fmakunbound] 2)) #[(re &optional back) "\212\203 \302 \303\304#\202 \305 \303\304#\205 `)\207" [back re search-backward-regexp nil t search-forward-regexp] 4] looking-at t line-end-position re-bottom #1# #2# points] 5 (#$ . 5606)]) #@31 Is `point' inside a boxquote? (defalias 'boxquote-quoted-p #[nil "\300 ??\207" [boxquote-points] 1 (#$ . 6601)]) #@66 Get the `boxquote-points' and flag an error of no box was found. (defalias 'boxquote-points-with-check #[nil "\300 \206 \301\302!\207" [boxquote-points error "I can't see a box here"] 2 (#$ . 6720)]) #@49 Return a regular expression to match the title. (defalias 'boxquote-title-format-as-regexp #[nil "\302\303!\304\216rq\210\305 !c\210eb\210\306\307\310\311#\203 \312\313\310\311#\210\314 +\207" [#1=#:temp-buffer boxquote-title-format generate-new-buffer " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#1# buffer-name kill-buffer] 2)) regexp-quote search-forward "%s" nil t replace-match ".*" buffer-string] 4 (#$ . 6927)]) #@41 Get the title for the current boxquote. (defalias 'boxquote-get-title #[nil "\306\307!\310\216rq\210\311\nc\210eb\210\312 !\210` GZ\313Zd`Z,D\211@A@\212\214\314 \210ePG\\b\210\315\316 !\203K \317`\f\\\320 Z\"\202L \321-\207" [#1=#:temp-buffer look-for boxquote-title-format #2=#:--cl-var-- prefix-len suffix-len generate-new-buffer " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#1# buffer-name kill-buffer] 2)) "%s" search-forward 1 boxquote-narrow-to-boxquote looking-at boxquote-title-format-as-regexp buffer-substring-no-properties line-end-position "" boxquote-top-corner boxquote-top-and-tail] 5 (#$ . 7368)]) #@169 Set the title of the current boxquote to TITLE. If TITLE is an empty string the title is removed. Note that the title will be formatted using `boxquote-title-format'. (defalias 'boxquote-title #[(title) "\212\214\304 \210e PG\\b\210l\204 \305 \210\306\nG!?\205! \307\n\"c*\207" [boxquote-top-corner boxquote-top-and-tail title boxquote-title-format boxquote-narrow-to-boxquote kill-line zerop format] 3 (#$ . 8013) (list (read-from-minibuffer "Title: " (boxquote-get-title)))]) #@74 Draw a box around the left hand side of a region bounding START and END. (defalias 'boxquote-region #[(start end) "\212\214\306\307!\211\205\f \307K\310\216\307\311M\210\306\312!\211\205 \312K\313\216\312\314M\210\307\f!?\307 !?\f }\210\315\316!\210eb\210\312\"\210\317 db\210\312\"\210\320db\210\321y\210\317 #.\207" [#1=#:--cl-letf-bound-- #2=#:--cl-letf-save-- #3=#:--cl-letf-bound-- #4=#:--cl-letf-save-- start end fboundp bol-at-p ((byte-code "\203 \302 M\210\202 \303\302!\210\302\207" [#1# #2# bol-at-p fmakunbound] 2)) #[(n) "b\210n\207" [n] 1] insert-corner ((byte-code "\203 \302 M\210\202 \303\302!\210\302\207" [#3# #4# insert-corner fmakunbound] 2)) #[(corner pre-break) "\203 \303\202 \304 \n\303Rc\207" [pre-break corner boxquote-top-and-tail "\n" ""] 4] run-hooks boxquote-region-hook line-beginning-position string-rectangle -2 break-end break-start boxquote-top-corner start-point boxquote-bottom-corner boxquote-side] 5 (#$ . 8501) "r"]) #@44 Apply `boxquote-region' to a whole buffer. (defalias 'boxquote-buffer #[nil "\300ed\"\207" [boxquote-region] 3 (#$ . 9498) nil]) #@210 Insert the contents of a file, boxed with `boxquote-region'. If `boxquote-title-files' is non-nil the boxquote will be given a title that is the result of applying `boxquote-file-title-function' to FILENAME. (defalias 'boxquote-insert-file #[(filename) "\304\305!\306\216rq\210\307 \310\"\210\311\312!\210\313 \210\n\203 \314 !!\210\315 +c\207" [#1=#:temp-buffer filename boxquote-title-files boxquote-file-title-function generate-new-buffer " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#1# buffer-name kill-buffer] 2)) insert-file-contents nil run-hooks boxquote-insert-file-hook boxquote-buffer boxquote-title buffer-string] 3 (#$ . 9634) "fInsert file: "]) #@214 Insert the contents of a buffer, boxes with `boxquote-region'. If `boxquote-title-buffers' is non-nil the boxquote will be given a title that is the result of applying `boxquote-buffer-title-function' to BUFFER. (defalias 'boxquote-insert-buffer #[(buffer) "\303rq\210\304ed\")!\210 \205 \305\n!!\207" [buffer boxquote-title-buffers boxquote-buffer-title-function boxquote-text buffer-substring-no-properties boxquote-title] 4 (#$ . 10318) "bInsert Buffer: "]) #@168 Like `kill-ring-save' but remembers a title if possible. The title is acquired by calling `boxquote-kill-ring-save-title'. The title will be used by `boxquote-yank'. (defalias 'boxquote-kill-ring-save #[nil "\302\303!\210\304\305\306 @E\"\240\207" [kill-ring-yank-pointer boxquote-kill-ring-save-title call-interactively kill-ring-save format "%S" boxquote-yank-marker] 6 (#$ . 10790) nil]) #@237 Do a `yank' and box it in with `boxquote-region'. If the yanked entry was placed on the kill ring with `boxquote-kill-ring-save' the resulting boxquote will be titled with whatever `boxquote-kill-ring-save-title' returned at the time. (defalias 'boxquote-yank #[nil "\212\303\304!\305\216rq\210\306 \210eb\210\307\310\311\217\211<\205- @\312=\205- \313 \210\314 8c\210 A@)\315\316!\210\317 \210\n\203>