Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

caml.el #3055

Closed
vicuna opened this issue Nov 28, 2001 · 2 comments
Closed

caml.el #3055

vicuna opened this issue Nov 28, 2001 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Nov 28, 2001

Original bug ID: 661
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Je propose ce mini-patch à caml.el, car chaque fois que je tape un
espace après _in en mode inferior-caml, ça bipe. Vu le test
(and cached-begin cached-end ...) juste en dessous, je suppose que
c'était l'intention originelle.

Bruno.

*** caml.el~ Thu Apr 26 11:33:48 2001
--- caml.el Wed Nov 28 17:37:01 2001


*** 925,932 ****
;;have to account for that possibility in comments.
(save-excursion
(let* ((cached-pos caml-last-noncomment-pos)
! (cached-begin (marker-position caml-last-comment-start))
! (cached-end (marker-position caml-last-comment-end)))
(cond
((and cached-begin cached-end
(< cached-begin (point)) (< (point) cached-end)) t)
--- 925,934 ----
;;have to account for that possibility in comments.
(save-excursion
(let* ((cached-pos caml-last-noncomment-pos)
! (cached-begin (and caml-last-comment-start
! (marker-position caml-last-comment-start)))
! (cached-end (and caml-last-comment-end
! (marker-position caml-last-comment-end))))
(cond
((and cached-begin cached-end
(< cached-begin (point)) (< (point) cached-end)) t)

Diff finished at Wed Nov 28 17:44:05

@vicuna
Copy link
Author

vicuna commented Dec 4, 2001

Comment author: administrator

Je propose ce mini-patch à caml.el, car chaque fois que je tape un
espace après _in en mode inferior-caml, ça bipe. Vu le test
(and cached-begin cached-end ...) juste en dessous, je suppose que
c'était l'intention originelle.

Je ne comprends pas bien.
Ce code n'est pas cense' etre utilise' en mode inferior-caml,
uniquement en mode caml (ou` caml-last-comment-start est definie).
Comment le changer peut resoudre le probleme?

D'autre part, y a-t-il une facon sure de reproduire le probleme?
Ca ne bippe pas chez moi.

Jacques Garrigue

@vicuna
Copy link
Author

vicuna commented Dec 4, 2001

Comment author: administrator

Date: Tue, 4 Dec 2001 04:38:23 +0100 (MET)
From: garrigue@kurims.kyoto-u.ac.jp

Je propose ce mini-patch à caml.el, car chaque fois que je tape un espace
après _in en mode inferior-caml, ça bipe.
Je ne comprends pas bien. Ce code n'est pas censé etre utilisé en
mode inferior-caml, uniquement en mode caml (où
caml-last-comment-start est definie). Comment le changer peut
resoudre le probleme?
Jusque là, c'est facile: il n'est pas censé, mais on peut y arriver...
D'autre part, y a-t-il une facon sure de reproduire le probleme?
Facile aussi: j'ai ça dans mon caml-abbrev-hook
(defvar caml-mode-abbrev-table nil "")
(define-abbrev-table 'caml-mode-abbrev-table ())
(setq local-abbrev-table caml-mode-abbrev-table)
Ça doit répondre à la première question.

Maintenant, quel est l'intérêt de ça dans caml-abbrev-hook ? Je ne
m'en souviens plus avec précision, mais je suppose que c'était pour
ajouter des abbrevs locales en mode caml (de dyslexie, genre tehn
-> then), et pouvoir en disposer aussi en inferior-caml-mode (*).
Est-ce bien légitime ? Je fais ça aussi en scheme mode...

Bon, à lire le code (caml.el), caml-mode-abbrev-table n'est pas faite
pour ça. D'autre part, caml-mode-abbrev-table n'apparaît pas (= n'est
pas sauvée) dans mon ~/.abbrev_defs, car define-abbrev-table, après
consultation des sources (abbrevs.c), ne l'enregistre que si elle est
unbound ou à nil (i.e. il devrait être fait par caml.el). Bref, tout
ça (dans mon hook) a fort peu de chances de marcher...

Disons que l'utilisateur ne doit pas faire d'abbrevs locales en mode
caml. Pas très standard emacs, mais si je suis le seul à m'en être
jamais plaint, je veux bien retirer mon bug-report. Je mettrai mes
abbrevs en global.

Bruno.

@vicuna vicuna closed this as completed Jan 4, 2002
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant