大場君が Namazu で検索出来るようにしてくれた。感謝。(といっても検索するほどの内容はない)
generate_regex_str = lambda {|pattern, with_paren| if (pattern == ' ') "[ \t ]*" elsif migemo = Migemo.new(static_dict, pattern) <あとは全角アルファベットの ignore case だ。> def segment (pattern) # pattern.scan(/[A-Z]?[^A-Z]+|[A-Z]+/) pattern.scan(/[^a-zA-Z]+|[A-Z]?[a-z]+|[A-Z]+/) end
(add-hook 'mew-summary-mode-hook (lambda () (define-key mew-summary-mode-map "}" 'mew-summary-review-copy) (define-key mew-summary-mode-map "{" 'mew-summary-review-copy-kill) (define-key mew-summary-mode-map "]" 'mew-summary-review-copy-next) (define-key mew-summary-mode-map "[" 'mew-summary-review-copy-prev))) (add-hook 'mew-message-mode-hook (lambda () (define-key mew-message-mode-map "}" 'mew-message-review-copy) (define-key mew-message-mode-map "{" 'mew-message-review-copy-kill) (define-key mew-message-mode-map "]" 'mew-message-review-copy-next) (define-key mew-message-mode-map "[" 'mew-message-review-copy-prev))) (defvar mew-message-dummy-buffer "*MEW MESSAGE REVIEW*") (defun mew-summary-review-copy-kill () (interactive) (mew-summary-review-copy 'kill)) (defun mew-summary-review-copy (&optional kill) (interactive "P") (let ((owin (selected-window)) (mbuf (mew-buffer-message))) (if kill (mew-message-review-copy 'kill) (when (and (get-buffer mbuf) (get-buffer-window mbuf)) (select-window (get-buffer-window mbuf)) (mew-message-review-copy) (select-window owin))))) (defun mew-summary-review-copy-prev () (interactive) (mew-summary-review-copy-next 'reverse)) (defun mew-summary-review-copy-next (&optional reverse) (interactive "P") (let ((owin (selected-window)) (mbuf (mew-buffer-message))) (when (and (get-buffer mbuf) (get-buffer-window mbuf)) (select-window (get-buffer-window mbuf)) (mew-message-review-copy-next reverse) (select-window owin)))) (defun mew-message-review-copy-kill () (interactive) (mew-message-review-copy 'kill)) (defun mew-message-review-copy (&optional kill) (interactive "P") (if kill (let ((nbuf (get-buffer mew-message-dummy-buffer))) (when nbuf (delete-windows-on nbuf) (kill-buffer nbuf))) (let ((nbuf (get-buffer-create mew-message-dummy-buffer)) (msg (buffer-substring (point-min) (point-max))) (owin (selected-window)) (start (window-start)) (end (window-end)) (w3mp (and (boundp 'mew-use-w3m-minor-mode) (fboundp 'w3m-minor-mode) (get-text-property (point-min) 'w3m) mew-use-w3m-minor-mode)) new) (if (get-buffer-window nbuf) (select-window (get-buffer-window nbuf)) (setq new t) (split-window-vertically) (next-window) (pop-to-buffer nbuf)) (setq rwin (selected-window)) (setq buffer-read-only t) (mew-elet (mew-erase-buffer) (insert msg) (let ((mew-message-mode-map (copy-keymap mew-message-mode-map))) (define-key mew-message-mode-map "q" 'mew-message-review-copy-kill) (mew-message-mode)) (when w3mp (w3m-minor-mode 1)) (set-buffer-modified-p nil) (when (> (window-height) (/ (frame-height) 3)) (shrink-window (- (window-height) (/ (frame-height) 3)))) (set-window-start (selected-window) (progn (goto-char end) (forward-line (- (+ (window-height) (if new 1 -2)))) (point))) (mew-buffers-setup mew-message-dummy-buffer)) (select-window owin)))) (defun mew-message-review-copy-prev () (interactive) (mew-message-review-copy-next 'reverse)) (defun mew-message-review-copy-next (&optional reverse) (interactive "P") (let ((owin (selected-window)) (nbuf (get-buffer-create mew-message-dummy-buffer))) (when (get-buffer-window nbuf) (select-window (get-buffer-window nbuf)) (if reverse (if (eq (window-start) (point-min)) (message "Beginning of buffer") (scroll-up (- 3 (window-height)))) (if (>= (window-end) (point-max)) ;; '>' for XEmacs (message "End of buffer") (scroll-up (- (window-height) 3)))) (select-window owin))))