diff lucid/lemacs-compat.el @ 0:107d592c5f4a

DICE versions, used by pers/common, recursive, I think/hope
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Mon, 08 Feb 2021 11:44:37 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lucid/lemacs-compat.el	Mon Feb 08 11:44:37 2021 +0000
@@ -0,0 +1,42 @@
+;; Last edited: Thu Sep 24 14:57:39 1992
+;; backwards compatibility
+
+(setq mail-aliases t)
+
+;; hack not really quite right
+(defun current-msec-time () (* 1000 (car (cdr (current-time)))))
+(defun last-event-time () (event-timestamp last-input-event))
+
+;; inhibit-local-variables-regexps --> inhibit-first-line-modes-regexps
+;; needs to be fixed for edb
+
+
+(defun ht-rmail-cease-edit ()
+  "check if diary edit, move if so"
+  (interactive)
+  (rmail-cease-edit)
+  (if editing-diary-entry
+      (progn (setq editing-diary-entry nil)
+	     (ht-output-to-Calendar)
+	     (rmail-output-to-rmail-file ht-diary-file-name 1)
+	     (rmail-delete-forward))))
+
+(defun fake-face-width (face)
+  ;; Hack since can't seem to do this directly
+  (cdr (assoc 'QUAD_WIDTH (x-font-properties (face-font face)))))
+
+(defun fake-face-height (face)
+  ;; Hack since can't seem to do this directly
+  (let ((prop (x-font-properties (face-font face))))
+    ;; highly speculative . . .
+    (+ (cdr (assoc 'CAP_HEIGHT prop))
+       (cdr (assoc 'X_HEIGHT prop)))))
+
+(if (not (fboundp 'face-width))
+    (fset 'face-width (symbol-function 'fake-face-width)))
+
+(if (not (fboundp 'face-height))
+    (fset 'face-height (symbol-function 'fake-face-height)))
+
+(provide 'lemacs-compat)
+