diff options
author | Torsten Hilbrich <torsten.hilbrich@gmx.net> | 2001-05-13 10:30:00 +0200 |
---|---|---|
committer | Torsten Hilbrich <torsten@hilbrich.net> | 2011-08-27 20:47:37 +0200 |
commit | acc30f0c431e4ad89296f4bd9b81e97f970ac6c7 (patch) | |
tree | 65582b49b53b3278b7d71c80e3894880eba11ea4 /dictionary.el | |
parent | a18e83ba2f8ad73aaa5be8fa44dbf739f7c100f5 (diff) |
Imported version 1.3.1 from tarball
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)
Diffstat (limited to 'dictionary.el')
-rw-r--r-- | dictionary.el | 35 |
1 files changed, 19 insertions, 16 deletions
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) |