emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: poplife-mode


From: Tak Kunihiro
Subject: Re: poplife-mode
Date: Mon, 13 Nov 2017 17:11:20 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (windows-nt)

> I like it.  We have a lot of existing code that sort of begs for
> better mouse integration (find-file-at-point, thing-at-point,
> completions buffers, isearch highlights, s-expression/balanced
> expression manipulation, dired listings, ...).  I wonder what others
> think.

I like the long-click too.

I think that a context menu should be created from list of functions
because each person wants to have his own context menu.  I suppose that
the list would look like below.  Each function should return keymap or
nil.  They will be evaluated in the order of the list.  A function
should accept mouse EVENT, and return keymap or nil.  The last candidate
should return valid keymap.

  (defvar poplife-context-candidates
    '(poplife-mouse-file-menu   ; FILE menu
      poplife-mouse-dir-menu    ; DIR menu
      poplife-mouse-word-menu   ; WORD menu
      poplife-mouse-url-menu    ; URL menu
      poplife-mouse-edit-menu)) ; EDIT menu (default)

  (1) FILE menu -- Pop how-to-open-a-file menu.  The file is detected
                   by find-file-at-point.
  (2) DIR menu  -- Pop files in a directory.  The directory is detected
                   by find-file-at-point.
  (3) WORD menu -- Pop words by #'flyspell-correct-word
                   when face of a word under a mouse is flyspell-incorrect.
  (4) URL menu  -- Pop how-to-open-an-url menu.  The url is detected
                   by thing-at-point-url-at-point.
  (5) EDIT menu -- Pop edit-menu with extra commands.  This menu can be
                   gigantic.

Note that this is just an example.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]