Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
f1aa1197
Commit
f1aa1197
authored
Mar 30, 2013
by
Eli Zaretskii
Browse files
Options
Browse Files
Download
Plain Diff
Merge from trunk.
parents
7c4026b6
119b2d43
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
301 additions
and
82 deletions
+301
-82
ChangeLog
ChangeLog
+5
-22
doc/emacs/emacs.texi
doc/emacs/emacs.texi
+2
-2
doc/misc/ChangeLog
doc/misc/ChangeLog
+9
-0
etc/ChangeLog
etc/ChangeLog
+8
-0
etc/NEWS
etc/NEWS
+4
-0
etc/srecode/ede-autoconf.srt
etc/srecode/ede-autoconf.srt
+16
-14
lisp/ChangeLog
lisp/ChangeLog
+32
-0
lisp/gnus/ChangeLog
lisp/gnus/ChangeLog
+4
-0
lisp/gnus/nnir.el
lisp/gnus/nnir.el
+1
-1
lisp/iswitchb.el
lisp/iswitchb.el
+1
-1
lisp/kmacro.el
lisp/kmacro.el
+10
-9
lisp/net/tramp.el
lisp/net/tramp.el
+6
-13
lisp/profiler.el
lisp/profiler.el
+5
-3
lisp/progmodes/python.el
lisp/progmodes/python.el
+13
-3
src/ChangeLog
src/ChangeLog
+22
-0
src/nsmenu.m
src/nsmenu.m
+39
-10
src/nsterm.h
src/nsterm.h
+3
-0
src/nsterm.m
src/nsterm.m
+90
-0
test/ChangeLog
test/ChangeLog
+5
-0
test/automated/python-tests.el
test/automated/python-tests.el
+26
-4
No files found.
ChangeLog
View file @
f1aa1197
2013-03-
29 Aidan Gauland <aidalgol@no8wireless.co.nz
>
2013-03-
30 Paul Eggert <eggert@cs.ucla.edu
>
* etc/NEWS: Added entry for em-tramp change in 2013-03-26T22:08:58Z!aidalgol@no8wireless.co.nz
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
<http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00999.html>.
2013-03-27 Paul Eggert <eggert@cs.ucla.edu>
* configure.ac (HAVE_XKBGETKEYBOARD): Remove.
Subsumed by HAVE_XKB. All uses changed.
2013-03-27 Aidan Gauland <aidalgol@no8wireless.co.nz>
* 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 <jan.h.d@swipnet.se>
* configure.ac (HAVE_XKB): Define if Xkb is present.
...
...
@@ -90,11 +83,6 @@
not always needed.
(HAVE_DATA_START): New macro.
2013-02-18 Aidan Gauland <aidalgol@no8wireless.co.nz>
* lisp/eshell/em-cmpl.el: Corrected "context-related help"
keybinding in commentary.
2013-02-21 Paul Eggert <eggert@cs.ucla.edu>
Parallelize documentation builds.
...
...
@@ -107,11 +95,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 <aidalgol@no8wireless.co.nz>
* doc/misc/eshell.texi: Added documentation for Eshell insert
output redirection operator, >>>.
2013-02-15 Paul Eggert <eggert@cs.ucla.edu>
Fix AIX port (Bug#13650).
...
...
doc/emacs/emacs.texi
View file @
f1aa1197
...
...
@@ -1374,7 +1374,7 @@ Georges Brun-Cottan, Joe Buehler, Scott Byer, Włodek Bzyl,
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 @@ Monnier, Keith Moore, Jan Moringen, Morioka Tomohiko, Glenn Morris,
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
...
...
doc/misc/ChangeLog
View file @
f1aa1197
2013-03-27 Aidan Gauland <aidalgol@no8wireless.co.nz>
* eshell.texi: Updated manual to reflect changes.
2013-03-18 Michael Albinus <michael.albinus@gmx.de>
* 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 <aidalgol@no8wireless.co.nz>
* eshell.texi: Added documentation for Eshell insert
output redirection operator, >>>.
2011-02-18 Glenn Morris <rgm@gnu.org>
* dired-x.texi (Optional Installation File At Point): Simplify.
...
...
etc/ChangeLog
View file @
f1aa1197
2013-03-30 Leo Liu <sdl.web@gmail.com>
* NEWS: Mention `kmacro-to-register' and new eldoc feature.
2013-03-29 Aidan Gauland <aidalgol@no8wireless.co.nz>
* NEWS: Added entry for em-tramp change in 2013-03-26T22:08:58Z!aidalgol@no8wireless.co.nz
2013-03-21 Eric Ludlam <zappo@gnu.org>
* srecode/ede-autoconf.srt: Change Copyright to FSF.
...
...
etc/NEWS
View file @
f1aa1197
...
...
@@ -82,6 +82,8 @@ bound to <f11> and M-<f10>, respectively.
** 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 @@ Affected files:
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.
...
...
etc/srecode/ede-autoconf.srt
View file @
f1aa1197
;;
ede/templates/autoconf.srt --- Templates for autoconf used by EDE.
;;
;; Copyright (C) 2010, 2013 Free Software Foundation, Inc.
;;
;;
; ede/templates/autoconf.srt --- Templates for autoconf used by EDE
;; Copyright (C) 2010, 201
2-201
3 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <eric@siege-engine.com>
;;
;; 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 <http://www.gnu.org/licenses/>.
;; along with
GNU Emacs
. If not, see <http://www.gnu.org/licenses/>.
set mode "autoconf-mode"
set escape_start "{{"
...
...
lisp/ChangeLog
View file @
f1aa1197
2013-03-30 Fabián Ezequiel Gallina <fabian@anue.biz>
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 <michael.albinus@gmx.de>
* 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 <cyd@gnu.org>
* iswitchb.el (iswitchb-read-buffer): Fix typo.
2013-03-30 Leo Liu <sdl.web@gmail.com>
* 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 <tzz@lifelogs.com>
* progmodes/subword.el: Back to using `forward-symbol'.
...
...
@@ -56,6 +78,11 @@
over symbol_words (parallels and leverages `subword-mode' which
does word motion inside MixedCaseWords).
2013-03-27 Aidan Gauland <aidalgol@no8wireless.co.nz>
* eshell/em-unix.el: Moved su and sudo to...
* eshell/em-tramp.el: ...Eshell tramp module
2013-03-26 Stefan Monnier <monnier@iro.umontreal.ca>
* desktop.el (desktop--v2s): Rename from desktop-internal-v2s.
...
...
@@ -1054,6 +1081,11 @@
(eieio-browse-tree, eieio-browse): Use eieio--check-type.
2013-02-18 Aidan Gauland <aidalgol@no8wireless.co.nz>
* eshell/em-cmpl.el: Corrected "context-related help"
keybinding in commentary.
2013-02-18 Michael Heerdegen <michael_heerdegen@web.de>
* emacs-lisp/eldoc.el (eldoc-highlight-function-argument):
...
...
lisp/gnus/ChangeLog
View file @
f1aa1197
2013-03-30 Andrew Cohen <cohen@bu.edu>
* nnir.el (nnir-method-default-engines): Fix typo.
2013-03-29 Andrew Cohen <cohen@bu.edu>
* nnir.el: Define 'number-sequence for xemacs.
...
...
lisp/gnus/nnir.el
View file @
f1aa1197
...
...
@@ -584,7 +584,7 @@ needs the variables `nnir-namazu-program',
Add an entry here when adding a new search engine."
)
(
defcustom
nnir-method-default-engines
'
((
nnimap
.
imap
)
(
n
t
tp
.
gmane
))
(
defcustom
nnir-method-default-engines
'
((
nnimap
.
imap
)
(
n
n
tp
.
gmane
))
"*Alist of default search engines keyed by server method."
:version
"24.1"
:group
'nnir
...
...
lisp/iswitchb.el
View file @
f1aa1197
...
...
@@ -597,7 +597,7 @@ the selection process begins. Used by isearchb.el."
;; 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
)
...
...
lisp/kmacro.el
View file @
f1aa1197
...
...
@@ -614,9 +614,10 @@ An argument of zero means repeat until error."
;;;###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 @@ others, use \\[kmacro-name-last-macro]."
(
>
(
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 @@ others, use \\[kmacro-name-last-macro]."
(
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 @@ Such a \"function\" cannot be called from Lisp, but it is a valid editor command
(
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 @@ Such a \"function\" cannot be called from Lisp, but it is a valid editor command
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
)
...
...
lisp/net/tramp.el
View file @
f1aa1197
...
...
@@ -1660,23 +1660,16 @@ FILE must be a local file name on a connection identified via VEC."
(tramp-compat-font-lock-add-keywords
'emacs-lisp-mode '("\\<with-tramp-connection-property\\>"))
(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."
...
...
lisp/profiler.el
View file @
f1aa1197
...
...
@@ -5,18 +5,20 @@
;; Author: Tomohiro Matsuyama <tomo@cx4a.org>
;; 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 <http://www.gnu.org/licenses/>.
;; along with
GNU Emacs
. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
...
...
lisp/progmodes/python.el
View file @
f1aa1197
...
...
@@ -638,6 +638,12 @@ It makes underscores and dots word constituent chars.")
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 @@ START is the buffer position where the sexp starts."
(
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
...
...
src/ChangeLog
View file @
f1aa1197
2013-03-30 Darren Ho <darren.hoo@gmail.com> (tiny change)
* nsmenu.m (showAtX:Y:for:): setLevel to
NSPopUpMenuWindowLevel (Bug#13998).
2013-03-30 Jan Djärv <jan.h.d@swipnet.se>
* 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 <dmantipov@yandex.ru>
* indent.c (current_column_bol_cache): Remove leftover which is not
...
...
src/nsmenu.m
View file @
f1aa1197
...
...
@@ -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_fram
e_menubar
);
NSTRACE
(
ns_updat
e_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 @@ -(void)trackingNotification:(NSNotification *)notification
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 @@ - (void)menuNeedsUpdate: (NSMenu *)menu
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
}
...
...
@@ -1300,6 +1328,7 @@ - (void) showAtX: (int)x Y: (int)y for: (int)seconds
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
...
...
src/nsterm.h
View file @
f1aa1197
...
...
@@ -792,6 +792,9 @@ extern int ns_lisp_to_color (Lisp_Object color, NSColor **col);
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 */
...
...
src/nsterm.m
View file @
f1aa1197
...
...
@@ -228,6 +228,25 @@ Updated by Christian Limpach (chris@nice.ch)
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 @@ overwriting cursor (usually when cursor on a tab) */
}
#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)
/* --------------------------------------------------------------------------
...
...
test/ChangeLog
View file @
f1aa1197
2013-03-30 Fabián Ezequiel Gallina <fabian@anue.biz>
* automated/python-tests.el (python-indent-block-enders): New test.
(python-info-current-defun-2): Fix test.
2013-03-05 Paul Eggert <eggert@cs.ucla.edu>
* indent/octave.m: Fix encoding error in comment. Add coding tag.
...
...
test/automated/python-tests.el
View file @
f1aa1197
...
...
@@ -444,6 +444,28 @@ objects = Thing.objects.all() \\\\
(
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 @@ class C(object):
return
[]
def
b
()
: