浏览代码

Add current-prefix-arg

master
10sr 6 年前
父节点
当前提交
40cf334f73
签署人:: 10sr GPG 密钥 ID: 7BEC428194130EB2
共有 1 个文件被更改,包括 5 次插入4 次删除
  1. +5
    -4
      emacs.el

+ 5
- 4
emacs.el 查看文件

@@ -1457,15 +1457,16 @@ Commands are searched from ALIST."
(my-rgrep-grep-command name my-rgrep-alist)))

(defun my-rgrep (command-args)
"My recursive grep. Run COMMAND-ARGS."
"My recursive grep. Run COMMAND-ARGS.
If prefix argument is given use current symbol as default search target."
(interactive (let ((cmd (my-rgrep-grep-command my-rgrep-default
nil)))
(if cmd
(list (read-shell-command "grep command: "
(concat cmd
"\""
(thing-at-point 'symbol t)
"\"")
(if current-prefix-arg
(thing-at-point 'symbol t)
""))
'grep-find-history))
(error "My-Rgrep: Command for rgrep not found")
)))


正在加载...
取消
保存