various fixes for erlang.el

Dave Love <>
Tue Mar 30 18:02:30 CEST 2004

This patch is on top of the one I just sent for doc fixes, for more
substantial issues.  Some of these are to support Emacs 21 features
and others are cleanups.  I didn't think it was worth trying to
separate out the components.  It is against version 2.4.12 of
erlang.el, which I should also have said about the previous one,


 * Regexp-opt is unused (which isn't a real problem unless it's not
   autoloaded in earlier versions -- I don't remember);

 * `defalias' should normally be used instead of `fset' so that the
   definition's location  is recorded.  (Some of this involved with
   tags should be changed anyway, but I haven't got round to that);

 * I used advice for set-visited-file-name, which is cleaner and
   assumed elsewhere in the file, though it's bad to have to advise it
   at all -- I'll look at doing something better;

 * The unload hook allows the right things to be undone if the package
   is unloaded in Emacs 21.

 * The erlang-align-arrows and erlang-generate-new-clause changes
   avoid some consing;

 * The erlang-skel-mail-address change fixes the case when you've
   customized user-mail-address.  I'm not convinced the problem in the
   comment before it is a real one;

 * The extra variables in erlang-mode-variables are to DTRT in Emacs
   21, along with not overriding some global keybindings and defining
   a special mark function;

 * erlang-current-defun is a function which allows add-log to work

I think the Emacs 18 stuff should be cleaned out entirely.  This file
wouldn't even load into Emacs 18, and trying to support it would be
silly.  In fact, I don't think it's worth catering for Emacs 19
either, and not doing so would allow use of Custom, for instance, as
well as allowing several cleanups.

The use of things like `(funcall (symbol-function 'set) ...)' is
bizarre.  If it's there to avoid warnings, I'm sure it's not worth it.

Also it would be better to require `cl' at compile time to get things
like `unless', `push' and `caddr'.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: erlang-patch-2
Type: text/x-patch
Size: 11121 bytes
Desc: not available
URL: <>

More information about the erlang-patches mailing list