crm.el (completing-read-multiple) in XEmacs

Reiner Steib reinersteib+gmane at imap.cc
Sun Oct 23 05:34:14 EDT 2005


On Sun, Oct 23 2005, Ben Wing wrote:

>>>>>>>>"Reiner" == Reiner Steib <reinersteib+gmane at imap.cc> writes:
>>>    > Arne Jørgensen wrote improved completing support for inserting
>>>    > stuff like "\usepackage[bar,baz,zab]{foo}" in AUCTeX.  The
>>>    > function needs `completing-read-multiple' from `crm.el'[1] which
>>>    > is available in Emacs 21 and Emacs 22 (CVS[2]), but not in
>>>    > XEmacs.
>>>
>>>    > We found that `riece.el'[3] which is available as an XEmacs
>>>    > package seems to duplicate some code from `crm.el' for XEmacs.
>>>
>>>    > Wouldn't it make much more sense to include `crm.el' in
>>>    > `xemacs-base', some utility package or distribute it as a
>>>    > separate package instead of duplicating it's code in several
>>>    > packages?
[...]
> i think this sounds great.  probably crm.el should go in edit-utils.  
> does this need to be ported or does it work already under xemacs?

Thank you for your response.  I've done some testing with XEmacs
21.4.15:

`crm.el' from Emacs 21 (21.3 or 21.4) works without any modifications
in XEmacs.  The version from Emacs 22 (CVS) uses the function
`minibuffer-prompt-end' (a `diff -w -u' of those versions is
attached), a built-in function in Emacs 22, not present in XEmacs.

AfAICS, it would be sufficient if you'd include the Emacs 21 version
of `crm.el' in edit-utils.  [My understanding is, that XEmacs users
(regardless whether they use a recent XEmacs 21.4 or XEmacs 21.5)
would then just need to upgrade the edit-utils package to get this.
Please CMIIW.]

It would be great if you could include `crm.el' in the next packages
updates.  TIA.


In case you consider to use the Emacs 22 version, here's some
additional information.  I don't know if XEmacs has similar functions
that could be used:

,----[ <f1> f minibuffer-prompt-end RET ]
| minibuffer-prompt-end is a built-in function in `C source code'.
| (minibuffer-prompt-end)
| 
| Return the buffer position of the end of the minibuffer prompt.
| Return (point-min) if current buffer is not a minibuffer.
`----

In Emacs 21, `minibuffer-prompt-end' is defined in `simple.el':

,----
| (defun minibuffer-prompt-end ()
|   "Return the buffer position of the end of the minibuffer prompt.
| Return (point-min) if current buffer is not a mini-buffer."
|   (field-beginning (point-max)))
`----

,----[ <f1> f field-beginning RET ]
| field-beginning is a built-in function.
| (field-beginning &optional POS ESCAPE-FROM-EDGE)
| 
| Return the beginning of the field surrounding POS.
| A field is a region of text with the same `field' property.
| If POS is nil, the value of point is used for POS.
| If ESCAPE-FROM-EDGE is non-nil and POS is at the beginning of its
| field, then the beginning of the *previous* field is returned.
`----

HTH.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: crm-Emacs-21-22.diff
Type: text/x-patch
Size: 6349 bytes
Desc: crm Emacs 21 vs Emacs 22
Url : http://calypso.tux.org/pipermail/xemacs-beta/attachments/20051023/09338797/attachment.bin 


More information about the XEmacs-Beta mailing list