diff options
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/.emacs.d/lisp/my/my-algo.el | 1 | ||||
-rw-r--r-- | emacs/.emacs.d/lisp/my/my-hnreader.el | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/emacs/.emacs.d/lisp/my/my-algo.el b/emacs/.emacs.d/lisp/my/my-algo.el index f3e8bc8..bd58476 100644 --- a/emacs/.emacs.d/lisp/my/my-algo.el +++ b/emacs/.emacs.d/lisp/my/my-algo.el @@ -69,4 +69,3 @@ (provide 'my-algo) ;;; my-algo.el ends here - diff --git a/emacs/.emacs.d/lisp/my/my-hnreader.el b/emacs/.emacs.d/lisp/my/my-hnreader.el index 6106d29..325ab9d 100644 --- a/emacs/.emacs.d/lisp/my/my-hnreader.el +++ b/emacs/.emacs.d/lisp/my/my-hnreader.el @@ -68,6 +68,12 @@ (goto-char (point-min)) (forward-line 2)))) +;; To override `'hnreader--get-title' +(defun my-hnreader--get-title (dom) + "Get title and link from DOM comment page." + (let ((a-link (dom-by-tag (dom-by-class dom "^titleline$") 'a))) + (cons (dom-text a-link) (dom-attr a-link 'href)))) + ;; To override `hnreader--print-comments' (defun my-hnreader--print-comments (dom url) "Print DOM comment and URL to buffer." |