; Insert Text ------------------------------------------------------- ; by not ; ‘I‘ð•¶Žš—ñ‚Ì‘OŒã‚É•¶Žš‚ð‘}“ü (defun insert-text(headstr footstr move) ; ‘I‘ðó‘Ô‚©”Û‚© (if (get-selection-type) (progn (setq start (selection-mark)) (setq end (selection-point)) (if (> start end) (progn (setq start end) (setq end (selection-mark))))) (progn (setq start (point)) (setq end start))) ; ƒeƒLƒXƒg‚ð‘}“ü (goto-char end) (insert footstr) (goto-char start) (insert headstr) ; ƒJ[ƒ\ƒ‹‚̈ړ® (if (>= move 0) (setq move (+ move (- end start)))) (forward-char move)) ; ”CˆÓ‚Ì•¶Žš—ñ‚Ì‘}“ü (defun insert-input-string(headstr footstr) (interactive "s擪‚É‘}“ü‚·‚é•¶Žš—ñ :\nsÅŒã‚É‘}“ü‚·‚é•¶Žš—ñ :") (insert-text headstr footstr 0)) ; s“ª‹L†‚Ì“ü—Í (defun insert-head-char(n) (defvar *insert-head-char-string* "E›œ ¡žŸ¢£¤¥™š") (defvar *insert-head-char-space* "") ; s“ª‹L†‚̉E‚É‘}“ü‚·‚é‹ó”’•¶Žš—ñ (save-excursion (goto-bol) (skip-chars-forward " \t") (setq pos (point)) (setq head-char-index (string-match (buffer-substring pos (+ pos 1)) *insert-head-char-string*)) (if head-char-index (delete-char 1) (setq head-char-index -1)) (if (looking-at "[ \t@]*") (delete-region (match-beginning 0) (match-end 0))) (setq head-char-index (+ head-char-index n)) (if (>= head-char-index (length *insert-head-char-string*)) (setq head-char-index -1) (if (< head-char-index -1) (setq head-char-index (- (length *insert-head-char-string*) 1)))) (unless (= head-char-index -1) (insert (schar *insert-head-char-string* head-char-index)) (insert *insert-head-char-space*)))) (defun insert-head-char-next() (interactive) (insert-head-char 1)) (defun insert-head-char-back() (interactive) (insert-head-char -1)) (global-set-key #\M-Right 'insert-head-char-next) (global-set-key #\M-Left 'insert-head-char-back)