Mercurial > hg > xemacs-beta
comparison lisp/hm--html-menus/hm--html-menu.el @ 46:6a22abad6937 r19-15
Import from CVS: tag r19-15
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:55:31 +0200 |
parents | 8b8b7f3559a2 |
children | 131b0175ea99 |
comparison
equal
deleted
inserted
replaced
45:7705b7aa3b8a | 46:6a22abad6937 |
---|---|
1 ;;; hm--html-menu --- A menu for the hm--html-mode. | 1 ;;; hm--html-menu --- A menu for the hm--html-mode. |
2 ;;; | 2 ;;; |
3 ;;; $Id: hm--html-menu.el,v 1.5 1997/03/24 01:26:52 steve Exp $ | 3 ;;; $Id: hm--html-menu.el,v 1.6 1997/03/26 22:42:38 steve Exp $ |
4 ;;; | 4 ;;; |
5 ;;; Copyright (C) 1993 - 1997 Heiko Muenkel | 5 ;;; Copyright (C) 1993 - 1997 Heiko Muenkel |
6 ;;; email: muenkel@tnt.uni-hannover.de | 6 ;;; email: muenkel@tnt.uni-hannover.de |
7 ;;; | 7 ;;; |
8 ;;; This program is free software; you can redistribute it and/or modify | 8 ;;; This program is free software; you can redistribute it and/or modify |
62 ["Gopher link..." hm--html-add-gopher-link t] | 62 ["Gopher link..." hm--html-add-gopher-link t] |
63 ["File link..." hm--html-add-file-link t] | 63 ["File link..." hm--html-add-file-link t] |
64 "----" | 64 "----" |
65 ["Ftp link..." hm--html-add-ftp-link t] | 65 ["Ftp link..." hm--html-add-ftp-link t] |
66 ["News link..." hm--html-add-news-link t] | 66 ["News link..." hm--html-add-news-link t] |
67 ["Mailbox link..." hm--html-add-mail-link t] | 67 ["Mailbox link..." hm--html-add-mail-box-link t] |
68 ["Mailto link..." hm--html-add-mailto-link t] | 68 ["Mailto link..." hm--html-add-mailto-link t] |
69 ["Wais link (direct)..." hm--html-add-direct-wais-link t] | 69 ["Wais link (direct)..." hm--html-add-direct-wais-link t] |
70 ["Wais link (gateway)..." hm--html-add-wais-link t] | 70 ["Wais link (gateway)..." hm--html-add-wais-link t] |
71 "----" | 71 "----" |
72 ["Proggate link..." hm--html-add-proggate-link t] | 72 ["Proggate link..." hm--html-add-proggate-link t] |
310 ["Gopher link..." hm--html-add-gopher-link-to-region t] | 310 ["Gopher link..." hm--html-add-gopher-link-to-region t] |
311 ["File link..." hm--html-add-file-link-to-region t] | 311 ["File link..." hm--html-add-file-link-to-region t] |
312 "----" | 312 "----" |
313 ["Ftp link..." hm--html-add-ftp-link-to-region t] | 313 ["Ftp link..." hm--html-add-ftp-link-to-region t] |
314 ["News link..." hm--html-add-news-link-to-region t] | 314 ["News link..." hm--html-add-news-link-to-region t] |
315 ["Mailbox link..." hm--html-add-mail-link-to-region t] | 315 ["Mailbox link..." hm--html-add-mail-box-link-to-region t] |
316 ["Mailto link..." hm--html-add-mailto-link-to-region t] | 316 ["Mailto link..." hm--html-add-mailto-link-to-region t] |
317 ["WAIS link (direct)..." hm--html-add-direct-wais-link-to-region t] | 317 ["WAIS link (direct)..." hm--html-add-direct-wais-link-to-region t] |
318 ["WAIS link (gateway)..." hm--html-add-wais-link-to-region t] | 318 ["WAIS link (gateway)..." hm--html-add-wais-link-to-region t] |
319 "----" | 319 "----" |
320 ["Proggate link..." hm--html-add-proggate-link-to-region t] | 320 ["Proggate link..." hm--html-add-proggate-link-to-region t] |
532 (if (adapt-xemacsp) | 532 (if (adapt-xemacsp) |
533 (defun hm--install-html-menu (menu-name) | 533 (defun hm--install-html-menu (menu-name) |
534 (if (and current-menubar (not (assoc menu-name current-menubar))) | 534 (if (and current-menubar (not (assoc menu-name current-menubar))) |
535 (progn | 535 (progn |
536 (set-buffer-menubar (copy-sequence current-menubar)) | 536 (set-buffer-menubar (copy-sequence current-menubar)) |
537 (add-submenu nil (cons menu-name (cdr hm--html-pulldown-menu)) "HTML")))) | 537 (add-submenu nil |
538 (cons menu-name (cdr hm--html-pulldown-menu)) | |
539 "HTML")))) | |
538 | 540 |
539 (defun hm--install-html-menu (menu-name) | 541 (defun hm--install-html-menu (menu-name) |
540 (if (eq major-mode 'hm--html-mode) | 542 (if (eq major-mode 'hm--html-mode) |
541 (easy-menu-define hm--html-menu-map | 543 (easy-menu-define hm--html-menu-map |
542 hm--html-mode-map | 544 hm--html-mode-map |
686 (popup-menu (append hm--html-popup-menu ; for the hm--html-menu | 688 (popup-menu (append hm--html-popup-menu ; for the hm--html-menu |
687 (list "==" ; | 689 (list "==" ; |
688 (car menudesc) ; | 690 (car menudesc) ; |
689 "==") ; | 691 "==") ; |
690 (cdr menudesc))) ; | 692 (cdr menudesc))) ; |
691 (while (popup-menu-up-p) | 693 (while (popup-up-p) |
692 (setq event (next-command-event event)) | 694 (setq event (next-command-event event)) |
693 (cond ((menu-event-p event) | 695 (cond ((misc-user-event-p event) |
694 (cond | 696 (cond |
695 ((eq (event-object event) 'abort) | 697 ((eq (event-object event) 'abort) |
696 (signal 'quit nil)) | 698 (signal 'quit nil)) |
697 ((eq (event-object event) 'menu-no-selection-hook) | 699 ((eq (event-object event) 'menu-no-selection-hook) |
698 nil) | 700 nil) |