🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Richard Lefebvre Tue, 30 Jun 1992 17:30
Using xmenu toolkit ??
#1287
Author: Richard Lefebvre
Date: Tue, 30 Jun 1992 17:30
15 lines
1420 bytes
I would like to use the xmenu toolkit, but I don't have a clue how to
create a lisp file for it, could someone post, or email me a sample of
a lisp file that used xmenu.  Thanx

rick

-- 
==============================================================================
=                                                                            =
= Richard Lefebvre                                                     CERCA =
= Email: Rick@CERCA.UMontreal.CA      CEntre de Recherche en Calcul Applique =
= tel: (514)369-5224                          5160 Boul. Decarie, bureau 400 =
= fax: (514)369-3880                                        Montreal H3X 2H9 =
=                                                                            =
==============================================================================
Using xmenu toolkit ??
#1289
Author: Marc Andreessen
Date: Tue, 30 Jun 1992 09:03
75 lines
2631 bytes
This is a modified version of a small package Thierry Cambon posted a
while back; all I use it for is to pop up a menu of buffers.

Marc


;;;
;;; xmenu.el
;;; provide an interface to Richard Hess' xmenu for xemacs & epoch
;;; 
;;; part of the code is taken from the x-buffer-menu function in x-mouse.el 
;;; and from the Epoch FAQ example by Philippe Bondono
;;;
;;; Control-mouse-left will pop up a menu in the current window
;;;   with two submenus (submenus and entries can be added in the 
;;;   sp macro below)
;;;
;;; Thierry Cambon (T.Cambon@frcl.bull.fr)
;;;

(defun create-buffer-menu-entry (buffer)
  (concat buffer "=" "switch-to-buffer " buffer))

(defun create-buffer-menu-entry-list ()
  (mapcar 'create-buffer-menu-entry
	  (let ((tail (buffer-list))
		head)
	    (while tail
	      (let ((elt (car tail)))
		(if (not (string-match "^ "
				       (buffer-name elt)))
		    (setq head (cons
				(format
				 "%s"
				 (buffer-name elt))
				head))))
	      (setq tail (cdr tail)))
	    (reverse head))))

(defun interpret-output (process output)
  (let ((com (read-from-string output)))
    (if (>= (cdr com) (length output))
	(funcall (car com))
      (funcall (car com) (substring output (cdr com) -1)))))

(defmacro sp-old ()
  (` (start-process "xmenu" nil
		     "/usr/local/bin/xmenu" "-heading" "Epoch Menu"
		     "-menu" "Tools" 
		             "Undo=undo" 
			     "Dired=dired-other-screen"
	             "-unem"
		     "-menu" "Buffers"
		             (,@ (create-buffer-menu-entry-list)) 
                     "-unem")))

(defmacro sp ()
  (` (start-process "xmenu" nil
		     "/usr/local/bin/xmenu" "-heading" "Epoch Buffers"
                     (,@ (create-buffer-menu-entry-list)) )))

(defun make-menu (arg)
  (interactive)
  (set-process-filter (sp)
    'interpret-output))

(global-set-mouse mouse-left mouse-control 'make-menu)

Marc

--
Marc Andreessen
Epoch Development Team
University of Illinois at Urbana-Champaign
marca@ncsa.uiuc.edu
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads