view lucid/lemacs-compat.el @ 64:bb72900f9e0b

better prefix detection
author Henry S Thompson <ht@inf.ed.ac.uk>
date Mon, 16 Dec 2024 18:20:50 +0000
parents 107d592c5f4a
children
line wrap: on
line source

;; 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)