Mercurial > emacs
comparison lisp/tempo.el @ 91040:14c4a6aac623
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 866-879)
- Merge multi-tty branch
- Update from CVS
- Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-257
author | Miles Bader <miles@gnu.org> |
---|---|
date | Thu, 11 Oct 2007 16:14:00 +0000 |
parents | f55f9811f5d7 edcc591dc3a4 |
children | 606f2d163a64 |
comparison
equal
deleted
inserted
replaced
91039:eefadc1e1d5e | 91040:14c4a6aac623 |
---|---|
313 (set-marker tempo-region-stop (max (mark) (point)))) | 313 (set-marker tempo-region-stop (max (mark) (point)))) |
314 (if on-region | 314 (if on-region |
315 (goto-char tempo-region-start)) | 315 (goto-char tempo-region-start)) |
316 (save-excursion | 316 (save-excursion |
317 (tempo-insert-mark (point-marker)) | 317 (tempo-insert-mark (point-marker)) |
318 (mapcar (function (lambda (elt) | 318 (mapc (function (lambda (elt) |
319 (tempo-insert elt on-region))) | 319 (tempo-insert elt on-region))) |
320 (symbol-value template)) | 320 (symbol-value template)) |
321 (tempo-insert-mark (point-marker))) | 321 (tempo-insert-mark (point-marker))) |
322 (tempo-forward-mark)) | 322 (tempo-forward-mark)) |
323 (tempo-forget-insertions) | 323 (tempo-forget-insertions) |
324 ;; Should I check for zmacs here too??? | 324 ;; Should I check for zmacs here too??? |
325 (and (boundp 'transient-mark-mode) | 325 (and (boundp 'transient-mark-mode) |
458 | 458 |
459 (defun tempo-is-user-element (element) | 459 (defun tempo-is-user-element (element) |
460 "Tries all the user-defined element handlers in `tempo-user-elements'." | 460 "Tries all the user-defined element handlers in `tempo-user-elements'." |
461 ;; Sigh... I need (some list) | 461 ;; Sigh... I need (some list) |
462 (catch 'found | 462 (catch 'found |
463 (mapcar (function (lambda (handler) | 463 (mapc (function (lambda (handler) |
464 (let ((result (funcall handler element))) | 464 (let ((result (funcall handler element))) |
465 (if result (throw 'found result))))) | 465 (if result (throw 'found result))))) |
466 tempo-user-elements) | 466 tempo-user-elements) |
467 (throw 'found nil))) | 467 (throw 'found nil))) |
468 | 468 |
469 ;;; | 469 ;;; |
470 ;;; tempo-forget-insertions | 470 ;;; tempo-forget-insertions |
471 | 471 |
554 | 554 |
555 (defun tempo-forward-mark () | 555 (defun tempo-forward-mark () |
556 "Jump to the next mark in `tempo-forward-mark-list'." | 556 "Jump to the next mark in `tempo-forward-mark-list'." |
557 (interactive) | 557 (interactive) |
558 (let ((next-mark (catch 'found | 558 (let ((next-mark (catch 'found |
559 (mapcar | 559 (mapc |
560 (function | 560 (function |
561 (lambda (mark) | 561 (lambda (mark) |
562 (if (< (point) mark) | 562 (if (< (point) mark) |
563 (throw 'found mark)))) | 563 (throw 'found mark)))) |
564 tempo-marks) | 564 tempo-marks) |
573 (defun tempo-backward-mark () | 573 (defun tempo-backward-mark () |
574 "Jump to the previous mark in `tempo-back-mark-list'." | 574 "Jump to the previous mark in `tempo-back-mark-list'." |
575 (interactive) | 575 (interactive) |
576 (let ((prev-mark (catch 'found | 576 (let ((prev-mark (catch 'found |
577 (let (last) | 577 (let (last) |
578 (mapcar | 578 (mapc |
579 (function | 579 (function |
580 (lambda (mark) | 580 (lambda (mark) |
581 (if (<= (point) mark) | 581 (if (<= (point) mark) |
582 (throw 'found last)) | 582 (throw 'found last)) |
583 (setq last mark))) | 583 (setq last mark))) |