Gnus development mailing list
 help / color / mirror / Atom feed
From: Per Abrahamsen <abraham@dina.kvl.dk>
Subject: Re: Message Mode Popup Menu for XEmacs
Date: 06 May 1996 09:42:13 +0200	[thread overview]
Message-ID: <rj4tpuz1re.fsf@kleene.dina.kvl.dk> (raw)
In-Reply-To: Steven L Baur's message of 05 May 1996 15:11:48 -0700


This code should make the menu portable and simplify the code.

It is relative to 0.81.

Mon May  6 09:16:02 1996  Per Abrahamsen  <abraham@dina.kvl.dk>

	* message.el (message-mode-map): Do not bind button3.
	(message-mode-menu): Use easymenu.
	(message-mode): Call `easy-menu-add'.
	(message-make-menu-bar): Deleted.

	* message-xmas.el (message-mode-menu): Deleted.

cd ~/emacs/sgnus-0.81/lisp/
diff -c message.el~ message.el
*** message.el~	Mon May  6 01:44:12 1996
--- message.el	Mon May  6 09:20:59 1996
***************
*** 34,39 ****
--- 34,40 ----
  (require 'mail-header)
  (require 'nnheader)
  (require 'timezone)
+ (require 'easymenu)
  
  ;;;###autoload
  (defvar message-fcc-handler-function 'rmail-output
***************
*** 376,409 ****
  (defvar message-sent-hook nil
    "Hook run after sending messages.")
  
- (if (string-match "XEmacs\\|Lucid" emacs-version)
-     (defvar message-mode-menu
-       '("Send Message"
- 	"Go to Field:"
- 	"----"
- 	["To:" message-goto-to t]
- 	["Subject:" message-goto-subject t]
- 	["Summary:" message-goto-summary t]
- 	["Keywords:" message-goto-keywords t]
- 	["Newsgroups:" message-goto-newsgroups t]
- 	["Followup-To:" message-goto-followup-to t]
- 	["Distribution:" message-goto-distribution t]
- 	["Body" message-goto-body t]
- 	["Signature" message-goto-signature t]
- 	"----"
- 	"Miscellaneous Commands:"
- 	"----"
- 	["Sort Headers" message-sort-headers t]
- 	["Yank Original" message-yank-original t]
- 	["Fill Yanked Message" message-fill-yanked-message t]
- ;;  ["Insert Signature"         news-reply-signature     t]
- 	["Caesar (rot13) Message" message-caesar-buffer-body t]
- 	"----"
- 	["Post Message" message-send-and-exit t]
- 	["Abort Message" message-dont-send t]
- 	)
-       "Buffer Menu for XEmacs."))
- 
  ;;; Internal variables.
  
  ;;; Regexp matching the delimiter of messages in UNIX mail format
--- 377,382 ----
***************
*** 699,714 ****
  
    (define-key message-mode-map "\C-c\C-c" 'message-send-and-exit)
    (define-key message-mode-map "\C-c\C-s" 'message-send)
!   (define-key message-mode-map "\C-c\C-k" 'message-dont-send)
!   (if (string-match "XEmacs\\|Lucid" emacs-version)
!       (define-key message-mode-map 'button3 'message-mode-menu)))
! 
! (defun message-make-menu-bar ()
!   (unless (boundp 'message-menu)
!     (easy-menu-define
!      message-menu message-mode-map ""
!      '("Message"
!        ["Fill Citation" message-fill-yanked-message t]))))
  
  ;;;###autoload
  (defun message-mode ()
--- 672,704 ----
  
    (define-key message-mode-map "\C-c\C-c" 'message-send-and-exit)
    (define-key message-mode-map "\C-c\C-s" 'message-send)
!   (define-key message-mode-map "\C-c\C-k" 'message-dont-send))
! 
! (easy-menu-define message-mode-menu message-mode-map
!   "Message Menu."
!   '("Message"
!     "Go to Field:"
!     "----"
!     ["To:" message-goto-to t]
!     ["Subject:" message-goto-subject t]
!     ["Summary:" message-goto-summary t]
!     ["Keywords:" message-goto-keywords t]
!     ["Newsgroups:" message-goto-newsgroups t]
!     ["Followup-To:" message-goto-followup-to t]
!     ["Distribution:" message-goto-distribution t]
!     ["Body" message-goto-body t]
!     ["Signature" message-goto-signature t]
!     "----"
!     "Miscellaneous Commands:"
!     "----"
!     ["Sort Headers" message-sort-headers t]
!     ["Yank Original" message-yank-original t]
!     ["Fill Yanked Message" message-fill-yanked-message t]
!     ;;  ["Insert Signature"         news-reply-signature     t]
!     ["Caesar (rot13) Message" message-caesar-buffer-body t]
!     "----"
!     ["Post Message" message-send-and-exit t]
!     ["Abort Message" message-dont-send t]))
  
  ;;;###autoload
  (defun message-mode ()
***************
*** 774,779 ****
--- 764,770 ----
      (mail-hist-define-keys))
    (when (string-match "XEmacs\\|Lucid" emacs-version)
      (message-setup-toolbar))
+   (easy-menu-add message-mode-menu message-mode-map)
    (run-hooks 'text-mode-hook 'message-mode-hook))
  
  \f
***************
*** 2567,2573 ****
         (if (eq (following-char) (char-after (- (point) 2)))
  	   (delete-char -2))))))
  
! ;; Support for Mouse menus
  (when (string-match "XEmacs\\|Lucid" emacs-version)
    (require 'message-xmas))
  
--- 2558,2564 ----
         (if (eq (following-char) (char-after (- (point) 2)))
  	   (delete-char -2))))))
  
! ;; Support for toolbar
  (when (string-match "XEmacs\\|Lucid" emacs-version)
    (require 'message-xmas))
  
diff -c message-xmas.el_ORIG message-xmas.el
*** message-xmas.el_ORIG	Mon May  6 01:44:10 1996
--- message-xmas.el	Mon May  6 09:14:54 1996
***************
*** 96,107 ****
         (set-specifier (symbol-value message-use-toolbar)
  		      (cons (current-buffer) message-toolbar))))
  
- (defun message-mode-menu (event)
-   (interactive "e")
-   (select-window (event-window event))
-   (let ((popup-menu-titles nil))
-     (popup-menu 'message-mode-menu)))
- 
  (provide 'message-xmas)
  
  ;;; message-xmas.el ends here
--- 96,101 ----

Compilation exited abnormally with code 1 at Mon May  6 09:21:54


      reply	other threads:[~1996-05-06  7:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-05-05 22:11 Steven L Baur
1996-05-06  7:42 ` Per Abrahamsen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=rj4tpuz1re.fsf@kleene.dina.kvl.dk \
    --to=abraham@dina.kvl.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).