Преглед изворни кода

Add current-prefix-arg

master
10sr пре 6 година
родитељ
комит
40cf334f73
Signed by: 10sr GPG Key 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")
)))


Loading…
Откажи
Сачувај