[Mew-dist 03299] cursor mark
Mito
mit at example.com
1998年 1月 6日 (火) 16:11:04 JST
terminal-face のない emacs を emacs -nw で起動すると、
highlight されないため、Summary buffer で cursor を移動する
と、現在表示されているメッセージがどれかわからなくなり、とて
も不便です。
とりあえず Summary の行頭に ">" を入れるようにしてみましたが、
もっといい方法があったら是非実装してください。
# Emacs 20.2 に移行中ですが、terminal-face がないため往生し
# ています。
# どなたか terminal-face 対応していませんか?
## 毎度、-nw ネタで申し訳ありません。(_ _)
--
1/6 16:07頃
NECソフトウェア新潟 水戸
mailto:mit at example.com
-------------- next part --------------
--- mew-highlight.el 1998/01/06 00:53:27 1.1
+++ mew-highlight.el 1998/01/06 06:15:31
@@ -22,10 +22,49 @@
(defalias 'mew-virtual-highlight-setup 'mew-summary-highlight-setup)
+(defun mew-summary-remove-cursor-mark (pos)
+ (if (not pos)
+ ()
+ (let ((buffer-read-only nil))
+ (save-excursion
+ (goto-char pos)
+ (beginning-of-line)
+ (if (not (eq (following-char) ?>))
+ ()
+ (delete-char 1)
+ (if (not replace-to-space)
+ ()
+ (insert-char ?\ 1)
+ (setq replace-to-space nil)))))))
+
+(defun mew-summary-put-cursor-mark ()
+ (if (local-variable-p 'mew-summary-cursor-position)
+ (let (bol (buffer-read-only nil))
+ (save-excursion
+ (beginning-of-line)
+ (setq bol (point))
+ (if (and mew-summary-cursor-position
+ (not (= mew-summary-cursor-position bol)))
+ (mew-summary-remove-cursor-mark mew-summary-cursor-position))
+ (if (eq (following-char) ?>)
+ ()
+ (if (not (= (following-char) ?\ ))
+ ()
+ (delete-char 1)
+ (setq replace-to-space t))
+ (insert-char ?> 1)
+ (setq mew-summary-cursor-position bol)
+ )))
+ (make-local-variable 'mew-summary-cursor-position)
+ (setq mew-summary-cursor-position nil)
+ (make-local-variable 'replace-to-space)
+ (setq replace-to-space nil)))
+
(defun mew-highlight-cursor-line ()
"A function to highlight the cursor line in Summary and Virtual mode."
(if mew-use-highlight-cursor-line
(let ((buffer-read-only nil))
+ (mew-summary-put-cursor-mark)
(if (mew-overlay-p mew-overlay-cursor-line)
(mew-overlay-move mew-overlay-cursor-line
(save-excursion (beginning-of-line) (point))
--- mew-summary.el 1998/01/06 01:47:57 1.1
+++ mew-summary.el 1998/01/06 05:18:21
@@ -197,9 +197,9 @@
(defvar mew-last-shell-command "")
-(defvar mew-summary-message-regex "^ *\\([0-9]+\\)")
+(defvar mew-summary-message-regex "^>? *\\([0-9]+\\)")
-(defvar mew-summary-part-regex "^\t+\\([0-9.]+\\)")
+(defvar mew-summary-part-regex "^>?\t+\\([0-9.]+\\)")
(defvar mew-summary-edit-again-regex
"----- Original message follows -----\\|----- Unsent message follows -----")
--- mew-syntax.el 1998/01/06 05:18:02 1.1
+++ mew-syntax.el 1998/01/06 06:16:40
@@ -567,6 +567,7 @@
(defun mew-decode-syntax-print (msg syntax buf)
(let ((cbuf (current-buffer)))
(set-buffer buf)
+ (mew-summary-remove-cursor-mark mew-summary-cursor-position)
(forward-line)
(set-marker mew-current-marker (point) (current-buffer))
(let* ((buffer-read-only nil)
@@ -682,7 +683,10 @@
(buffer-read-only nil)
(after-change-function nil)
(after-change-functions nil))
- (while (looking-at "^\t")
+ (while (looking-at "^>?\t")
+ (if (= (char-after (match-beginning 0)) ?>)
+ (setq mew-summary-current-position nil
+ replace-to-space nil))
(forward-line))
(delete-region start (point)))
(set-marker mew-current-marker nil)
Mew-dist メーリングリストの案内