Simon Watson 3 年之前
父節點
當前提交
d53955b9e6
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      emacs/elisp/hn.el

+ 7 - 0
emacs/elisp/hn.el

@@ -12,3 +12,10 @@
 ;;;; The main supported functionality is to display in a buffer a list of
 ;;;; HN top stories (in a buffer), and to then open articles in the web browser,
 ;;;; or display comments in a buffer
+
+(if (executable-find "hn")
+    (progn
+      (with-temp-buffer-window "hn"
+	  'temp-buffer-show-function
+	  'inhibit-quit
+	(concat "\n" (shell-command-to-string "hn top 20")))))