bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#50067: Context menus


From: Tak Kunihiro
Subject: bug#50067: Context menus
Date: Tue, 24 Aug 2021 19:12:59 +0900 (JST)

I started to understand the system.
A plug-in to list frames would be something like this.
I think it is good to have interface to basic utilities such for
recentf and bookmarks.

(defun context-menu-frame (menu)
  "Add MENU a list of frames."
  (let (frame-map)
    (dolist (frame (visible-frame-list))
      (let ((nickname (cdr (assoc 'name (frame-parameters frame))))
            (cmd `(lambda nil (interactive) (funcall 'menu-bar-select-frame 
,frame))))
        (push (vector nickname cmd :active (not (equal frame 
(selected-frame)))) frame-map)))
    (push ["--" ignore] frame-map)
    (push ["New" make-frame-command] frame-map)
    (setq frame-map (reverse frame-map))
    (push "Frames" frame-map)
    (easy-menu-add-item menu nil frame-map)
    menu))





reply via email to

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