Menu

#5145 Allow $... to specify a markup command

Verified
Enhancement
2017-07-18
2017-06-12
No

Allow $... to specify a markup command

This is a partial (though more flexible) substitute for \on-the-fly
since it allows to replace

\on-the-fly #(lambda (layout props args) ...)

with

$(let ((fun (lambda (layout props args) ...)))
(set! (markup-command-signature fun) (list markup?))
fun)

Namely: ad-hoc written functions (probably most useful when written
using macros) can be employed as markup commands when preceded with $
as long as they have a suitable markup command signature attached.
This feature is mainly added for consistency with music functions.

Lexer: factor out push_markup_predicates

http://codereview.appspot.com/322090043

Discussion

  • Anonymous

    Anonymous - 2017-06-13
    • Description has changed:

    Diff:

    
    
    • Needs: -->
    • Patch: new --> review
     
  • Anonymous

    Anonymous - 2017-06-13

    Passes make, make check and a full make doc

     
  • Anonymous

    Anonymous - 2017-06-14
    • Patch: review --> countdown
     
  • Anonymous

    Anonymous - 2017-06-14

    Patch on countdown for June 17th.

     
  • Anonymous

    Anonymous - 2017-06-16
    • Patch: countdown --> push
     
  • Anonymous

    Anonymous - 2017-06-16

    Patch counted down - please push.

     
  • David Kastrup

    David Kastrup - 2017-06-17
    • labels: --> Fixed_2_19_63
    • status: Started --> Fixed
    • Patch: push -->
     
  • David Kastrup

    David Kastrup - 2017-06-17

    Pushed to staging as
    commit c3b51542671a9af5647d4cbc63f7c8ae98c1c2bd
    Author: David Kastrup dak@gnu.org
    Date: Mon Jun 12 13:44:51 2017 +0200

    Issue 5145/2: Allow $... to specify a markup command
    
    This is a partial (though more flexible) substitute for \on-the-fly
    since it allows to replace
    
    \on-the-fly #(lambda (layout props args) ...)
    
    with
    
    $(let ((fun (lambda (layout props args) ...)))
       (set! (markup-command-signature fun) (list markup?))
       fun)
    
    Namely: ad-hoc written functions (probably most useful when written
    using macros) can be employed as markup commands when preceded with $
    as long as they have a suitable markup command signature attached.
    This feature is mainly added for consistency with music functions.
    

    commit da2cbdd4623e5ea51a2a99de4f2935b37195136e
    Author: David Kastrup dak@gnu.org
    Date: Mon Jun 12 13:21:55 2017 +0200

    Issue 5145/1: Lexer: factor out push_markup_predicates
    
     

    Last edit: David Kastrup 2017-06-17
  • Federico Bruni

    Federico Bruni - 2017-07-18
    • status: Fixed --> Verified
     
MongoDB Logo MongoDB