The home of Mikael Jansson, hacker, hobby chef & adrenaline junkie based in Sweden. More…

Mikael Jansson.be » Hacking

Roadmap

  • HyperTags (Vim help file conversion of the Hyperspec).

    Proposed format (roughly) as follows.

                                                                           *append*
    append &rest {lists} => {result}
      {list}   each must be a |cl-proper-list| except the last, which
               may be any |cl-object|.
      {result} an |cl-object|. This will be a |cl-list| unless the last
               list was not a cl-list and all preceding lists were
               |cl-null|.
    
      Description:
        |append| returns a new list that is the concatenation of the
        copies. lists are left unchanged; the list structure of each
        of lists except the last is copied.  The last argument is not
        copied; it becomes the |cl-cdr| of the final |cl-dotted-pair| of
        the concatenation of the preceding lists, or is returned directly
        if there are no preceding |cl-non-empty| lists.
    
      Examples:
        (append '(a b c) '(d e f) '() '(g)) =>  (A B C D E F G)
        (append '(a b c) 'd) =>  (A B C . D)
        (setq lst '(a b c)) =>  (A B C)
        (append lst '(d)) =>  (A B C D)
        lst =>  (A B C)
        (append) =>  NIL
        (append 'a) =>  A
    
      See Also:
        |nconc|, |concatenate|
    
                                                                            *apply*
    apply {function} &rest {args}+ => {result}*
      {function} a |cl-function-designator|
      {args}     a |cl-spreadable-argument-list-designator|
      {results}  the |cl-values| returned by function.
    
      Description:
        |cl-apply| the function to the args.
        When the function receives its arguments via &rest, it is
        permissible (but not required) for the |cl-implementation|
        to |cl-bind| the |cl-rest-parameter| to an |cl-object|
        that shares structure with the last argument to
        |apply|. Because a |cl-function| can neither detect whether it was
        called via apply nor whether (if so) the last argument to
        apply was a |cl-constant|,
        |cl-conforming-programs| must neither rely on the |cl-list|
        structure of a |cl-rest-list| to be freshly consed, nor modify
        that list structure.  |setf| can be used with apply in
        certain circumstances; see |cl-apply-forms-as-places|.
    
      Examples:
        (setq f '+) =>  +
        (apply f '(1 2)) =>  3
        (setq f #'-) =>  #<FUNCTION ->
        (apply f '(1 2)) =>  -1
        (apply #'max 3 5 '(2 7 3)) =>  7
        (apply 'cons '((+ 2 3) 4)) =>  ((+ 2 3) . 4)
        (apply #'+ '()) =>  0
    
        (defparameter *some-list* '(a b c))
        (defun strange-test (&rest x) (eq x *some-list*))
        (apply #'strange-test *some-list*) =>  implementation-dependent
    
        (defun bad-boy (&rest x) (rplacd x 'y))
        (bad-boy 'a 'b 'c) has undefined consequences.
        (apply #'bad-boy *some-list*) has undefined consequences.
    
        (defun foo (size &rest keys &key double &allow-other-keys)
          (let ((v (apply #'make-array size :allow-other-keys t keys)))
            (if double (concatenate (type-of v) v v) v)))
        (foo 4 :initial-contents '(a b c d) :double t)
         =>  #(A B C D A B C D)
    
      See Also:
        |funcall|, |fdefinition|, |function|, |cl-evaluation|
        |cl-apply-forms-as-places|.
    

    Notes:

    (none)

  • Add support for SWANK and implement the client-side in Vim.

    Some of the possible options for communication in the list below, with more details given at http://www.freehackers.org/VimIntegration:

    • external library, through :libcall and polling.
    • emulate |clientserver| (blocking server, asynch. client) in SWANK server-side

    vim/src/if_xcmdsrv.c:

       int serverRegisterName (Display *dpy, char_u *name);
       void serverChangeRegisteredWindow (Display *dpy, Window newwin);
       int serverSendToVim (Display *dpy, char_u *name, char_u *cmd, char_u **result, Window *server, int asExpr, int localLoop, int silent);
       char_u *serverGetVimNames (Display *dpy);
       Window serverStrToWin (char_u *str);
       int serverSendReply (char_u *name, char_u *str);
       int serverReadReply (Display *dpy, Window win, char_u **str, int localLoop);
       int serverPeekReply (Display *dpy, Window win, char_u **str);
       void serverEventProc (Display *dpy, XEvent *eventPtr);
    

    From vim_dev: <http://groups.google.com/group/vim_dev/msg/b102aa6724494a76>

    Can you explain me the place in the vim code where the main loop is implemented? Should I look at some of the above projects or other ones?

    There are two ways. Netbeans hooks itself into the GUI input. See src/netbeans.c. The other way is adding something to the select() call. This is in RealWaitForChar() in os_unix.c. Search for FEAT_MOUSE_GPM to see an example.

  • Things for the future, things that are unclassified.

Note: See TracRoadmap for help on using the roadmap.
'