diff options
author | Jim Meyering <jim@meyering.net> | 1999-01-31 23:30:22 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-01-31 23:30:22 +0000 |
commit | 3e267c16f53ab295108de523d51cdfd2a3233349 (patch) | |
tree | 527305b100c8b3b38bdfe37028828cc3cc795add /gid.el | |
parent | 37b74a244481089266aeccd2b788ad00479f4963 (diff) | |
download | idutils-3e267c16f53ab295108de523d51cdfd2a3233349.tar.gz idutils-3e267c16f53ab295108de523d51cdfd2a3233349.tar.bz2 idutils-3e267c16f53ab295108de523d51cdfd2a3233349.zip |
.
Diffstat (limited to 'gid.el')
-rw-r--r-- | gid.el | 33 |
1 files changed, 0 insertions, 33 deletions
@@ -1,33 +0,0 @@ -;;; put this in your GNU emacs startup file '~/.emacs' . -;;; or byte-compile it and autoload from somewhere else. - -(require 'compile) -(provide 'gid) - -(defvar gid-command "gid" "The command run by the gid function.") - -(defun gid (args) - "Run gid, with user-specified ARGS, and collect output in a buffer. -While gid runs asynchronously, you can use the \\[next-error] command to -find the text that gid hits refer to. The command actually run is -defined by the gid-command variable." - (interactive (list (read-input - (concat "Run " gid-command " (with args): ") (word-around-point)))) - (let (compile-command - (compilation-error-regexp-alist grep-regexp-alist) - (compilation-buffer-name-function (lambda (mode) - (concat "*" gid-command " " args "*")))) - ;; For portability to v19, use compile rather than compile-internal. - (compile (concat gid-command " " args)))) - -(defun word-around-point () - "Return the word around the point as a string." - (save-excursion - (if (not (eobp)) - (forward-char 1)) - (forward-word -1) - (forward-word 1) - (forward-sexp -1) - (buffer-substring (point) (progn - (forward-sexp 1) - (point))))) |