comparison lisp/allout.el @ 91302:56a72e2bd635

Merge from emacs--devo--0 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-306
author Miles Bader <miles@gnu.org>
date Sat, 29 Dec 2007 02:39:17 +0000
parents 880960b70474 25c8924964c6
children 606f2d163a64
comparison
equal deleted inserted replaced
91301:7774e5860c70 91302:56a72e2bd635
1499 (message "auto-encrypting pending topics") 1499 (message "auto-encrypting pending topics")
1500 (sit-for 0) 1500 (sit-for 0)
1501 (condition-case failure 1501 (condition-case failure
1502 (setq allout-after-save-decrypt 1502 (setq allout-after-save-decrypt
1503 (allout-encrypt-decrypted except-mark)) 1503 (allout-encrypt-decrypted except-mark))
1504 (error (progn 1504 (message "allout-write-file-hook-handler suppressing error %s"
1505 (message 1505 failure)
1506 "allout-write-file-hook-handler suppressing error %s" 1506 (sit-for 2)
1507 failure) 1507 (error "allout-write-file-hook-handler suppressing error %s"
1508 (sit-for 2)))))) 1508 failure))))
1509 )) 1509 ))
1510 nil) 1510 nil)
1511 ;;;_ > allout-auto-save-hook-handler () 1511 ;;;_ > allout-auto-save-hook-handler ()
1512 (defun allout-auto-save-hook-handler () 1512 (defun allout-auto-save-hook-handler ()
1513 "Implement `allout-encrypt-unencrypted-on-saves' policy for auto save." 1513 "Implement `allout-encrypt-unencrypted-on-saves' policy for auto save."
5455 (cons (1+ (or (car format) 5455 (cons (1+ (or (car format)
5456 -1)) 5456 -1))
5457 (cdr format))))))) 5457 (cdr format)))))))
5458 ;; Put the list with first at front, to last at back: 5458 ;; Put the list with first at front, to last at back:
5459 (nreverse result)))) 5459 (nreverse result))))
5460 ;;;_ > my-region-active-p () 5460 ;;;_ > allout-region-active-p ()
5461 (defmacro my-region-active-p () 5461 (defmacro allout-region-active-p ()
5462 (if (fboundp 'region-active-p) 5462 (if (fboundp 'use-region-p)
5463 '(region-active-p) 5463 '(use-region-p)
5464 'mark-active)) 5464 '(region-active-p)))
5465 ;;;_ > allout-process-exposed (&optional func from to frombuf 5465 ;;;_ > allout-process-exposed (&optional func from to frombuf
5466 ;;; tobuf format) 5466 ;;; tobuf format)
5467 (defun allout-process-exposed (&optional func from to frombuf tobuf 5467 (defun allout-process-exposed (&optional func from to frombuf tobuf
5468 format start-num) 5468 format start-num)
5469 "Map function on exposed parts of current topic; results to another buffer. 5469 "Map function on exposed parts of current topic; results to another buffer.
5492 5492
5493 ; Resolve arguments, 5493 ; Resolve arguments,
5494 ; defaulting if necessary: 5494 ; defaulting if necessary:
5495 (if (not func) (setq func 'allout-insert-listified)) 5495 (if (not func) (setq func 'allout-insert-listified))
5496 (if (not (and from to)) 5496 (if (not (and from to))
5497 (if (my-region-active-p) 5497 (if (allout-region-active-p)
5498 (setq from (region-beginning) to (region-end)) 5498 (setq from (region-beginning) to (region-end))
5499 (setq from (point-min) to (point-max)))) 5499 (setq from (point-min) to (point-max))))
5500 (if frombuf 5500 (if frombuf
5501 (if (not (bufferp frombuf)) 5501 (if (not (bufferp frombuf))
5502 ;; Specified but not a buffer - get it: 5502 ;; Specified but not a buffer - get it: