Now on revision 112198. ------------------------------------------------------------ revno: 112198 committer: Dmitry Antipov branch nick: trunk timestamp: Sun 2013-03-31 09:45:54 +0400 message: * frame.h (struct frame): Drop scroll_bottom_vpos member becaue all real users are dead long ago. (FRAME_SCROLL_BOTTOM_VPOS): Remove. * xdisp.c (redisplay_internal): Adjust user. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-03-30 16:57:02 +0000 +++ src/ChangeLog 2013-03-31 05:45:54 +0000 @@ -1,3 +1,10 @@ +2013-03-31 Dmitry Antipov + + * frame.h (struct frame): Drop scroll_bottom_vpos + member becaue all real users are dead long ago. + (FRAME_SCROLL_BOTTOM_VPOS): Remove. + * xdisp.c (redisplay_internal): Adjust user. + 2013-03-30 Darren Ho (tiny change) * nsmenu.m (showAtX:Y:for:): setLevel to === modified file 'src/frame.h' --- src/frame.h 2013-03-22 12:41:34 +0000 +++ src/frame.h 2013-03-31 05:45:54 +0000 @@ -427,10 +427,6 @@ /* Width of bar cursor (if we are using that) for blink-off state. */ int blink_off_cursor_width; - /* Nonnegative if current redisplay should not do scroll computation - for lines beyond a certain vpos. This is the vpos. */ - int scroll_bottom_vpos; - /* Configured width of the scroll bar, in pixels and in characters. config_scroll_bar_cols tracks config_scroll_bar_width if the latter is positive; a zero value in config_scroll_bar_width means @@ -785,7 +781,6 @@ #define FRAME_DELETE_COST(f) (f)->delete_line_cost #define FRAME_INSERTN_COST(f) (f)->insert_n_lines_cost #define FRAME_DELETEN_COST(f) (f)->delete_n_lines_cost -#define FRAME_SCROLL_BOTTOM_VPOS(f) (f)->scroll_bottom_vpos #define FRAME_FOCUS_FRAME(f) f->focus_frame /* This frame slot says whether scroll bars are currently enabled for frame F, === modified file 'src/xdisp.c' --- src/xdisp.c 2013-03-29 15:50:21 +0000 +++ src/xdisp.c 2013-03-31 05:45:54 +0000 @@ -12948,8 +12948,6 @@ unbind_to (count1, Qnil); - FRAME_SCROLL_BOTTOM_VPOS (XFRAME (w->frame)) = -1; - consider_all_windows_p = (update_mode_lines || buffer_shared_and_changed () || cursor_type_changed); ------------------------------------------------------------ revno: 112197 committer: Aidan Gauland branch nick: trunk timestamp: Sun 2013-03-31 08:31:27 +1300 message: Use present tense in ChangeLog entries. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2013-03-30 08:14:31 +0000 +++ doc/misc/ChangeLog 2013-03-30 19:31:27 +0000 @@ -1,6 +1,6 @@ 2013-03-27 Aidan Gauland - * eshell.texi: Updated manual to reflect changes. + * eshell.texi (Built-ins): Update manual to mention tramp module. 2013-03-18 Michael Albinus @@ -2415,8 +2415,7 @@ 2013-02-18 Aidan Gauland - * eshell.texi: Added documentation for Eshell insert - output redirection operator, >>>. + * eshell.texi (Input/Output): Document insert output redirection operator, >>>. 2011-02-18 Glenn Morris === modified file 'etc/ChangeLog' --- etc/ChangeLog 2013-03-30 13:49:00 +0000 +++ etc/ChangeLog 2013-03-30 19:31:27 +0000 @@ -4,7 +4,7 @@ 2013-03-29 Aidan Gauland - * NEWS: Added entry for em-tramp change in r112148 + * NEWS (Eshell): New entry for em-tramp change in r112148 2013-03-21 Eric Ludlam === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-03-30 16:55:47 +0000 +++ lisp/ChangeLog 2013-03-30 19:31:27 +0000 @@ -80,7 +80,7 @@ 2013-03-27 Aidan Gauland - * eshell/em-unix.el: Moved su and sudo to... + * eshell/em-unix.el: Move su and sudo to... * eshell/em-tramp.el: ...Eshell tramp module 2013-03-26 Stefan Monnier @@ -1083,8 +1083,8 @@ 2013-02-18 Aidan Gauland - * eshell/em-cmpl.el: Corrected "context-related help" - keybinding in commentary. + * eshell/em-cmpl.el: Correct "context-related help" keybinding in + commentary. 2013-02-18 Michael Heerdegen ------------------------------------------------------------ revno: 112196 committer: Paul Eggert branch nick: trunk timestamp: Sat 2013-03-30 10:30:06 -0700 message: Merge from gnulib This incorporates: 2013-03-29 stdalign: port to stricter ISO C11 This helps to run 'configure' on MS-Windows; see Eli Zaretskii in . diff: === modified file 'ChangeLog' --- ChangeLog 2013-03-30 08:14:31 +0000 +++ ChangeLog 2013-03-30 17:30:06 +0000 @@ -1,3 +1,10 @@ +2013-03-30 Paul Eggert + + Merge from gnulib, incorporating: + 2013-03-29 stdalign: port to stricter ISO C11 + This helps to run 'configure' on MS-Windows; see Eli Zaretskii in + . + 2013-03-27 Paul Eggert * configure.ac (HAVE_XKBGETKEYBOARD): Remove. === modified file 'm4/stdalign.m4' --- m4/stdalign.m4 2013-01-01 09:11:05 +0000 +++ m4/stdalign.m4 2013-03-30 17:30:06 +0000 @@ -33,8 +33,9 @@ #if \ (__GNUC__ || __IBMC__ || __IBMCPP__ \ || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER) - int alignas (8) alignas_int = 1; - char test_alignas[_Alignof (alignas_int) == 8 ? 1 : -1]; + struct alignas_test { char c; char alignas (8) alignas_8; }; + char test_alignas[offsetof (struct alignas_test, alignas_8) == 8 + ? 1 : -1]; #endif ]])], [gl_cv_header_working_stdalign_h=yes], ------------------------------------------------------------ revno: 112195 committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-03-30 09:57:02 -0700 message: ChangeLog whitespace fix diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-03-30 10:18:48 +0000 +++ src/ChangeLog 2013-03-30 16:57:02 +0000 @@ -1,4 +1,5 @@ -2013-03-30 Darren Ho (tiny change). +2013-03-30 Darren Ho (tiny change) + * nsmenu.m (showAtX:Y:for:): setLevel to NSPopUpMenuWindowLevel (Bug#13998). ------------------------------------------------------------ revno: 112194 [merge] committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-03-30 09:55:47 -0700 message: Merge from emacs-24; up to r111341 diff: === modified file 'etc/srecode/ede-autoconf.srt' --- etc/srecode/ede-autoconf.srt 2013-03-30 16:36:22 +0000 +++ etc/srecode/ede-autoconf.srt 2013-03-30 16:55:47 +0000 @@ -1,21 +1,23 @@ -;; ede/templates/autoconf.srt --- Templates for autoconf used by EDE. -;; +;;; ede/templates/autoconf.srt --- Templates for autoconf used by EDE + ;; Copyright (C) 2010, 2012-2013 Free Software Foundation, Inc. -;; + ;; Author: Eric M. Ludlam -;; -;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation; either version 2, or (at -;; your option) any later version. - -;; This program is distributed in the hope that it will be useful, but -;; WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . +;; along with GNU Emacs. If not, see . set mode "autoconf-mode" set escape_start "{{" === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-03-30 13:49:00 +0000 +++ lisp/ChangeLog 2013-03-30 16:55:47 +0000 @@ -1,3 +1,19 @@ +2013-03-30 Fabián Ezequiel Gallina + + Un-indent after "pass" and "return" statements (Bug#13888) + * progmodes/python.el (python-indent-block-enders): New var. + (python-indent-calculate-indentation): Use it. + +2013-03-30 Michael Albinus + + * net/tramp.el (tramp-drop-volume-letter): Make it an ordinary + defun. Defining it as defalias could introduce too eager + byte-compiler optimization. (Bug#14030) + +2013-03-30 Chong Yidong + + * iswitchb.el (iswitchb-read-buffer): Fix typo. + 2013-03-30 Leo Liu * kmacro.el (kmacro-call-macro): Add optional arg MACRO. === modified file 'lisp/iswitchb.el' --- lisp/iswitchb.el 2013-02-15 19:19:29 +0000 +++ lisp/iswitchb.el 2013-03-30 16:55:47 +0000 @@ -597,7 +597,7 @@ ;; The map is generated every time so that it can inherit new ;; functions. (let ((map (copy-keymap minibuffer-local-map)) - buf-sel iswitchb-final-text map + buf-sel iswitchb-final-text icomplete-mode) ; prevent icomplete starting up (define-key map "?" 'iswitchb-completion-help) (define-key map "\C-s" 'iswitchb-next-match) === modified file 'lisp/net/tramp.el' --- lisp/net/tramp.el 2013-03-18 13:04:13 +0000 +++ lisp/net/tramp.el 2013-03-30 16:55:47 +0000 @@ -1660,23 +1660,16 @@ (tramp-compat-font-lock-add-keywords 'emacs-lisp-mode '("\\")) -(defalias 'tramp-drop-volume-letter - (if (memq system-type '(cygwin windows-nt)) - (lambda (name) - "Cut off unnecessary drive letter from file NAME. +(defun tramp-drop-volume-letter (name) + "Cut off unnecessary drive letter from file NAME. The functions `tramp-*-handle-expand-file-name' call `expand-file-name' locally on a remote file name. When the local system is a W32 system but the remote system is Unix, this introduces a superfluous drive letter into the file name. This function removes it." - (save-match-data - (if (string-match "\\`[a-zA-Z]:/" name) - (replace-match "/" nil t name) - name))) - - 'identity)) - -(if (featurep 'xemacs) - (defalias 'tramp-drop-volume-letter 'identity)) + (save-match-data + (if (string-match "\\`[a-zA-Z]:/" name) + (replace-match "/" nil t name) + name))) (defun tramp-cleanup (vec) "Cleanup connection VEC, but keep the debug buffer." === modified file 'lisp/profiler.el' --- lisp/profiler.el 2013-02-05 02:12:58 +0000 +++ lisp/profiler.el 2013-03-30 16:55:47 +0000 @@ -5,18 +5,20 @@ ;; Author: Tomohiro Matsuyama ;; Keywords: lisp -;; This program is free software; you can redistribute it and/or modify +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. -;; This program is distributed in the hope that it will be useful, +;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: === modified file 'lisp/progmodes/python.el' --- lisp/progmodes/python.el 2013-02-21 16:56:49 +0000 +++ lisp/progmodes/python.el 2013-03-30 16:55:47 +0000 @@ -638,6 +638,12 @@ These make `python-indent-calculate-indentation' subtract the value of `python-indent-offset'.") +(defvar python-indent-block-enders '("return" "pass") + "List of words that mark the end of a block. +These make `python-indent-calculate-indentation' subtract the +value of `python-indent-offset' when `python-indent-context' is +AFTER-LINE.") + (defun python-indent-guess-indent-offset () "Guess and set `python-indent-offset' for the current buffer." (interactive) @@ -763,9 +769,13 @@ (save-excursion (goto-char context-start) (current-indentation)) - (if (progn - (back-to-indentation) - (looking-at (regexp-opt python-indent-dedenters))) + (if (or (save-excursion + (back-to-indentation) + (looking-at (regexp-opt python-indent-dedenters))) + (save-excursion + (python-util-forward-comment -1) + (python-nav-beginning-of-statement) + (member (current-word) python-indent-block-enders))) python-indent-offset 0))) ;; When inside of a string, do nothing. just use the current === modified file 'test/ChangeLog' --- test/ChangeLog 2013-03-11 16:31:55 +0000 +++ test/ChangeLog 2013-03-30 16:55:47 +0000 @@ -1,3 +1,8 @@ +2013-03-30 Fabián Ezequiel Gallina + + * automated/python-tests.el (python-indent-block-enders): New test. + (python-info-current-defun-2): Fix test. + 2013-03-05 Paul Eggert * indent/octave.m: Fix encoding error in comment. Add coding tag. === modified file 'test/automated/python-tests.el' --- test/automated/python-tests.el 2013-02-28 06:30:48 +0000 +++ test/automated/python-tests.el 2013-03-30 16:55:47 +0000 @@ -444,6 +444,28 @@ (should (eq (car (python-indent-context)) 'after-line)) (should (= (python-indent-calculate-indentation) 0)))) +(ert-deftest python-indent-block-enders () + "Test `python-indent-block-enders' value honouring." + (python-tests-with-temp-buffer + " +Class foo(object): + + def bar(self): + if self.baz: + return (1, + 2, + 3) + + else: + pass +" + (python-tests-look-at "3)") + (forward-line 1) + (= (python-indent-calculate-indentation) 12) + (python-tests-look-at "pass") + (forward-line 1) + (= (python-indent-calculate-indentation) 8))) + ;;; Navigation @@ -1546,13 +1568,13 @@ return [] def b(): - pass + do_b() def a(): - pass + do_a() def c(self): - pass + do_c() " (forward-line 1) (should (string= "C" (python-info-current-defun))) @@ -1582,7 +1604,7 @@ (python-tests-look-at "def c(self):") (should (string= "C.c" (python-info-current-defun))) (should (string= "def C.c" (python-info-current-defun t))) - (python-tests-look-at "pass") + (python-tests-look-at "do_c()") (should (string= "C.c" (python-info-current-defun))) (should (string= "def C.c" (python-info-current-defun t))))) ------------------------------------------------------------ revno: 112193 committer: Paul Eggert branch nick: trunk timestamp: Sat 2013-03-30 09:47:07 -0700 message: * emacs/emacs.texi: Fix alphabetization of "O'Connor". diff: === modified file 'doc/emacs/emacs.texi' --- doc/emacs/emacs.texi 2013-03-17 22:55:13 +0000 +++ doc/emacs/emacs.texi 2013-03-30 16:47:07 +0000 @@ -1374,7 +1374,7 @@ Bill Carpenter, Per Cederqvist, Hans Chalupsky, Chris Chase, Bob Chassell, Andrew Choi, Chong Yidong, Sacha Chua, Stewart Clamen, James Clark, Mike Clarkson, Glynn Clements, Andrew Cohen, Daniel Colascione, -Edward O'Connor, Christoph Conrad, Ludovic Courtès, Andrew Csillag, +Christoph Conrad, Ludovic Courtès, Andrew Csillag, Toby Cubitt, Baoqiu Cui, Doug Cutting, Mathias Dahl, Julien Danjou, Satyaki Das, Vivek Dasmohapatra, Dan Davison, Michael DeCorte, Gary Delp, Nachum Dershowitz, Dave Detlefs, Matthieu Devin, Christophe de Dinechin, Eri @@ -1421,7 +1421,7 @@ Don Morrison, Diane Murray, Riccardo Murri, Sen Nagata, Erik Naggum, Gergely Nagy, Nobuyoshi Nakada, Thomas Neumann, Mike Newton, Thien-Thi Nguyen, Jurgen Nickelsen, Dan Nicolaescu, Hrvoje Niksic, Jeff Norden, -Andrew Norman, Kentaro Ohkouchi, Christian Ohler, +Andrew Norman, Edward O'Connor, Kentaro Ohkouchi, Christian Ohler, Kenichi Okada, Alexandre Oliva, Bob Olson, Michael Olson, Takaaki Ota, Pieter E. J. Pareit, Ross Patterson, David Pearson, Juan Pechiar, Jeff Peck, Damon Anton Permezel, Tom Perrine, William M. Perry, Per ------------------------------------------------------------ revno: 112192 committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-03-30 09:36:22 -0700 message: Add 2012 to copyright years diff: === modified file 'etc/srecode/ede-autoconf.srt' --- etc/srecode/ede-autoconf.srt 2013-03-21 22:11:03 +0000 +++ etc/srecode/ede-autoconf.srt 2013-03-30 16:36:22 +0000 @@ -1,6 +1,6 @@ ;; ede/templates/autoconf.srt --- Templates for autoconf used by EDE. ;; -;; Copyright (C) 2010, 2013 Free Software Foundation, Inc. +;; Copyright (C) 2010, 2012-2013 Free Software Foundation, Inc. ;; ;; Author: Eric M. Ludlam ;; ------------------------------------------------------------ revno: 112191 committer: Leo Liu branch nick: trunk timestamp: Sat 2013-03-30 21:49:00 +0800 message: * etc/NEWS: Mention `kmacro-to-register' and new eldoc feature. * lisp/kmacro.el (kmacro-call-macro): Add optional arg MACRO. (kmacro-execute-from-register): Pass the keyboard macro to kmacro-call-macro or repeating won't work correctly. diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2013-03-30 08:14:31 +0000 +++ etc/ChangeLog 2013-03-30 13:49:00 +0000 @@ -1,3 +1,7 @@ +2013-03-30 Leo Liu + + * NEWS: Mention `kmacro-to-register' and new eldoc feature. + 2013-03-29 Aidan Gauland * NEWS: Added entry for em-tramp change in r112148 === modified file 'etc/NEWS' --- etc/NEWS 2013-03-29 07:12:11 +0000 +++ etc/NEWS 2013-03-30 13:49:00 +0000 @@ -82,6 +82,8 @@ ** In keymaps where SPC scrolls, S-SPC now scrolls in the reverse direction. Eg View mode, etc. +** New command `kmacro-to-register' to store keyboard macros in registers. + * Changes in Specialized Modes and Packages in Emacs 24.4 @@ -111,6 +113,8 @@ use `electric-indent-mode' instead. *** `delphi-tab' is gone, replaced by `indent-for-tab-command'. +** Eldoc Mode works properly in the minibuffer. + ** jit-lock-debug-mode lets you use the debuggers on code run via jit-lock. ** completing-read-multiple's separator can now be a regexp. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-03-30 08:14:31 +0000 +++ lisp/ChangeLog 2013-03-30 13:49:00 +0000 @@ -1,3 +1,9 @@ +2013-03-30 Leo Liu + + * kmacro.el (kmacro-call-macro): Add optional arg MACRO. + (kmacro-execute-from-register): Pass the keyboard macro to + kmacro-call-macro or repeating won't work correctly. + 2013-03-30 Teodor Zlatanov * progmodes/subword.el: Back to using `forward-symbol'. === modified file 'lisp/kmacro.el' --- lisp/kmacro.el 2013-03-29 14:53:27 +0000 +++ lisp/kmacro.el 2013-03-30 13:49:00 +0000 @@ -614,9 +614,10 @@ ;;;###autoload -(defun kmacro-call-macro (arg &optional no-repeat end-macro) - "Call the last keyboard macro that you defined with \\[kmacro-start-macro]. +(defun kmacro-call-macro (arg &optional no-repeat end-macro macro) + "Call the keyboard MACRO that you defined with \\[kmacro-start-macro]. A prefix argument serves as a repeat count. Zero means repeat until error. +MACRO defaults to `last-kbd-macro'. When you call the macro, you can call the macro again by repeating just the last key in the key sequence that you used to call this @@ -630,7 +631,8 @@ (> (length (this-single-command-keys)) 1)) ;; Used when we're in the process of repeating. (eq no-repeat 'repeating)) - last-input-event))) + last-input-event)) + (last-kbd-macro (or macro last-kbd-macro))) (if end-macro (kmacro-end-macro arg) (call-last-kbd-macro arg #'kmacro-loop-setup-function)) @@ -656,7 +658,7 @@ (define-key map (vector repeat-key) `(lambda () (interactive) (kmacro-call-macro ,(and kmacro-call-repeat-with-arg arg) - 'repeating))) + 'repeating nil ,last-kbd-macro))) map))))) @@ -838,8 +840,7 @@ (defun kmacro-execute-from-register (k) - (let ((last-kbd-macro k)) - (kmacro-call-macro current-prefix-arg))) + (kmacro-call-macro current-prefix-arg nil nil k)) (defun kmacro-to-register (r) "Store the last keyboard macro in register R." @@ -851,10 +852,10 @@ last-kbd-macro :jump-func 'kmacro-execute-from-register :print-func (lambda (k) - (princ (format "a keyboard macro:\n %s" - (format-kbd-macro k)))) + (princ (format "a keyboard macro:\n %s" + (format-kbd-macro k)))) :insert-func (lambda (k) - (insert (format-kbd-macro k)))))) + (insert (format-kbd-macro k)))))) (defun kmacro-view-macro (&optional _arg) ------------------------------------------------------------ revno: 112190 author: Andrew Cohen committer: Katsumi Yamaoka branch nick: trunk timestamp: Sat 2013-03-30 11:40:32 +0000 message: lisp/gnus/nnir.el (nnir-method-default-engines): Fix typo diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-03-29 14:12:58 +0000 +++ lisp/gnus/ChangeLog 2013-03-30 11:40:32 +0000 @@ -1,3 +1,7 @@ +2013-03-30 Andrew Cohen + + * nnir.el (nnir-method-default-engines): Fix typo. + 2013-03-29 Andrew Cohen * nnir.el: Define 'number-sequence for xemacs. === modified file 'lisp/gnus/nnir.el' --- lisp/gnus/nnir.el 2013-03-29 14:12:58 +0000 +++ lisp/gnus/nnir.el 2013-03-30 11:40:32 +0000 @@ -584,7 +584,7 @@ Add an entry here when adding a new search engine.") -(defcustom nnir-method-default-engines '((nnimap . imap) (nttp . gmane)) +(defcustom nnir-method-default-engines '((nnimap . imap) (nntp . gmane)) "*Alist of default search engines keyed by server method." :version "24.1" :group 'nnir ------------------------------------------------------------ revno: 112189 fixes bug: http://debbugs.gnu.org/13998 committer: Jan D. branch nick: trunk timestamp: Sat 2013-03-30 11:18:48 +0100 message: * nsmenu.m (showAtX:Y:for:): setLevel to NSPopUpMenuWindowLevel (Bug#13998). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-03-30 09:57:27 +0000 +++ src/ChangeLog 2013-03-30 10:18:48 +0000 @@ -1,3 +1,7 @@ +2013-03-30 Darren Ho (tiny change). + * nsmenu.m (showAtX:Y:for:): setLevel to + NSPopUpMenuWindowLevel (Bug#13998). + 2013-03-30 Jan Djärv * nsterm.h (ns_get_pending_menu_title, ns_check_menu_open) === modified file 'src/nsmenu.m' --- src/nsmenu.m 2013-03-30 09:57:27 +0000 +++ src/nsmenu.m 2013-03-30 10:18:48 +0000 @@ -1328,6 +1328,7 @@ wr.size = [textField frame].size; [win setFrame: wr display: YES]; + [win setLevel: NSPopUpMenuWindowLevel]; [win orderFront: self]; [win display]; timer = [NSTimer scheduledTimerWithTimeInterval: (float)seconds target: self ------------------------------------------------------------ revno: 112188 fixes bug: http://debbugs.gnu.org/12698 committer: Jan D. branch nick: trunk timestamp: Sat 2013-03-30 10:57:27 +0100 message: * nsmenu.m (ns_update_menubar): Correct NSTRACE. (x_activate_menubar): Update the menu with title that matches ns_get_pending_menu_title, and call ns_check_pending_openmenu. (menuWillOpen:): New method. (menuNeedsUpdate:): Add check for ! COCOA || OSX < 10.5 (Bug#12698). * nsterm.h (ns_get_pending_menu_title, ns_check_menu_open) (ns_check_pending_open_menu): Declare. * nsterm.m (menu_will_open_state, menu_mouse_point) (menu_pending_title): New varaibles. (ns_get_pending_menu_title, ns_check_menu_open) (ns_check_pending_open_menu): New functions. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-03-29 15:50:21 +0000 +++ src/ChangeLog 2013-03-30 09:57:27 +0000 @@ -1,3 +1,20 @@ +2013-03-30 Jan Djärv + + * nsterm.h (ns_get_pending_menu_title, ns_check_menu_open) + (ns_check_pending_open_menu): Declare. + + * nsmenu.m (ns_update_menubar): Correct NSTRACE. + (x_activate_menubar): Update the menu with title that matches + ns_get_pending_menu_title, and call + ns_check_pending_openmenu (Bug#12698). + (menuWillOpen:): New method. + (menuNeedsUpdate:): Add check for ! COCOA || OSX < 10.5 (Bug#12698). + + * nsterm.m (menu_will_open_state, menu_mouse_point) + (menu_pending_title): New varaibles. + (ns_get_pending_menu_title, ns_check_menu_open) + (ns_check_pending_open_menu): New functions. + 2013-03-29 Dmitry Antipov * indent.c (current_column_bol_cache): Remove leftover which is not === modified file 'src/nsmenu.m' --- src/nsmenu.m 2013-03-28 14:04:49 +0000 +++ src/nsmenu.m 2013-03-30 09:57:27 +0000 @@ -88,14 +88,6 @@ ========================================================================== */ -/* FIXME: not currently used, but should normalize with other terms. */ -void -x_activate_menubar (struct frame *f) -{ - fprintf (stderr, "XXX: Received x_activate_menubar event.\n"); -} - - /* Supposed to discard menubar and free storage. Since we share the menubar among frames and update its context for the focused window, there is nothing to do here. */ @@ -138,7 +130,7 @@ long t; #endif - NSTRACE (set_frame_menubar); + NSTRACE (ns_update_menubar); if (f != SELECTED_FRAME ()) return; @@ -512,6 +504,29 @@ ns_update_menubar (f, deep_p, nil); } +void +x_activate_menubar (struct frame *f) +{ + NSArray *a = [[NSApp mainMenu] itemArray]; + /* Update each submenu separatly so ns_update_menubar don't reset + the delegate. */ + int i = 0; + while (i < [a count]) + { + EmacsMenu *menu = (EmacsMenu *)[[a objectAtIndex:i] submenu]; + const char *title = [[menu title] UTF8String]; + if (strcmp (title, ns_get_pending_menu_title ()) == 0) + { + ns_update_menubar (f, true, menu); + break; + } + ++i; + } + ns_check_pending_open_menu (); +} + + + /* ========================================================================== @@ -564,6 +579,14 @@ trackingMenu = ([notification name] == NSMenuDidBeginTrackingNotification ? 1 : 0); } + +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 +- (void)menuWillOpen:(NSMenu *)menu +{ + ns_check_menu_open (menu); +} +#endif + #endif /* delegate method called when a submenu is being opened: run a 'deep' call @@ -591,7 +614,12 @@ if (trackingMenu == 0) return; /*fprintf (stderr, "Updating menu '%s'\n", [[self title] UTF8String]); NSLog (@"%@\n", event); */ - ns_update_menubar (frame, 1, self); +#if ! defined(NS_IMPL_COCOA) || \ + MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5 + /* Don't know how to do this for anything other than OSX >= 10.5 + This is wrong, as it might run Lisp code in the event loop. */ + ns_update_menubar (frame, true, self); +#endif } === modified file 'src/nsterm.h' --- src/nsterm.h 2013-03-16 13:52:12 +0000 +++ src/nsterm.h 2013-03-30 09:57:27 +0000 @@ -792,6 +792,9 @@ extern NSColor *ns_lookup_indexed_color (unsigned long idx, struct frame *f); extern unsigned long ns_index_color (NSColor *color, struct frame *f); extern void ns_free_indexed_color (unsigned long idx, struct frame *f); +extern const char *ns_get_pending_menu_title (); +extern void ns_check_menu_open (NSMenu *menu); +extern void ns_check_pending_open_menu (); #endif /* C access to ObjC functionality */ === modified file 'src/nsterm.m' --- src/nsterm.m 2013-03-28 14:04:49 +0000 +++ src/nsterm.m 2013-03-30 09:57:27 +0000 @@ -228,6 +228,25 @@ NULL, 0, 0 }; +/* + * State for pending menu activation: + * MENU_NONE Normal state + * MENU_PENDING A menu has been clicked on, but has been canceled so we can + * run lisp to update the menu. + * MENU_OPENING Menu is up to date, and the click event is redone so the menu + * will open. + */ +#define MENU_NONE 0 +#define MENU_PENDING 1 +#define MENU_OPENING 2 +static int menu_will_open_state = MENU_NONE; + +/* Saved position for menu click. */ +static CGPoint menu_mouse_point; + +/* Title for the menu to open. */ +static char *menu_pending_title = 0; + /* Convert modifiers in a NeXTstep event to emacs style modifiers. */ #define NS_FUNCTION_KEY_MASK 0x800000 #define NSLeftControlKeyMask (0x000001 | NSControlKeyMask) @@ -3388,6 +3407,77 @@ } #endif +const char * +ns_get_pending_menu_title () +{ + return menu_pending_title; +} + +/* Check if menu open should be cancelled or continued as normal. */ +void +ns_check_menu_open (NSMenu *menu) +{ + /* GNUStep and OSX <= 10.4 does not have cancelTracking. */ +#if defined(NS_IMPL_COCOA) && \ + MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 + + /* Click in menu bar? */ + NSArray *a = [[NSApp mainMenu] itemArray]; + int i; + BOOL found = NO; + for (i = 0; ! found && i < [a count]; i++) + found = menu == [[a objectAtIndex:i] submenu]; + if (found) + { + if (menu_will_open_state == MENU_NONE && emacs_event) + { + NSEvent *theEvent = [NSApp currentEvent]; + struct frame *emacsframe = SELECTED_FRAME (); + + [menu cancelTracking]; + menu_will_open_state = MENU_PENDING; + emacs_event->kind = MENU_BAR_ACTIVATE_EVENT; + EV_TRAILER (theEvent); + + CGEventRef ourEvent = CGEventCreate (NULL); + menu_mouse_point = CGEventGetLocation (ourEvent); + CFRelease (ourEvent); + xfree (menu_pending_title); + menu_pending_title = xstrdup ([[menu title] UTF8String]); + } + else if (menu_will_open_state == MENU_OPENING) + { + menu_will_open_state = MENU_NONE; + } + } +#endif +} + +/* Redo saved menu click if state is MENU_PENDING. */ +void +ns_check_pending_open_menu () +{ +#ifdef NS_IMPL_COCOA + if (menu_will_open_state == MENU_PENDING) + { + CGEventSourceRef source + = CGEventSourceCreate (kCGEventSourceStateHIDSystemState); + + CGEventRef event = CGEventCreateMouseEvent (source, + kCGEventLeftMouseDown, + menu_mouse_point, + kCGMouseButtonLeft); + CGEventSetType (event, kCGEventLeftMouseDown); + CGEventPost (kCGHIDEventTap, event); + CFRelease (event); + CFRelease (source); + + menu_will_open_state = MENU_OPENING; + } +#endif +} + + static int ns_read_socket (struct terminal *terminal, struct input_event *hold_quit) /* -------------------------------------------------------------------------- ------------------------------------------------------------ revno: 112187 committer: Aidan Gauland branch nick: trunk timestamp: Sat 2013-03-30 21:14:31 +1300 message: Moved my ChangeLog entries to the correct ChageLog files. diff: === modified file 'ChangeLog' --- ChangeLog 2013-03-29 07:12:11 +0000 +++ ChangeLog 2013-03-30 08:14:31 +0000 @@ -1,22 +1,8 @@ -2013-03-29 Aidan Gauland - - * etc/NEWS: Added entry for em-tramp change in r112148 - 2013-03-27 Paul Eggert * configure.ac (HAVE_XKBGETKEYBOARD): Remove. Subsumed by HAVE_XKB. All uses changed. -2013-03-27 Aidan Gauland - - * lisp/eshell/em-unix.el: Moved su and sudo to... - * lisp/eshell/em-tramp.el: ...Eshell tramp module - * doc/misc/eshell.texi: Updated manual to reflect changes. - - External su and sudo commands are now the default; the internal, - TRAMP-using variants can still be used by enabling the eshell-tramp - module. - 2013-03-25 Jan Djärv * configure.ac (HAVE_XKB): Define if Xkb is present. @@ -90,11 +76,6 @@ not always needed. (HAVE_DATA_START): New macro. -2013-02-18 Aidan Gauland - - * lisp/eshell/em-cmpl.el: Corrected "context-related help" - keybinding in commentary. - 2013-02-21 Paul Eggert Parallelize documentation builds. @@ -107,11 +88,6 @@ (info-real): Depend on $(INFOS) rather than doing it sequentially. (dvi): Depend on $(DVIS) rather than doing it sequentially. -2013-02-18 Aidan Gauland - - * doc/misc/eshell.texi: Added documentation for Eshell insert - output redirection operator, >>>. - 2013-02-15 Paul Eggert Fix AIX port (Bug#13650). === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2013-03-18 13:07:16 +0000 +++ doc/misc/ChangeLog 2013-03-30 08:14:31 +0000 @@ -1,3 +1,7 @@ +2013-03-27 Aidan Gauland + + * eshell.texi: Updated manual to reflect changes. + 2013-03-18 Michael Albinus * tramp.texi (Filename Syntax): Host names are not allowed to be @@ -2409,6 +2413,11 @@ dired-add-entry, dired-initial-position, dired-clean-up-after-deletion, dired-read-shell-command, or dired-find-buffer-nocreate. +2013-02-18 Aidan Gauland + + * eshell.texi: Added documentation for Eshell insert + output redirection operator, >>>. + 2011-02-18 Glenn Morris * dired-x.texi (Optional Installation File At Point): Simplify. === modified file 'etc/ChangeLog' --- etc/ChangeLog 2013-03-22 19:31:15 +0000 +++ etc/ChangeLog 2013-03-30 08:14:31 +0000 @@ -1,3 +1,7 @@ +2013-03-29 Aidan Gauland + + * NEWS: Added entry for em-tramp change in r112148 + 2013-03-21 Eric Ludlam * srecode/ede-autoconf.srt: Change Copyright to FSF. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-03-30 01:32:12 +0000 +++ lisp/ChangeLog 2013-03-30 08:14:31 +0000 @@ -56,6 +56,11 @@ over symbol_words (parallels and leverages `subword-mode' which does word motion inside MixedCaseWords). +2013-03-27 Aidan Gauland + + * eshell/em-unix.el: Moved su and sudo to... + * eshell/em-tramp.el: ...Eshell tramp module + 2013-03-26 Stefan Monnier * desktop.el (desktop--v2s): Rename from desktop-internal-v2s. @@ -1054,6 +1059,11 @@ (eieio-browse-tree, eieio-browse): Use eieio--check-type. +2013-02-18 Aidan Gauland + + * eshell/em-cmpl.el: Corrected "context-related help" + keybinding in commentary. + 2013-02-18 Michael Heerdegen * emacs-lisp/eldoc.el (eldoc-highlight-function-argument): ------------------------------------------------------------ revno: 112186 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2013-03-30 10:10:58 +0300 message: Move MS-Windows definition of TERM_HEADER from ms-w32.h to config.nt. nt/inc/ms-w32.h (TERM_HEADER): Remove definition. nt/config.nt (TERM_HEADER): Move the definition to "w32term.h" from ms-w32.h. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2013-03-30 06:12:49 +0000 +++ nt/ChangeLog 2013-03-30 07:10:58 +0000 @@ -1,3 +1,10 @@ +2013-03-30 Eli Zaretskii + + * inc/ms-w32.h (TERM_HEADER): Remove definition. + + * config.nt (TERM_HEADER): Move the definition to "w32term.h" from + ms-w32.h. + 2013-03-29 Eli Zaretskii * inc/ms-w32.h (copysign) [_MSC_VER]: Redirect to _copysign. === modified file 'nt/config.nt' --- nt/config.nt 2013-03-30 06:12:49 +0000 +++ nt/config.nt 2013-03-30 07:10:58 +0000 @@ -1370,7 +1370,7 @@ #undef TERMINFO /* Define to the header for the built-in window system. */ -#undef TERM_HEADER +#define TERM_HEADER "w32term.h" /* Define to 1 if you can safely include both and . */ #define TIME_WITH_SYS_TIME 1 === modified file 'nt/inc/ms-w32.h' --- nt/inc/ms-w32.h 2013-03-30 06:12:49 +0000 +++ nt/inc/ms-w32.h 2013-03-30 07:10:58 +0000 @@ -537,7 +537,6 @@ #pragma warning(disable:4308) #endif #endif -#define TERM_HEADER "w32term.h" /* ============================================================ */ ------------------------------------------------------------ revno: 112185 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2013-03-30 09:23:47 +0300 message: Add leim/stamp-subdir to .bzrignore. diff: === modified file '.bzrignore' --- .bzrignore 2013-03-18 04:30:20 +0000 +++ .bzrignore 2013-03-30 06:23:47 +0000 @@ -85,6 +85,7 @@ leim/quail/*.el leim/changed.misc leim/changed.tit +leim/stamp-subdir lib/.deps/ lib/Makefile.in lib/deps/ ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.