- 545 名前:535 mailto:sage [2008/08/16(土) 05:10:03 .net]
- (require 'anything)
(require 'anything-migemo nil t) (defun anything-c-w3m-get-anchors () (with-current-buffer anything-current-buffer (save-excursion (goto-char (point-min)) (loop while (w3m-goto-next-anchor) when (next-single-property-change (point) 'w3m-anchor-sequence) collect (cons (buffer-substring (point) (next-single-property-change (point) 'w3m-anchor-sequence)) (point)))))) (defvar anything-c-source-w3m-anchor `((name . "a") (candidates . anything-c-w3m-get-anchors) (match . ,(list (if (fboundp 'anything-string-match-with-migemo) 'anything-string-match-with-migemo (lambda (c) (string-match anything-pattern c))))) (action . (("Goto anchor" . (lambda (p) (goto-char p) (w3m-view-this-url))) ("Goto char" . (lambda (p) (goto-char p))))))) (defun anything-w3m-anchor () (interactive) (let ((anything-sources (list (if (and (fboundp 'anything-string-match-with-migemo)) (cons (cons 'match '(anything-string-match-with-migemo)) (remove-if (lambda (e) (eq 'match (car e))) anything-c-source-w3m-anchor)) anything-c-source-w3m-anchor)))) (anything))) ;; (define-key w3m-mode-map "f" 'anything-w3m-anchor) やっぱ面倒だからこれで
|

|