summaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGreg McGary <greg@mcgary.org>1997-04-18 06:43:32 +0000
committerGreg McGary <greg@mcgary.org>1997-04-18 06:43:32 +0000
commit916418ea1284e6aa64f50eba077e48ced5944acc (patch)
tree8e519e3a48ae80c8c17da3ba5acccd91530b22ff /lisp
parenta560adff07afe7c1f35e4585e0694e89c842b245 (diff)
downloadidutils-916418ea1284e6aa64f50eba077e48ced5944acc.tar.gz
idutils-916418ea1284e6aa64f50eba077e48ced5944acc.tar.bz2
idutils-916418ea1284e6aa64f50eba077e48ced5944acc.zip
Initial revision
Diffstat (limited to 'lisp')
-rw-r--r--lisp/Makefile.am10
-rw-r--r--lisp/Makefile.in160
-rwxr-xr-xlisp/elisp-comp42
-rw-r--r--lisp/id-utils.el63
4 files changed, 275 insertions, 0 deletions
diff --git a/lisp/Makefile.am b/lisp/Makefile.am
new file mode 100644
index 0000000..54c22d0
--- /dev/null
+++ b/lisp/Makefile.am
@@ -0,0 +1,10 @@
+## Process this file with automake to create Makefile.in
+
+EXTRA_DIST = id-utils.el elisp-comp
+elc_SCRIPTS = id-utils.elc
+elcdir = @LISPDIR@
+SUFFIXES = .el .elc
+
+.el.elc:
+ @echo "WARNING: Warnings can be ignored. :-)"
+ $(SHELL) $(srcdir)/elisp-comp $<
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
new file mode 100644
index 0000000..48d5568
--- /dev/null
+++ b/lisp/Makefile.in
@@ -0,0 +1,160 @@
+# Makefile.in generated automatically by automake 1.0 from Makefile.am
+
+# Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+
+SHELL = /bin/sh
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+EXTRA_DIST = id-utils.el elisp-comp
+elc_SCRIPTS = id-utils.elc
+elcdir = @LISPDIR@
+SUFFIXES = .el .elc
+mkinstalldirs = $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+SCRIPTS = $(elc_SCRIPTS)
+
+DIST_COMMON = Makefile.am Makefile.in
+
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \
+ $(TEXINFOS) $(INFOS) $(MANS) $(EXTRA_DIST) $(DATA)
+DEP_DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \
+ $(TEXINFOS) $(INFO_DEPS) $(MANS) $(EXTRA_DIST) $(DATA)
+
+TAR = tar
+default: all
+
+
+$(srcdir)/Makefile.in: @MAINT@Makefile.am $(top_srcdir)/configure.in
+ cd $(top_srcdir) && automake $(subdir)/Makefile
+
+Makefile: $(top_builddir)/config.status Makefile.in
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
+
+install-elcSCRIPTS: $(elc_SCRIPTS)
+ $(mkinstalldirs) $(elcdir)
+ list="$(elc_SCRIPTS)"; for p in $$list; do \
+ if test -f $$p; then \
+ $(INSTALL_SCRIPT) $$p $(elcdir)/`echo $$p|sed '$(transform)'`; \
+ else if test -f $(srcdir)/$$p; then \
+ $(INSTALL_SCRIPT) $(srcdir)/$$p \
+ $(elcdir)/`echo $$p|sed '$(transform)'`; \
+ else :; fi; fi; \
+ done
+
+uninstall-elcSCRIPTS:
+ list="$(elc_SCRIPTS)"; for p in $$list; do \
+ rm -f $(elcdir)/`echo $$p|sed '$(transform)'`; \
+ done
+tags: TAGS
+TAGS:
+
+
+subdir = lisp
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+distdir: $(DEP_DISTFILES)
+ @for file in `cd $(srcdir) && echo $(DISTFILES)`; do \
+ test -f $(distdir)/$$file \
+ || ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $(srcdir)/$$file $(distdir)/$$file; \
+ done
+info:
+
+dvi:
+
+check: all
+
+installcheck:
+
+install-exec:
+
+install-data: install-elcSCRIPTS
+
+install: install-exec install-data all
+ @:
+
+uninstall: uninstall-elcSCRIPTS
+
+all: $(SCRIPTS) Makefile
+
+install-strip:
+ $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
+installdirs:
+ $(mkinstalldirs) $(elcdir)
+
+
+mostlyclean-generic:
+ test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+clean-generic:
+ test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ rm -f Makefile $(DISTCLEANFILES)
+ rm -f config.cache config.log $(CONFIG_HEADER) stamp-h
+
+maintainer-clean-generic:
+ test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+ test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+mostlyclean: mostlyclean-generic
+
+clean: clean-generic mostlyclean
+
+distclean: distclean-generic clean
+ rm -f config.status
+
+maintainer-clean: maintainer-clean-generic distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+.PHONY: default uninstall-elcSCRIPTS install-elcSCRIPTS tags distdir \
+info dvi check installcheck install-exec install-data install uninstall \
+all installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+.el.elc:
+ @echo "WARNING: Warnings can be ignored. :-)"
+ $(SHELL) $(srcdir)/elisp-comp $<
+.SUFFIXES:
+.SUFFIXES: $(SUFFIXES)
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/lisp/elisp-comp b/lisp/elisp-comp
new file mode 100755
index 0000000..d9adbfe
--- /dev/null
+++ b/lisp/elisp-comp
@@ -0,0 +1,42 @@
+#!/bin/sh
+# Copyright (C) 1995 Free Software Foundation, Inc.
+# François Pinard <pinard@iro.umontreal.ca>, 1995.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# This script byte-compiles all `.el' files which are part of its
+# arguments, using GNU Emacs, and put the resulting `.elc' files into
+# the current directory, so disregarding the original directories used
+# in `.el' arguments.
+#
+# This script manages in such a way that all Emacs LISP files to
+# be compiled are made visible between themselves, in the event
+# they require or load-library one another.
+
+if test $# = 0; then
+ echo 1>&2 "No files given to $0"
+else
+ tempdir=elc.$$
+ mkdir $tempdir
+ cp $* $tempdir
+ cd $tempdir
+
+ echo "(setq load-path (cons nil load-path))" > script
+ emacs -batch -l script -f batch-byte-compile *.el
+ mv *.elc ..
+
+ cd ..
+ rm -fr $tempdir
+fi
diff --git a/lisp/id-utils.el b/lisp/id-utils.el
new file mode 100644
index 0000000..09c7f9b
--- /dev/null
+++ b/lisp/id-utils.el
@@ -0,0 +1,63 @@
+;;; id-utils.el -- emacs interface to `lid -R grep', a.k.a. `gid'
+;;; Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+;;; Greg McGary <gkm@gnu.ai.mit.edu>.
+
+;; This file is part of GNU id-utils.
+
+;; GNU id-utils is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; GNU id-utils is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, 59 Temple Place - Suite 330, Boston,
+;; MA 02111-1307, USA.
+
+;;; This package provides the tools meant to help editing PO files,
+;;; as documented in the GNU id-utils user's manual. See this manual
+;;; for user documentation, which is not repeated here.
+
+;;; To install, merely put this file somewhere GNU Emacs will find it,
+;;; then add the following lines to your .emacs file:
+;;;
+;;; (autoload 'gid "id-utils")
+;;;
+;;; You may also adjust some customizations variables, below, by defining
+;;; them in your .emacs file.
+
+(require 'compile)
+(provide 'id-utils)
+
+(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)))))