Menu

#407 Use run-hook-with-args

mh-e-8.0
closed-invalid
None
5
2013-02-23
2002-11-25
Bill Wohler
No

Jeff says:

There is at least one place in mh-e where we jump
through hoops to get the same functionality as
run-hook-with-args. Do all the versions of emacs that
we support have this function? I've verified that 20.4
and 21.1 both have it.

If so, we should clean up our code.
------
Jeff is correct.

Peter, Steve, do you see run-hook-with-args on XEmacs?
Please post a note with your findings. If yes, we can
simply use run-hook-with-args. If not, we can add
(another) compatibility function to mh-utils defined
with mh-defun-compat.

Discussion

  • Peter S Galbraith

    Logged In: YES
    user_id=31877

    In XEmacs21:

    `run-hook-with-args' is a built-in function

    Documentation:
    Run HOOK with the specified arguments ARGS.
    HOOK should be a symbol, a hook variable. If HOOK has a non-nil
    value, that value may be a function or a list of functions to be
    called to run the hook. If the value is a function, it is
    called with
    the given arguments and its return value is returned. If it
    is a list
    of functions, those functions are called, in order,
    with the given arguments ARGS.
    It is best not to depend on the value returned by
    `run-hook-with-args',
    as that may change.

    To make a hook variable buffer-local, use `make-local-hook',
    not `make-local-variable'.

     
  • Bill Wohler

    Bill Wohler - 2006-01-11

    Logged In: YES
    user_id=93690

    Closing. We should use normal hooks whenever we can. Rather
    than call run-hook-with-args, use let to set some scoped
    variables, call run-hooks, and document those variables in
    the hook documentation.

     
  • Bill Wohler

    Bill Wohler - 2006-01-11
    • milestone: 104424 --> 497524
    • assigned_to: nobody --> wohler
    • status: open --> closed-invalid
     
  • Bill Wohler

    Bill Wohler - 2006-02-02
    • milestone: 497524 --> mh-e-8.0
     
  • Bill Wohler

    Bill Wohler - 2013-02-23
    • labels: General -->
     
  • Bill Wohler

    Bill Wohler - 2013-02-23

    Ticket moved from /p/mh-e/feature-requests/50/

     

Log in to post a comment.