|
From: | Lennart Borgman (gmail) |
Subject: | Re: Shift selection using interactive spec |
Date: | Mon, 17 Mar 2008 00:17:09 +0100 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 |
Lennart Borgman (gmail) wrote:
I translate it to something like this in elisp code: ;;;; pre-pre ;; treat-as-shifted: (setq maybe-preserved-tm tm) (if shifted (setq preserved-tm (if tm tm (make-marker))) (setq preserved-tm nil)) ;;;; run unshifted command + hooks ;; Neither maybe-preserved-tm or preserved-tm ;; are touched here (maybe not even known) ;;;; post-post ;; (if buffer-was-changed (setq preserved-tm nil) (unless preserved-tm (when user-wants-it (setq preserved-tm maybe-preserved-tm)))) (setq tm preserved-tm)
Sorry for bad translation. This is probably better. (Remember translation always includes some mind reading too)
;;;; pre-pre ;; treat-as-shifted: (setq maybe-preserved-tm tm) (if shifted (setq preserved-tm (if tm tm (make-marker))) (setq preserved-tm nil)) ;;;; run unshifted command + hooks ;; ;; maybe-preserved-tm is not touched here, but ;; preserved-tm might be set to nil, for example ;; by some copy command. ;;;; post-post (when buffer-was-changed (setq preserved-tm nil)) (unless preserved-tm (when user-wants-tm (setq preserved-tm maybe-preserved-tm))) (setq tm preserved-tm)
[Prev in Thread] | Current Thread | [Next in Thread] |