Andreas Schwab [Mon, 13 Aug 2012 10:34:25 +0000 (12:34 +0200)]
* tar-mode.el (tar-header-data-end): Only ignore size for files of
type 1-6.
(tar-header-block-summarize, tar-get-descriptor): Handle pax
extended headers.
Stefan Monnier [Sun, 12 Aug 2012 22:52:33 +0000 (18:52 -0400)]
* lisp/subr.el (internal--before-with-seleted-window)
(internal--after-with-seleted-window): New functions.
(with-selected-window): Use them, to replace dependency on tty-top-frame.
Jay Belanger [Sun, 12 Aug 2012 04:32:28 +0000 (23:32 -0500)]
calc/calc-units.el (math-default-units-table): Give it an
initial value.
(math-put-default-units): Add options to put composite units and unit
systems in default units table.
(calc-convert-units): Send composite units to `math-put-default-units'
when appropriate.
Jan Djärv [Sat, 11 Aug 2012 09:10:08 +0000 (11:10 +0200)]
* nsterm.m (not_in_argv): New function.
(application:openFile, application:openTempFile:):
(application:openFileWithoutUI:, application:openFiles:): Open file
if not_in_argv returns non-zero.
Jan Djärv [Sat, 11 Aug 2012 08:54:35 +0000 (10:54 +0200)]
Use GtkFontChooser on Gtk+ 3.2 and up.
* src/gtkutil.c (gtk_font_chooser_dialog_new, GTK_FONT_CHOOSER)
(gtk_font_chooser_set_font, gtk_font_chooser_get_font): Define
for Gtk+ versions less than 3.2.
(xg_get_font_name): Use those functions/macros here.
Reported by Frans Oilinki <moilinki@gmail.com>.
Dmitry Gutov [Fri, 10 Aug 2012 20:25:43 +0000 (16:25 -0400)]
* test/automated/ruby-mode-tests.el (ruby-should-indent):
Add docstring, check (current-indentation) instead of (current-column).
(ruby-should-indent-buffer): New function.
Add tests for `ruby-deep-indent-paren' behavior.
Port all tests from test/misc/test_ruby_mode.rb in Ruby repo.
Dmitry Gutov [Fri, 10 Aug 2012 20:19:09 +0000 (16:19 -0400)]
Merge stuff from upsteam ruby-mode, part 1.
* lisp/progmodes/ruby-mode.el (ruby-mode-map): Remove deprecated
binding (use `M-;' instead).
(ruby-expr-beg, ruby-parse-partial): ?, _, and : are symbol
constituents, ! is not (but kinda should be).
(ruby-singleton-class-p): New function.
(ruby-expr-beg, ruby-in-here-doc-p)
(ruby-syntax-propertize-heredoc): Use it.
(ruby-syntax-propertize-function): Adjust for changes in
`ruby-syntax-propertize-heredoc'.
* test/automated/ruby-mode-tests.el (ruby-should-indent)
(ruby-assert-state): New functions.
Add new tests.
Chong Yidong [Fri, 10 Aug 2012 16:46:07 +0000 (00:46 +0800)]
Remove some unnecessary bindings of same-window-* variables.
* lisp/progmodes/python.el (python-shell-get-process-name): Don't mess
with same-window-buffer-names.
* lisp/eshell/eshell.el (eshell-add-to-window-buffer-names)
(eshell-remove-from-window-buffer-names): Make obsolete.
(eshell-buffer-name, eshell-unload-hook): Don't use them.
(eshell): Just use pop-to-buffer-same-window instead.
Stefan Monnier [Fri, 10 Aug 2012 14:47:12 +0000 (10:47 -0400)]
* lisp/term/x-win.el (x-menu-bar-open): Always pass last-nonmenu-event.
* lisp/subr.el (eventp): `nil' is not an event, and eventp is not hot.
(event-start, event-end): Use posn-at-point to return a more
informative posn.
(posnp): New function.
* lisp/mouse.el (popup-menu-normalize-position): Use it.
Dmitry Antipov [Fri, 10 Aug 2012 13:24:20 +0000 (17:24 +0400)]
Fix last change to allow compilation with low optimization levels.
* intervals.c (INTERVALS_INLINE): Define to EXTERN_INLINE.
Reported by Jan Djärv <jan.h.d@swipnet.se>.
Masatake YAMATO [Fri, 10 Aug 2012 12:44:06 +0000 (08:44 -0400)]
* lisp/mouse.el (popup-menu-normalize-position): New function.
(popup-menu): Use `popup-menu-normalize-position' to normalize
the form for POSITION argument.
* lisp/term/x-win.el (x-menu-bar-open):
Use the value returend from (posn-at-point) as position
passed to `popup-menu'.
Eli Zaretskii [Fri, 10 Aug 2012 07:16:58 +0000 (10:16 +0300)]
Improve commit in 2012-08-10T06:54:37Z!eliz@gnu.org.
src/w32fns.c <w32_unicode_gui>: New static variable.
(globals_of_w32fns): Initialize it according to os_subtype.
(w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
testing os_subtype.
Eli Zaretskii [Fri, 10 Aug 2012 06:54:37 +0000 (09:54 +0300)]
Fix bug #10299 with Unicode characters sent on MS-Windows by MSKLC.
src/w32fns.c (INIT_WINDOW_CLASS): New macro.
(w32_init_class): Use it to initialize the Emacs class with either
ANSI or Unicode API calls.
(w32_msg_pump): Call GetMessageW and DispatchMessageW on NT and
later.
(w32_wnd_proc): If the character code sent by WM_CHAR or
WM_SYSCHAR is above 255, post a WM_UNICHAR message, not the
original message. Call DefWindowProcW on NT and later.
Jay Belanger [Thu, 9 Aug 2012 14:46:03 +0000 (09:46 -0500)]
calccomp.el (math-compose-expr): Add extra argument indicating that
parentheses should be put around products in denominators. Give
multiplication precedence over division during composition.
* progmodes/python.el: Enhancements to forward-sexp.
(python-nav-forward-sexp): Rename from
python-nav-forward-sexp-function.
(python-nav--forward-sexp, python-nav--backward-sexp): New
functions.
Stefan Monnier [Wed, 8 Aug 2012 19:53:44 +0000 (15:53 -0400)]
* src/xdisp.c (safe_eval_handler): Remove prototype. Receive args describing
the failing expression, include them in the error message.
* src/eval.c (internal_condition_case_n): Pass nargs and args to hfun.
* src/lisp.h (internal_condition_case_n): Update declaration.
Michael Albinus [Wed, 8 Aug 2012 13:40:45 +0000 (15:40 +0200)]
* net/tramp-sh.el (tramp-find-file-exists-command): Protect the
tests by `ignore-error'.
(tramp-find-shell): Open also a new shell, when cache is already
set. Reported by Carsten Bormann <cabo@tzi.org>. (Bug#12148)
Juri Linkov [Wed, 8 Aug 2012 08:48:57 +0000 (11:48 +0300)]
* lisp/bookmark.el: Add `defaults' property to the bookmark record.
(bookmark-current-buffer): Doc fix.
(bookmark-make-record): Add `defaults' property with default values
to the bookmark record.
(bookmark-minibuffer-read-name-map): Remove key binding "\C-u"
with `bookmark-insert-current-bookmark'.
(bookmark-set): Get `defaults' property from the bookmark record
and use it in `read-from-minibuffer'.
(bookmark-insert-current-bookmark): Remove function.
* lisp/info.el (Info-bookmark-make-record): Add `defaults' property
with values of canonical Info node name, the current Info file name
and the current Info node name.
Glenn Morris [Tue, 7 Aug 2012 18:41:39 +0000 (14:41 -0400)]
hack-local-variables-filter fix for bug#12155
* lisp/files.el (hack-local-variables-filter): If an eval: form is not
known to be safe, and enable-local-variables is :safe, then ignore
the form totally, as is done for non-eval forms.
Eli Zaretskii [Tue, 7 Aug 2012 16:53:38 +0000 (19:53 +0300)]
Fix .gdbinit to match changes with INTERNAL_FIELD.
src/.gdbinit (xframe, xwindow, nextcons, xcar, xcdr, xlist): Rename
fields to match removal of FGET and WGET and disuse of
INTERNAL_FIELD in Lisp_Cons.
Dmitry Antipov [Tue, 7 Aug 2012 13:37:21 +0000 (17:37 +0400)]
Revert and cleanup Lisp_Cons, Lisp_Misc and Lisp_Symbol things.
* src/lisp.h (struct Lisp_Symbol): Change xname to meaningful
name since all xname users are fixed long time ago. Do not use
INTERNAL_FIELD.
(set_symbol_name, set_symbol_function, set_symbol_plist):
(set_symbol_next, set_overlay_plist): New function.
(struct Lisp_Cons): Do not use INTERNAL_FIELD.
(struct Lisp_Overlay): Likewise.
(CVAR, MVAR, SVAR): Remove.
* src/alloc.c, src/buffer.c, src/buffer.h, src/bytecode.c:
* src/cmds.c, src/data.c, src/doc.c, src/eval.c, src/fns.c:
* src/keyboard.c, src/lread.c, src/nsselect.m, src/xterm.c:
Adjust users.
* src/.gdbinit: Change to use name field of struct Lisp_Symbol
where appropriate.
* admin/coccinelle/overlay.cocci, admin/coccinelle/symbol.cocci:
Remove.
* nt/config.nt: Sync with autogen/config.nt.
(BROKEN_GETWD, DISPNEW_NEEDS_STDIO_EXT): New macros.
(PENDING_OUTPUT_COUNT): Move definition to inc/ms-w32.h.