Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Pierpaolo Bernardi <bernardp@cli.di.unipi.it>
To: caml-list@inria.fr
Subject: Browsing docs & caml.el.
Date: Mon, 8 Mar 1999 17:44:16 +0100 (MET)	[thread overview]
Message-ID: <199903081644.RAA08386@carlotta.cli.di.unipi.it> (raw)


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




                 reply	other threads:[~1999-03-09  7:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199903081644.RAA08386@carlotta.cli.di.unipi.it \
    --to=bernardp@cli.di.unipi.it \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox