* Browsing docs & caml.el.
@ 1999-03-08 16:44 Pierpaolo Bernardi
0 siblings, 0 replies; only message in thread
From: Pierpaolo Bernardi @ 1999-03-08 16:44 UTC (permalink / raw)
To: caml-list
The elisp function ocaml-refman-fontificato below is what I used to
use to browse ocaml docs. In my experience, this is order of
magnitude faster than using a web browser with the html docs.
This code uses the function Man-fontify-manpage which is not
documented. It works in GNU Emacs 19.34.
(if (string-match "XEmacs" emacs-version)
(defun sposta-il-cursore-fuori ()
(interactive)
(set-mouse-pixel-position (frame-root-window)
30 ;(- (frame-pixel-width) 50)
-45))
(defun sposta-il-cursore-fuori ()
(interactive)
(set-mouse-position (window-frame (frame-selected-window))
(1+ (frame-width))
0))
)
(defun find-file-read-only-other-frame-fontificato (filename)
(interactive "fFile to view: ")
(require 'man)
(find-file-read-only-other-frame filename)
(toggle-read-only)
(Man-fontify-manpage)
(not-modified)
(toggle-read-only))
(defun ocaml-refman-fontificato ()
(interactive)
(find-file-read-only-other-frame-fontificato
"/usr/local/lib/ocaml/Doc/ocaml-refman.prn")
(sposta-il-cursore-fuori))
================================================================
Also, there's a little bug in caml.el. Patch follows.
*** caml.el.~1~ Sat Mar 6 01:04:05 1999
--- caml.el Sat Mar 6 01:09:26 1999
***************
*** 619,625 ****
;; This function switches to monobyte mode
(if (not (fboundp 'char-bytes))
! (defalias forward-byte forward-char)
(defun caml-char-bytes (ch)
(let ((l (char-bytes ch)))
(if (> l 1) (- l 1) l)))
--- 619,625 ----
;; This function switches to monobyte mode
(if (not (fboundp 'char-bytes))
! (defalias 'forward-byte 'forward-char)
(defun caml-char-bytes (ch)
(let ((l (char-bytes ch)))
(if (> l 1) (- l 1) l)))
================================================================
Best regards,
Pierpaolo Bernardp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-03-09 7:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-08 16:44 Browsing docs & caml.el Pierpaolo Bernardi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox