aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorGravatar David Aspinall <da@inf.ed.ac.uk>2007-05-10 22:45:19 +0000
committerGravatar David Aspinall <da@inf.ed.ac.uk>2007-05-10 22:45:19 +0000
commit21a5b580700a4b4224ecd1300b14ff486ffe85e8 (patch)
tree3ba065ef8b0d1b7c24819c7b43ad79aa3ced778a /lib
parent82955a773ece399f4d35b9806e40f3b8f673c95c (diff)
Emulate find-coding-system for GNU Emacs
Diffstat (limited to 'lib')
-rw-r--r--lib/proof-compat.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/proof-compat.el b/lib/proof-compat.el
index f35e8d9c..a0d68bbf 100644
--- a/lib/proof-compat.el
+++ b/lib/proof-compat.el
@@ -501,7 +501,7 @@ is first in the list. VISIBLE-ONLY will only list non-iconified frames."
(>= (nth 2 (window-edges window))
(frame-width (window-frame window)))))
-;; with-selected-windown from XEmacs 21.4.12
+;; with-selected-window from XEmacs 21.4.12
(or (fboundp 'with-selected-window)
(defmacro with-selected-window (window &rest body)
"Execute forms in BODY with WINDOW as the selected window.
@@ -511,6 +511,13 @@ The value returned is the value of the last form in BODY."
,@body)))
+;; find-coding-system emulation for GNU Emacs
+(unless (fboundp 'find-coding-system)
+ (defun find-coding-system (name)
+ "Retrieve the coding system of the given name, or nil if non-such."
+ (condition-case nil
+ (check-coding-system name)
+ (error nil))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;