comparison lisp/menu-bar.el @ 5473:e080a27c1dd6

(mouse-menu-choose-yank): Don't use rotate-yank-pointer; set kill-ring-yank-pointer explicitly instead.
author Roland McGrath <roland@gnu.org>
date Thu, 06 Jan 1994 16:49:05 +0000
parents 1136488153c0
children bf68550ececf
comparison
equal deleted inserted replaced
5472:ed690a728e13 5473:e080a27c1dd6
1 ;;; menu-bar.el --- define a default menu bar. 1 ;;; menu-bar.el --- define a default menu bar.
2 2
3 ;; Author: RMS 3 ;; Author: RMS
4 ;; Keywords: internal 4 ;; Keywords: internal
5 5
6 ;; Copyright (C) 1993 Free Software Foundation, Inc. 6 ;; Copyright (C) 1993, 1994 Free Software Foundation, Inc.
7 7
8 ;; This file is part of GNU Emacs. 8 ;; This file is part of GNU Emacs.
9 9
10 ;; GNU Emacs is free software; you can redistribute it and/or modify 10 ;; GNU Emacs is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by 11 ;; it under the terms of the GNU General Public License as published by
164 ;; A mouse click outside the menu returns nil. 164 ;; A mouse click outside the menu returns nil.
165 ;; Avoid a confusing error from passing nil to rotate-yank-pointer. 165 ;; Avoid a confusing error from passing nil to rotate-yank-pointer.
166 ;; XXX should this perhaps do something other than simply return? -rm 166 ;; XXX should this perhaps do something other than simply return? -rm
167 (if arg 167 (if arg
168 (progn 168 (progn
169 (rotate-yank-pointer arg) 169 ;; We don't use `rotate-yank-pointer' because we want to move
170 ;; relative to the beginning of kill-ring, not the current
171 ;; position. Also, that would ask for any new X selection and
172 ;; thus change the list of items the user just chose from, which
173 ;; would be highly confusing.
174 (setq kill-ring-yank-pointer (nthcdr arg kill-ring))
170 (if (interactive-p) 175 (if (interactive-p)
171 (message "The next yank will insert the selected text.") 176 (message "The next yank will insert the selected text.")
172 (current-kill 0)))))) 177 (current-kill 0))))))
173 (put 'mouse-menu-choose-yank 'menu-enable 'kill-ring) 178 (put 'mouse-menu-choose-yank 'menu-enable 'kill-ring)
174 179