diff options
-rw-r--r-- | README | 45 | ||||
-rw-r--r-- | connection.el | 4 | ||||
-rw-r--r-- | debian/README.debian | 7 | ||||
-rw-r--r-- | debian/changelog | 9 | ||||
-rw-r--r-- | debian/control | 17 | ||||
-rw-r--r-- | debian/copyright | 14 | ||||
-rw-r--r-- | debian/dirs | 5 | ||||
-rwxr-xr-x | debian/postinst | 6 | ||||
-rwxr-xr-x | debian/prerm | 5 | ||||
-rwxr-xr-x | debian/rules | 53 | ||||
-rw-r--r-- | dictionary-init.el | 9 | ||||
-rw-r--r-- | dictionary.el | 35 | ||||
-rwxr-xr-x | install.debian | 30 | ||||
-rw-r--r-- | link.el | 4 | ||||
-rwxr-xr-x | remove.debian | 17 |
15 files changed, 231 insertions, 29 deletions
@@ -45,7 +45,8 @@ implemented some hacks to work with the very very old custom.el file in the above GNU Emacs. Please update to the current version whenever possible. XEmacs 21 and Emacs 20 as well as Emacs 21 have been tested too. - * Current version (1.3) of this package + * Current version (1.3.1) of this package + * Previous version (1.3) of this package * Version 1.2.1 of this package * Version 1.1 of this package * Version 1.0 of this package @@ -63,16 +64,16 @@ Unpacking the archive The package is distributed as tar.gz file. You unpack it using: -gunzip dictionary-1.3.tar.gz | tar xf - +gunzip dictionary-1.3.1.tar.gz | tar xf - or -tar -xzf dictionary-1.3.tar.gz +tar -xzf dictionary-1.3.1.tar.gz (with the version number subject to change) depending on whether you are using GNU tar which support the z flag for compression. After unpacking the -archive a directory dictionary-1.3 has been created containing the necessary -files. +archive a directory dictionary-1.3.1 has been created containing the +necessary files. Byte compiling @@ -89,6 +90,25 @@ To install the files into your GNU Emacs/XEmacs installation please copy the installations /usr/lib/emacs/site-lisp or /usr/local/lib/emacs/site-lisp are suitable locations. +Debian + +If you are using a current Debian distribution (one that support the emacsen +package system) you can use the supplied debian support. + +gunzip dictionary-1.3.1.tar.gz | tar xf - +cd dictionary-1.3.1 +dpkg-buildpackage -us -uc -rfakeroot + +This will create a package named dictionary-1.3.1-1_i386.deb or similiar in +the parent directory of dictionary-1.3.1. You can now install this package +as root, it will automatically byte-compile itself for all installed emacs +versions and provide a startup-file which autoloads this package. In the +configuration example given below you can omit the autoload lines. + +If you no longer want to use this package, you can remove it using: + +dpkg -r dictionary + Loading the package You have to insert some instructions into your .emacs file to load the @@ -290,9 +310,9 @@ starting from C-c a to C-c z. Thanks -I want to thank Sam Steingold, Baoqiu Cui, Bruce Ravel, Pavel Janík, and -Sergei Pokrovsky for their valuable suggestions (including patches) for -improving this package. +I want to thank Sam Steingold, Baoqiu Cui, Bruce Ravel, Pavel Janík, Sergei +Pokrovsky, and Jeff Mincy for their valuable suggestions (including patches) +for improving this package. License @@ -311,6 +331,13 @@ along with this package; see the file GPL. ChangeLogs +Version 1.3 - 1.3.1 + + * small fix in dictionary function to check for availability of the utf-8 + encoding to prevent problems in certain xemacs versions (reported by + Jeff Mincy) + * added debian support (use dpkg-buildpackage to build a package) + Version 1.2.1 - 1.3 * Implemented an automatic detection for line ends CR/LF and LF. The @@ -360,4 +387,4 @@ Version 1.0 - 1.1 ------------------------------------------------------------------------ Torsten Hilbrich -Last modified: Thu Apr 26 19:50:39 CEST 2001 +Last modified: Sun May 13 10:29:09 CEST 2001 diff --git a/connection.el b/connection.el index e92a9ff..0a284bc 100644 --- a/connection.el +++ b/connection.el @@ -2,7 +2,7 @@ ;; Author: Torsten Hilbrich <Torsten.Hilbrich@gmx.net> ;; Keywords: network -;; $Id: connection.el,v 1.7 2001/04/26 16:56:21 torsten Exp $ +;; $Id: connection.el,v 1.7 2001/04/26 16:56:21 torsten Exp torsten $ ;; This file is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -149,4 +149,4 @@ nil: argument is no connection object "Read until a line is consisting of a single point" (connection-read connection "\015?\012[.]\015?\012")) -(provide 'connection)
\ No newline at end of file +(provide 'connection) diff --git a/debian/README.debian b/debian/README.debian new file mode 100644 index 0000000..45b7fca --- /dev/null +++ b/debian/README.debian @@ -0,0 +1,7 @@ +dictionary for Debian +---------------------- + +This is an unofficial debian package for the dictionary client found +at http://me.in-berlin.de/~myrkr/dictionary.html. + +Torsten Hilbrich <Torsten.Hilbrich@gmx.net>, Sun, 13 May 2001 09:55:20 +0200 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..430971e --- /dev/null +++ b/debian/changelog @@ -0,0 +1,9 @@ +dictionary (1.3.1-1) unstable; urgency=low + + * Initial release. + + -- Torsten Hilbrich <Torsten.Hilbrich@gmx.net> Sun, 13 May 2001 09:55:20 +0200 + +Local variables: +mode: debian-changelog +End: diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..e4fc207 --- /dev/null +++ b/debian/control @@ -0,0 +1,17 @@ +Source: dictionary +Section: unknown +Priority: optional +Maintainer: Torsten Hilbrich <Torsten.Hilbrich@gmx.net> +Standards-Version: 3.2.1 + +Package: dictionary +Architecture: any +Depends: emacsen +Description: dictionary client for emacs + This dictionary client provides access to a dictionary server + (as defined in RFC 2229) from within Emacs or XEmacs. + . + It supports utf-8 (currently available in Emacs 21) and allows + to follow links (marked by {braces}) within the definitions. + . + This is an unofficial debian package. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..ec1a927 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,14 @@ +This package was debianized by Torsten Hilbrich Torsten.Hilbrich@gmx.net on +Sun, 13 May 2001 09:55:20 +0200. + +It was downloaded from http://me.in-berlin.de/~myrkr/dictionary.html + +Copyright: + +dictionary is licensed under the GNU General Public License version 2 or +higher. + +On Debian systems the full text of this licence can be found +in /usr/share/common-licenses/GPL. + + diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..9d129ef --- /dev/null +++ b/debian/dirs @@ -0,0 +1,5 @@ +usr/lib/emacsen-common/packages/install +usr/lib/emacsen-common/packages/remove +usr/share/doc/dictionary +usr/share/emacs/site-lisp + diff --git a/debian/postinst b/debian/postinst new file mode 100755 index 0000000..2333df3 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,6 @@ +#!/bin/sh + +PACKAGE=dictionary + +/usr/lib/emacsen-common/emacs-package-install $PACKAGE + diff --git a/debian/prerm b/debian/prerm new file mode 100755 index 0000000..bc7ec08 --- /dev/null +++ b/debian/prerm @@ -0,0 +1,5 @@ +#!/bin/sh + +PACKAGE=dictionary + +/usr/lib/emacsen-common/emacs-package-remove $PACKAGE diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..e55bdb0 --- /dev/null +++ b/debian/rules @@ -0,0 +1,53 @@ +#!/usr/bin/make -f +# Made with the aid of debmake, by Christoph Lameter, +# based on the sample debian/rules file for GNU hello by Ian Jackson. + +package=dictionary + +build: + $(checkdir) + + touch build + +clean: + $(checkdir) + -rm -f build + -rm -f `find . -name "*~"` + -rm -rf debian/tmp debian/files* core debian/substvars + +binary-indep: checkroot build + $(checkdir) +# There are no architecture-independent files to be uploaded +# generated by this package. If there were any they would be +# made here. + +binary-arch: checkroot build + $(checkdir) + -rm -rf debian/tmp + install -d debian/tmp + cd debian/tmp && install -d `cat ../dirs` + + cp dictionary.el connection.el link.el dictionary-init.el \ + debian/tmp/usr/share/emacs/site-lisp + cp install.debian debian/tmp/usr/lib/emacsen-common/packages/install/dictionary + chmod 755 debian/tmp/usr/lib/emacsen-common/packages/install/dictionary + cp remove.debian debian/tmp/usr/lib/emacsen-common/packages/remove/dictionary + chmod 755 debian/tmp/usr/lib/emacsen-common/packages/remove/dictionary + + debstd README + dpkg-gencontrol -isp + chown -R root.root debian/tmp + chmod -R go=rX debian/tmp + dpkg --build debian/tmp .. + +define checkdir + test -f debian/rules +endef + +binary: binary-indep binary-arch + +checkroot: + $(checkdir) + test root = "`whoami`" + +.PHONY: binary binary-arch binary-indep clean checkroot diff --git a/dictionary-init.el b/dictionary-init.el new file mode 100644 index 0000000..5f21a39 --- /dev/null +++ b/dictionary-init.el @@ -0,0 +1,9 @@ +(autoload 'dictionary-search "dictionary" + "Ask for a word and search it in all dictionaries" t) +(autoload 'dictionary-match-words "dictionary" + "Ask for a word and search all matching words in the dictionaries" t) +(autoload 'dictionary-lookup-definition "dictionary" + "Unconditionally lookup the word at point." t) +(autoload 'dictionary "dictionary" + "Create a new dictionary buffer" t) + diff --git a/dictionary.el b/dictionary.el index f79f735..38d2310 100644 --- a/dictionary.el +++ b/dictionary.el @@ -2,7 +2,7 @@ ;; Author: Torsten Hilbrich <Torsten.Hilbrich@gmx.net> ;; Keywords: interface, dictionary -;; $Id: dictionary.el,v 1.17 2001/04/26 16:57:32 torsten Exp $ +;; $Id: dictionary.el,v 1.18 2001/05/13 07:46:37 torsten Exp torsten $ ;; This file is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -230,20 +230,23 @@ This is a quick reference to this mode describing the default key bindings: (defun dictionary () "Create a new dictonary buffer and install dictionary-mode" (interactive) - - (let ((coding-system-for-read 'utf-8) - (coding-system-for-write 'utf-8)) - (let ((buffer (generate-new-buffer "*Dictionary buffer*")) - (window-configuration (current-window-configuration))) - - (switch-to-buffer-other-window buffer) - (dictionary-mode) - - (make-local-variable 'dictionary-window-configuration) - (setq dictionary-window-configuration window-configuration) - (dictionary-check-connection) - (dictionary-pre-buffer) - (dictionary-post-buffer)))) + (let ((coding-system nil)) + (if (and (boundp 'coding-system-alist) + (assoc "utf-8" coding-system-alist)) + (setq coding-system 'utf-8)) + (let ((coding-system-for-read coding-system) + (coding-system-for-write coding-system)) + (let ((buffer (generate-new-buffer "*Dictionary buffer*")) + (window-configuration (current-window-configuration))) + + (switch-to-buffer-other-window buffer) + (dictionary-mode) + + (make-local-variable 'dictionary-window-configuration) + (setq dictionary-window-configuration window-configuration) + (dictionary-check-connection) + (dictionary-pre-buffer) + (dictionary-post-buffer))))) (unless dictionary-mode-map (setq dictionary-mode-map (make-sparse-keymap)) @@ -844,4 +847,4 @@ It presents the word at point as default input and allows editing it." (setq pattern (read-string "Search pattern: "))) (dictionary-new-matching pattern)) -(provide 'dictionary)
\ No newline at end of file +(provide 'dictionary) diff --git a/install.debian b/install.debian new file mode 100755 index 0000000..ad76efb --- /dev/null +++ b/install.debian @@ -0,0 +1,30 @@ +#!/bin/sh + +PACKAGE=dictionary +FLAVOUR=$1 +ELDIR=/usr/share/emacs/site-lisp/ +ELCDIR=/usr/share/$FLAVOUR/site-lisp/ +EFLAGS="-batch -q -l lpath.el -f batch-byte-compile" +CONFFILE=${ELDIR}/${PACKAGE}-init.el +CONFDIR=/etc/$FLAVOUR/site-start.d/ + +SOURCES="dictionary.el connection.el link.el" + +case "$FLAVOUR" in + emacs) echo "install/$PACKAGE: Ignoring emacs";; + *) echo -n "install/$PACKAGE: Byte-compiling for $FLAVOUR..." + install -m 755 -d $ELCDIR + for i in $SOURCES; do cp $ELDIR/$i $ELCDIR; done + (cd $ELCDIR && \ + echo '(setq load-path (cons "." load-path))' > lpath.el + $FLAVOUR $EFLAGS $SOURCES 2>/dev/null + rm lpath.el ) + cp ${CONFFILE} ${CONFDIR}/50${PACKAGE}.el + cd $ELCDIR + for i in $SOURCES; do rm -f $ELCDIR/*.el; done + echo " done." + ;; +esac + + + @@ -2,7 +2,7 @@ ;; Author: Torsten Hilbrich <Torsten.Hilbrich@gmx.net> ;; Keywords: interface, hypermedia -;; $Id: link.el,v 1.5 1999/01/08 18:36:50 torsten Exp $ +;; $Id: link.el,v 1.5 1999/01/08 18:36:50 torsten Exp torsten $ ;; This file is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -117,4 +117,4 @@ link. Upon clicking the `function' is called with `data' as argument." (define-key keymap [return] 'link-selected) (define-key keymap [(meta return)] 'link-selected-all)) -(provide 'link)
\ No newline at end of file +(provide 'link) diff --git a/remove.debian b/remove.debian new file mode 100755 index 0000000..991d208 --- /dev/null +++ b/remove.debian @@ -0,0 +1,17 @@ +#!/bin/sh +PACKAGE=dictionary +FLAVOUR=$1 +ELCDIR=/usr/share/$FLAVOUR/site-lisp/ + +SOURCE="connection.el dictionary.el link.el" +CONFFILE=/etc/$FLAVOUR/site-start.d/50${PACKAGE}.el + +case "$FLAVOUR" in + emacs) echo "install/$PACKAGE: Ignoring emacs";; + *) echo -n "remove/$PACKAGE: Removing for $FLAVOUR..." + cd $ELCDIR + for i in $SOURCE; do rm -f ${i}c; done + rm ${CONFFILE} + echo " done." + ;; +esac |