comparison lisp/mail/supercite.el @ 49598:0d8b17d428b5

Trailing whitepace deleted.
author Juanma Barranquero <lekktu@gmail.com>
date Tue, 04 Feb 2003 13:24:35 +0000
parents 2e05b93ba14a
children 7b1710f096a3 d7ddb3e565de
comparison
equal deleted inserted replaced
49597:e88404e8f2cf 49598:0d8b17d428b5
248 nil -- do not cite the region at all 248 nil -- do not cite the region at all
249 <integer> -- a number indicating the threshold for citation. When 249 <integer> -- a number indicating the threshold for citation. When
250 the number of lines in the region is greater than this 250 the number of lines in the region is greater than this
251 value, a warning message will be printed and the region 251 value, a warning message will be printed and the region
252 will not be cited. Lines in region are counted with 252 will not be cited. Lines in region are counted with
253 `count-lines'. 253 `count-lines'.
254 254
255 The gathering of attribution information is not affected by the value 255 The gathering of attribution information is not affected by the value
256 of this variable. The number of lines in the region is calculated 256 of this variable. The number of lines in the region is calculated
257 *after* all mail headers are removed. This variable is only consulted 257 *after* all mail headers are removed. This variable is only consulted
258 during the initial citing via `sc-cite-original'." 258 during the initial citing via `sc-cite-original'."
593 (define-key sc-mode-map "w" 'sc-insert-reference) 593 (define-key sc-mode-map "w" 'sc-insert-reference)
594 (define-key sc-mode-map "\C-t" sc-T-keymap) 594 (define-key sc-mode-map "\C-t" sc-T-keymap)
595 (define-key sc-mode-map "\C-b" 'sc-submit-bug-report) 595 (define-key sc-mode-map "\C-b" 'sc-submit-bug-report)
596 (define-key sc-mode-map "?" 'sc-describe) 596 (define-key sc-mode-map "?" 'sc-describe)
597 ) 597 )
598 598
599 (defvar sc-electric-mode-map () 599 (defvar sc-electric-mode-map ()
600 "Keymap for `sc-electric-mode' electric references mode.") 600 "Keymap for `sc-electric-mode' electric references mode.")
601 (if sc-electric-mode-map 601 (if sc-electric-mode-map
602 nil 602 nil
603 (setq sc-electric-mode-map (make-sparse-keymap)) 603 (setq sc-electric-mode-map (make-sparse-keymap))
1150 (defun sc-attribs-chop-address (from) 1150 (defun sc-attribs-chop-address (from)
1151 "Extract attribution information from FROM. 1151 "Extract attribution information from FROM.
1152 This populates the `sc-attributions' with the list of possible attributions." 1152 This populates the `sc-attributions' with the list of possible attributions."
1153 (if (and (stringp from) 1153 (if (and (stringp from)
1154 (< 0 (length from))) 1154 (< 0 (length from)))
1155 (let* ((sc-mumble "") 1155 (let* ((sc-mumble "")
1156 (namestring (sc-attribs-extract-namestring from)) 1156 (namestring (sc-attribs-extract-namestring from))
1157 (namelist (sc-attribs-filter-namelist 1157 (namelist (sc-attribs-filter-namelist
1158 (sc-attribs-chop-namestring namestring))) 1158 (sc-attribs-chop-namestring namestring)))
1159 (revnames (reverse (cdr namelist))) 1159 (revnames (reverse (cdr namelist)))
1160 (firstname (car namelist)) 1160 (firstname (car namelist))
1162 (lastname (car revnames)) 1162 (lastname (car revnames))
1163 (initials (sc-attribs-strip-initials namelist)) 1163 (initials (sc-attribs-strip-initials namelist))
1164 (emailname (sc-attribs-emailname from)) 1164 (emailname (sc-attribs-emailname from))
1165 (n 1) 1165 (n 1)
1166 author middlenames) 1166 author middlenames)
1167 1167
1168 ;; put basic information 1168 ;; put basic information
1169 (setq 1169 (setq
1170 ;; put middle names and build sc-author entry 1170 ;; put middle names and build sc-author entry
1171 middlenames (mapconcat 1171 middlenames (mapconcat
1172 (function 1172 (function
1340 ;; since the citation was chosen, we have to guess at 1340 ;; since the citation was chosen, we have to guess at
1341 ;; the attribution 1341 ;; the attribution
1342 (setq citation choice 1342 (setq citation choice
1343 attribution (or (sc-guess-attribution citation) 1343 attribution (or (sc-guess-attribution citation)
1344 citation)) 1344 citation))
1345 1345
1346 (setq citation (sc-make-citation choice) 1346 (setq citation (sc-make-citation choice)
1347 attribution choice)) 1347 attribution choice))
1348 )) 1348 ))
1349 1349
1350 ;; its possible that the user wants to downcase the citation and 1350 ;; its possible that the user wants to downcase the citation and
1541 (undo-boundary) 1541 (undo-boundary)
1542 (let ((frame (or (sc-scan-info-alist sc-uncite-frame-alist) 1542 (let ((frame (or (sc-scan-info-alist sc-uncite-frame-alist)
1543 sc-default-uncite-frame))) 1543 sc-default-uncite-frame)))
1544 (run-hooks 'sc-pre-uncite-hook) 1544 (run-hooks 'sc-pre-uncite-hook)
1545 (regi-interpret frame start end))) 1545 (regi-interpret frame start end)))
1546 1546
1547 (defun sc-recite-region (start end) 1547 (defun sc-recite-region (start end)
1548 "Recite a region delineated by START and END. 1548 "Recite a region delineated by START and END.
1549 First runs `sc-pre-recite-hook'." 1549 First runs `sc-pre-recite-hook'."
1550 (interactive "r") 1550 (interactive "r")
1551 (let ((sc-confirm-always-p t)) 1551 (let ((sc-confirm-always-p t))
1700 (let ((ref (nth sc-eref-style sc-rewrite-header-list))) 1700 (let ((ref (nth sc-eref-style sc-rewrite-header-list)))
1701 (condition-case err 1701 (condition-case err
1702 (progn 1702 (progn
1703 (eval ref) 1703 (eval ref)
1704 (let ((lines (count-lines (point-min) (point-max)))) 1704 (let ((lines (count-lines (point-min) (point-max))))
1705 (or nomsg (message "Ref header %d [%d line%s]: %s" 1705 (or nomsg (message "Ref header %d [%d line%s]: %s"
1706 sc-eref-style lines 1706 sc-eref-style lines
1707 (if (= lines 1) "" "s") 1707 (if (= lines 1) "" "s")
1708 ref)))) 1708 ref))))
1709 (void-function 1709 (void-function
1710 (progn (message 1710 (progn (message
2018 ;; mark so any deleting before point works properly 2018 ;; mark so any deleting before point works properly
2019 (let* ((zmacs-regions nil) ; for Lemacs 2019 (let* ((zmacs-regions nil) ; for Lemacs
2020 (mark-active t) ; for Emacs 2020 (mark-active t) ; for Emacs
2021 (point (point-marker)) 2021 (point (point-marker))
2022 (mark (copy-marker (mark-marker)))) 2022 (mark (copy-marker (mark-marker))))
2023 2023
2024 ;; make sure point comes before mark, not all functions are 2024 ;; make sure point comes before mark, not all functions are
2025 ;; interactive "r" 2025 ;; interactive "r"
2026 (if (< mark point) 2026 (if (< mark point)
2027 (let ((tmp point)) 2027 (let ((tmp point))
2028 (setq point mark 2028 (setq point mark