bpt/emacs.git
10 years agoFix a blatant bug in restore_current_matrix.
Eli Zaretskii [Thu, 19 Sep 2013 13:51:38 +0000 (16:51 +0300)]
Fix a blatant bug in restore_current_matrix.

10 years agoFix a buglet in calculating menu width.
Eli Zaretskii [Thu, 19 Sep 2013 12:03:40 +0000 (15:03 +0300)]
Fix a buglet in calculating menu width.

10 years agoFixed screen restoration after popping down a menu.
Eli Zaretskii [Thu, 19 Sep 2013 11:28:37 +0000 (14:28 +0300)]
Fixed screen restoration after popping down a menu.

10 years agoFixed frame save/restore and 'mouse position' tracking.
Eli Zaretskii [Thu, 19 Sep 2013 10:06:12 +0000 (13:06 +0300)]
Fixed frame save/restore and 'mouse position' tracking.

10 years agoFixed minor issues with truncation of menu items.
Eli Zaretskii [Wed, 18 Sep 2013 20:31:07 +0000 (23:31 +0300)]
Fixed minor issues with truncation of menu items.

10 years agoNo need to pay attention to window margins.
Eli Zaretskii [Wed, 18 Sep 2013 16:20:37 +0000 (19:20 +0300)]
No need to pay attention to window margins.

10 years agoRecord and use cursor coordinates in menu. Active face and help echo work!
Eli Zaretskii [Wed, 18 Sep 2013 15:49:42 +0000 (18:49 +0300)]
Record and use cursor coordinates in menu.  Active face and help echo work!

10 years agoCrude code to simulate keyboard/mouse input in menus via GDB.
Eli Zaretskii [Wed, 18 Sep 2013 11:33:22 +0000 (14:33 +0300)]
Crude code to simulate keyboard/mouse input in menus via GDB.

10 years agoFixed the menu item encoding for tty menus.
Eli Zaretskii [Wed, 18 Sep 2013 08:51:45 +0000 (11:51 +0300)]
Fixed the menu item encoding for tty menus.

10 years agoTurn off text cursor when dropping down menus.
Eli Zaretskii [Wed, 18 Sep 2013 08:26:03 +0000 (11:26 +0300)]
Turn off text cursor when dropping down menus.

10 years agoConverted compile-time tests to run-time tests. Menus display!
Eli Zaretskii [Tue, 17 Sep 2013 17:38:40 +0000 (20:38 +0300)]
Converted compile-time tests to run-time tests.  Menus display!

10 years agoUse AREF instead of XVECTOR; crashes still here.
Eli Zaretskii [Tue, 17 Sep 2013 15:58:43 +0000 (18:58 +0300)]
Use AREF instead of XVECTOR; crashes still here.

10 years agoFixed display and padding of menu items; File menu displays OK.
Eli Zaretskii [Tue, 17 Sep 2013 15:31:37 +0000 (18:31 +0300)]
Fixed display and padding of menu items; File menu displays OK.

10 years agoMinor fixes to interfaces, avoid assertion violation under GLYPH_DEBUG.
Eli Zaretskii [Tue, 17 Sep 2013 12:47:37 +0000 (15:47 +0300)]
Minor fixes to interfaces, avoid assertion violation under GLYPH_DEBUG.

10 years agoRemoved unnecessary tests for GUI sessions and created menu faces.
Eli Zaretskii [Thu, 5 Sep 2013 12:43:11 +0000 (15:43 +0300)]
Removed unnecessary tests for GUI sessions and created menu faces.

10 years agoFixed C compilation problems.
Eli Zaretskii [Thu, 5 Sep 2013 11:00:55 +0000 (14:00 +0300)]
Fixed C compilation problems.

10 years agoMade HAVE_MENUS the default; comment fix in term.c.
Eli Zaretskii [Thu, 5 Sep 2013 08:33:03 +0000 (11:33 +0300)]
Made HAVE_MENUS the default; comment fix in term.c.

10 years agoMerge from trunk after a lot of time.
Eli Zaretskii [Thu, 5 Sep 2013 08:01:04 +0000 (11:01 +0300)]
Merge from trunk after a lot of time.

10 years agoMake --without-x compatible with --enable-gcc-warnings.
Dmitry Antipov [Thu, 5 Sep 2013 06:25:12 +0000 (10:25 +0400)]
Make --without-x compatible with --enable-gcc-warnings.
* configure.ac: If both --without-x and --enable-gcc-warnings are
specified, use -Wno-unused-variable, -Wno-unused-but-set-variable
and -Wno-unused-but-set-parameter.
* src/font.c (register_font_driver): Move check under HAVE_WINDOW_SYSTEM.
* src/font.h (struct font_driver): Move draw, get_bitmap and free_bitmap
members under HAVE_WINDOW_SYSTEM.
* src/keyboard.c (make_lispy_focus_out): Likewise.
(record_menu_key): Move under HAVE_MENUS.
* src/xdisp.c (toplevel): Move hourglass_shown_p, hourglass_atimer and
THIN_SPACE_WIDTH under HAVE_WINDOW_SYSTEM.
(syms_of_xdisp): Adjust user.
(window_box_edges): Define only if HAVE_WINDOW_SYSTEM.
(start_hourglass, cancel_hourglass):
* src/xfaces.c (toplevel): Likewise with PT_PER_INCH,
clear_font_table_count, CLEAR_FONT_TABLE_COUNT
and CLEAR_FONT_TABLE_NFONTS.
(set_font_frame_param, clear_face_gcs, realize_non_ascii_face):
Declare only if HAVE_WINDOW_SYSTEM.
(lface_same_font_attributes_p, clear_face_gcs): Define only
if HAVE_WINDOW_SYSTEM.

10 years ago* frame.c (check_minibuf_window): Update 'frame' with frame pointer.
Dmitry Antipov [Thu, 5 Sep 2013 03:51:37 +0000 (07:51 +0400)]
* frame.c (check_minibuf_window): Update 'frame' with frame pointer.
* xterm.c (x_scroll_bar_handle_click) [!USE_TOOLKIT_SCROLL_BARS]:
Don't pass C integer to XINT (tiny fix for 2013-09-03 change).

10 years ago* lisp/subr.el (pop): Use `car-safe'.
Stefan Monnier [Thu, 5 Sep 2013 03:46:34 +0000 (23:46 -0400)]
* lisp/subr.el (pop): Use `car-safe'.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Remove hack
to detect unused `pop' return value.

* lisp/emacs-lisp/advice.el (defadvice): Add indent rule.

* lisp/international/mule-cmds.el: Require CL.
(find-coding-systems-for-charsets): Avoid add-to-list.
(sanitize-coding-system-list): New function, extracted from
select-safe-coding-system-interactively.
(select-safe-coding-system-interactively): Use it.
(read-input-method-name): Accept symbols for `default'.

* lisp/progmodes/python.el (python-nav-beginning-of-block): Remove unused
var `block-regexp'.
(python-nav--forward-sexp): Remove unused var `re-search-fn'.
(python-fill-string): Remove unused var `marker'.
(python-skeleton-add-menu-items): Remove unused var `items'.

10 years ago* lisp/dired-x.el:
Daniel Hackney [Thu, 5 Sep 2013 03:30:07 +0000 (23:30 -0400)]
* lisp/dired-x.el:
* lisp/net/ange-ftp.el:
* lisp/net/browse-url.el:
* lisp/net/dbus.el:
* lisp/net/eudc.el:
* lisp/net/eudcb-ldap.el:
* lisp/net/eww.el:
* lisp/net/imap.el:
* lisp/printing.el:
* lisp/vc/ediff-diff.el:
* lisp/vc/ediff-init.el:
* lisp/vc/ediff-merg.el:
* lisp/vc/ediff-mult.el:
* lisp/vc/ediff-util.el:
* lisp/vc/ediff-wind.el:
* lisp/vc/ediff.el:
* lisp/vc/emerge.el:
* lisp/vc/pcvs.el:
* vc/vc-annotate.el: Prefix unused arguments with `_' to silence
byte compiler.  Remove some unused let-bound variables.

10 years ago* lisp/emacs-lisp/cconv.el: Use `car-safe' rather than `car' to access
Stefan Monnier [Thu, 5 Sep 2013 03:05:44 +0000 (23:05 -0400)]
* lisp/emacs-lisp/cconv.el: Use `car-safe' rather than `car' to access
a "ref-cell", since it gets better optimized.

Fixes: debbugs:14883

10 years ago* src/cmds.c (Fself_insert_command): Don't pass a non-integer to XINT.
Stefan Monnier [Thu, 5 Sep 2013 02:27:13 +0000 (22:27 -0400)]
* src/cmds.c (Fself_insert_command): Don't pass a non-integer to XINT.

10 years ago* semantic/fw.el (semantic-make-local-hook): Simplify by dropping Emacs <= 20.
Glenn Morris [Thu, 5 Sep 2013 00:22:45 +0000 (20:22 -0400)]
* semantic/fw.el (semantic-make-local-hook): Simplify by dropping Emacs <= 20.

10 years ago* lisp/progmodes/cc-awk.el (c-forward-sws): Declare.
Glenn Morris [Thu, 5 Sep 2013 00:12:36 +0000 (20:12 -0400)]
* lisp/progmodes/cc-awk.el (c-forward-sws): Declare.

10 years agorul-generic-mode-syntax-table fix for recent cc-mode changes
Glenn Morris [Wed, 4 Sep 2013 23:55:08 +0000 (19:55 -0400)]
rul-generic-mode-syntax-table fix for recent cc-mode changes

* lisp/generic-x.el [rul-generic-mode]: Require cc-mode.
(c++-mode-syntax-table): Declare.
(rul-generic-mode-syntax-table): Init in the defvar.

10 years ago* alloc.c (make_event_array): First arg is now ptrdiff_t, not int.
Paul Eggert [Wed, 4 Sep 2013 22:34:04 +0000 (15:34 -0700)]
* alloc.c (make_event_array): First arg is now ptrdiff_t, not int.

This fixes a type error on hosts where ptrdiff_t is wider than int.

10 years ago* lisp/vc/vc-dispatcher.el (vc-run-delayed): New macro.
Stefan Monnier [Wed, 4 Sep 2013 21:09:42 +0000 (17:09 -0400)]
* lisp/vc/vc-dispatcher.el (vc-run-delayed): New macro.
(vc-do-command, vc-set-async-update):
* lisp/vc/vc-mtn.el (vc-mtn-dir-status):
* lisp/vc/vc-hg.el (vc-hg-dir-status, vc-hg-dir-status-files)
(vc-hg-pull, vc-hg-merge-branch):
* lisp/vc/vc-git.el (vc-git-dir-status-goto-stage, vc-git-pull)
(vc-git-merge-branch):
* lisp/vc/vc-cvs.el (vc-cvs-print-log, vc-cvs-dir-status)
(vc-cvs-dir-status-files):
* lisp/vc/vc-bzr.el (vc-bzr-pull, vc-bzr-merge-branch, vc-bzr-dir-status)
(vc-bzr-dir-status-files):
* lisp/vc/vc-arch.el (vc-arch-dir-status): Use vc-run-delayed.
* lisp/vc/vc-annotate.el: Use lexical-binding.
(vc-annotate-display-select, vc-annotate): Use vc-run-delayed.
(vc-sentinel-movepoint): Declare.
(vc-annotate): Don't use `goto-line'.
* lisp/vc/vc.el (vc-diff-internal): Prefer a closure to `(lambda...).
(vc-diff-internal, vc-log-internal-common): Use vc-run-delayed.
(vc-sentinel-movepoint): Declare.
* lisp/vc/vc-svn.el: Use lexical-binding.
(vc-svn-dir-status, vc-svn-dir-status-files): Use vc-run-delayed.
* lisp/vc/vc-sccs.el:
* lisp/vc/vc-rcs.el: Use lexical-binding.

10 years ago* lisp/autorevert.el (auto-revert-notify-handler): Explicitly ignore
Stefan Monnier [Wed, 4 Sep 2013 20:56:54 +0000 (16:56 -0400)]
* lisp/autorevert.el (auto-revert-notify-handler): Explicitly ignore
`deleted'.  Don't drop errors silently.

10 years ago* src/keyboard.c (read_key_sequence_vs): New function.
Stefan Monnier [Wed, 4 Sep 2013 20:32:22 +0000 (16:32 -0400)]
* src/keyboard.c (read_key_sequence_vs): New function.
(Fread_key_sequence_vector, Fread_key_sequence): Use it to factor out
common code.

10 years ago* src/callint.c (Fcall_interactively): Always return a vector for 'K'.
Stefan Monnier [Wed, 4 Sep 2013 20:22:37 +0000 (16:22 -0400)]
* src/callint.c (Fcall_interactively): Always return a vector for 'K'.

10 years ago* lisp/emacs-lisp/gv.el (gv-get): Warn about CL-compiled places.
Stefan Monnier [Wed, 4 Sep 2013 20:03:52 +0000 (16:03 -0400)]
* lisp/emacs-lisp/gv.el (gv-get): Warn about CL-compiled places.

10 years agoMakefile improvements.
Paul Eggert [Wed, 4 Sep 2013 06:45:44 +0000 (23:45 -0700)]
Makefile improvements.

* Makefile.in (lib): Depend on am--refresh, to avoid a race.
(src): Remove duplicate dependency on FRC.
Invoke just one submake, not two.  Avoid the need for 'pwd'.
* lwlib/Makefile.in (all): Put this first.  Don't use double-colon
rules, as they are not portable according to POSIX.  Mark as phony.
* oldXMenu/Makefile.in (all, tags): Don't use double-colon rules, as they
are not portable according to POSIX.  Mark as phony.
* src/Makefile.in (config.status): Don't use double-colon rules, as
they are not portable according to POSIX.  Fix shell typo with `;
I guess this rule has never been tested?
(VCSWITNESS): New macro, to override any environment var.

10 years ago* xterm.h (struct x_display_info): Do not track X connection
Dmitry Antipov [Wed, 4 Sep 2013 04:02:56 +0000 (08:02 +0400)]
* xterm.h (struct x_display_info): Do not track X connection
fd separately because it is always available from Display.
* xterm.c (x_term_init, x_delete_terminal, x_delete_display):
Adjust users.

10 years agoMerge from mainline.
Xue Fuqiao [Wed, 4 Sep 2013 00:39:34 +0000 (08:39 +0800)]
Merge from mainline.

10 years agoSome fixes for vc-ignore.
Xue Fuqiao [Wed, 4 Sep 2013 00:31:13 +0000 (08:31 +0800)]
Some fixes for vc-ignore.

* lisp/vc/vc.el (vc-ignore): Rewrite.
(vc-default-ignore): New function.
(vc-default-ignore-completion-table): Use find-ignore-file.

* lisp/vc/vc-bzr.el (vc-bzr-ignore, vc-bzr-ignore-completion-table):
* lisp/vc/vc-git.el (vc-git-ignore, vc-git-ignore-completion-table):
* lisp/vc/vc-hg.el (vc-hg-ignore, vc-hg-ignore-completion-table):
Remove.  Most code moved to vc.el.

* doc/emacs/maintaining.texi (VC Ignore): Mention `vc-ignore' with prefix argument.

10 years ago* lisp/net/tramp-gvfs.el (tramp-gvfs-mount-spec, tramp-synce-list-devices):
Stefan Monnier [Tue, 3 Sep 2013 20:14:58 +0000 (16:14 -0400)]
* lisp/net/tramp-gvfs.el (tramp-gvfs-mount-spec, tramp-synce-list-devices):
* lisp/net/tramp-smb.el (tramp-smb-get-file-entries):
* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory)
(tramp-compute-multi-hops): Fix misuses of `add-to-list'.

10 years ago* lisp/finder.el (finder-compile-keywords): Don't mess with windows.
Stefan Monnier [Tue, 3 Sep 2013 19:49:54 +0000 (15:49 -0400)]
* lisp/finder.el (finder-compile-keywords): Don't mess with windows.
* lisp/net/eww.el (eww-display-raw): Remove unused argument `charset'.
Update call to it.
(eww-change-select): Remove unused var `properties'.
(eww-make-unique-file-name): Remove unused var `base'.

10 years ago* lisp/calculator.el (calculator-funcall): Fix typo in last change.
Stefan Monnier [Tue, 3 Sep 2013 19:44:02 +0000 (15:44 -0400)]
* lisp/calculator.el (calculator-funcall): Fix typo in last change.

10 years ago* lisp/vc/vc-git.el (vc-git-checkin): Make it possible to commit a merge.
Stefan Monnier [Tue, 3 Sep 2013 18:28:06 +0000 (14:28 -0400)]
* lisp/vc/vc-git.el (vc-git-checkin): Make it possible to commit a merge.

10 years ago* lisp/emacs-lisp/package.el (package-activate-1): Don't let a missing
Stefan Monnier [Tue, 3 Sep 2013 18:21:41 +0000 (14:21 -0400)]
* lisp/emacs-lisp/package.el (package-activate-1): Don't let a missing
<pkg>-autoloads.el file stop us.

10 years ago* lisp/net/tramp.el (with-parsed-tramp-file-name): Silence compiler
Stefan Monnier [Tue, 3 Sep 2013 16:23:10 +0000 (12:23 -0400)]
* lisp/net/tramp.el (with-parsed-tramp-file-name): Silence compiler
warnings, and factor our common code.

10 years ago* buffer.c (drop_overlay):
Dmitry Antipov [Tue, 3 Sep 2013 14:40:09 +0000 (18:40 +0400)]
* buffer.c (drop_overlay):
* fileio.c (restore_point_unwind): Prefer unchain_marker to
Fset_marker (X, Qnil, ...) (which is the same but a bit slower).

10 years ago* buffer.c (Fmake_overlay, Fmove_overlay):
Dmitry Antipov [Tue, 3 Sep 2013 13:29:38 +0000 (17:29 +0400)]
* buffer.c (Fmake_overlay, Fmove_overlay):
* intervals.c (set_point_from_marker):
* print.c (PRINTPREPARE): Prefer signal_error
to plain error and report unsuitable marker too.

10 years ago* xfns.c, image.c (XLIB_ILLEGAL_ACCESS): No longer needed.
Dmitry Antipov [Tue, 3 Sep 2013 12:41:35 +0000 (16:41 +0400)]
* xfns.c, image.c (XLIB_ILLEGAL_ACCESS): No longer needed.

10 years ago* xterm.h (struct x_output): Remove set-but-unused
Dmitry Antipov [Tue, 3 Sep 2013 12:02:01 +0000 (16:02 +0400)]
* xterm.h (struct x_output): Remove set-but-unused
leftovers 'left_before_move' and 'top_before_move'.
* xterm.c (x_set_offset): User changed.

10 years ago* xterm.h (struct scroll_bar): Prefer int to Lisp_Object
Dmitry Antipov [Tue, 3 Sep 2013 09:35:47 +0000 (13:35 +0400)]
* xterm.h (struct scroll_bar): Prefer int to Lisp_Object
for 'dragging' member.
* gtkutil.c (xg_set_toolkit_scroll_bar_thumb):
* xterm.c (xt_action_hook, xm_scroll_callback, xg_scroll_callback)
(xg_end_scroll_callback, xaw_jump_callback, xaw_scroll_callback)
(x_set_toolkit_scroll_bar_thumb, x_scroll_bar_create)
(x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
(x_scroll_bar_handle_click, x_scroll_bar_note_movement)
(x_scroll_bar_report_motion): Related users changed.

10 years ago* nsfont.m (INVALID_GLYPH): New define.
Jan Djärv [Tue, 3 Sep 2013 06:56:25 +0000 (08:56 +0200)]
* nsfont.m (INVALID_GLYPH): New define.
(nsfont_encode_char): Use INVALID_GLYPH.
(ns_uni_to_glyphs): Ditto, check for NSNullGlyph.

Fixes: debbugs:15138

10 years ago* lisp/progmodes/ruby-mode.el (ruby-calculate-indent): Consider
Dmitry Gutov [Tue, 3 Sep 2013 00:29:10 +0000 (03:29 +0300)]
* lisp/progmodes/ruby-mode.el (ruby-calculate-indent): Consider
two-character operators and whether the character preceding them
changes their meaning.

Fixes: debbugs:15208

10 years agoMove Flast_nonminibuf_frame from dispnew.c to frame.c.
Martin Rudalics [Mon, 2 Sep 2013 17:23:26 +0000 (19:23 +0200)]
Move Flast_nonminibuf_frame from dispnew.c to frame.c.

* dispnew.c (Flast_nonminibuf_frame): Move from here ...
* frame.c (Flast_nonminibuf_frame): ... to here.

10 years ago* xterm.c (x_last_mouse_movement_time): Revert last change.
Dmitry Antipov [Mon, 2 Sep 2013 15:48:59 +0000 (19:48 +0400)]
* xterm.c (x_last_mouse_movement_time): Revert last change.
This code should use XDisplayMotionBufferSize to check display's
motion history first, and there are few other issues as well.
(x_scroll_bar_note_movement): Pass XMotionEvent rather than XEvent.
(handle_one_xevent): Adjust user.

10 years agoFormat code sent to Python shell for robustness.
Fabián Ezequiel Gallina [Mon, 2 Sep 2013 13:56:03 +0000 (10:56 -0300)]
Format code sent to Python shell for robustness.

* progmodes/python.el (python-shell-buffer-substring): New
function.
(python-shell-send-region, python-shell-send-buffer): Use it.

10 years ago* net/tramp-compat.el (tramp-compat-user-error): Move it ...
Michael Albinus [Mon, 2 Sep 2013 13:41:08 +0000 (15:41 +0200)]
* net/tramp-compat.el (tramp-compat-user-error): Move it ...
* net/tramp.el (tramp-user-error): ... here.
(tramp-find-method, tramp-check-proper-host)
(tramp-dissect-file-name, tramp-debug-message)
(tramp-handle-shell-command):
* net/tramp-adb.el (tramp-adb-handle-shell-command):
* net/tramp-gvfs.el (tramp-gvfs-file-name-handler): Adapt callees.

* net/tramp-cache.el (tramp-cache-print): Don't print text properties.

10 years agoIn check_minibuf_window don't abort if no window was found (Bug#15247).
Martin Rudalics [Mon, 2 Sep 2013 12:22:21 +0000 (14:22 +0200)]
In check_minibuf_window don't abort if no window was found (Bug#15247).

* frame.c (check_minibuf_window): Don't abort if no window was
found (Bug#15247).

10 years ago* xterm.c (handle_one_xevent): Use event.xunmap and not event.xmap when
Dmitry Antipov [Mon, 2 Sep 2013 11:24:11 +0000 (15:24 +0400)]
* xterm.c (handle_one_xevent): Use event.xunmap and not event.xmap when
handling UnmapNotify event.

10 years ago* xterm.c (x_last_mouse_movement_time) [X_MOTION_HISTORY]: Fix last change.
Dmitry Antipov [Mon, 2 Sep 2013 10:37:06 +0000 (14:37 +0400)]
* xterm.c (x_last_mouse_movement_time) [X_MOTION_HISTORY]: Fix last change.

10 years agoAuto-commit of generated files.
Glenn Morris [Mon, 2 Sep 2013 10:17:37 +0000 (06:17 -0400)]
Auto-commit of generated files.

10 years agoUse XGetMotionEvents to ask the last mouse motion time from X server.
Dmitry Antipov [Mon, 2 Sep 2013 08:45:32 +0000 (12:45 +0400)]
Use XGetMotionEvents to ask the last mouse motion time from X server.
* xterm.c (X_MOTION_HISTORY): Default to 1.
(x_last_mouse_movement_time) [X_MOTION_HISTORY]: New function.
(x_last_mouse_movement_time) [!X_MOTION_HISTORY]: Legacy version.
(note_mouse_movement, x_scroll_bar_note_movement) [!X_MOTION_HISTORY]:
Ifdef away legacy code.
(XTmouse_position, x_scroll_bar_report_motion):
Use x_last_mouse_movement_time.

10 years agoIn avoid.el handle case where posn-at-point returns nil.
Martin Rudalics [Mon, 2 Sep 2013 07:11:26 +0000 (09:11 +0200)]
In avoid.el handle case where posn-at-point returns nil.

* avoid.el (mouse-avoidance-point-position)
(mouse-avoidance-too-close-p): Handle case where posn-at-point
returns nil.

10 years agoFix copying of nextstep/Emacs.app for make -j install
Jan Djärv [Mon, 2 Sep 2013 07:01:53 +0000 (09:01 +0200)]
Fix copying of nextstep/Emacs.app for make -j install

* configure.ac: Add ns_check_file.

* nextstep/Makefile.in (${ns_check_file}): Add so Emacs.app gets properly
updated when doing parallel make install.

10 years ago* msdos.c (last_mouse_window): Move to...
Dmitry Antipov [Mon, 2 Sep 2013 06:45:04 +0000 (10:45 +0400)]
* msdos.c (last_mouse_window): Move to...
(dos_rawgetc): ...this function and adjust comment.
* nsterm.m (last_window): Rename to last_mouse_window, move to...
(mouseMoved): ...this function and adjust comment.
* w32term.c (last_window): Likewise with...
(w32_read_socket): ...this function.
* xterm.c (last_window): Likewise with...
(handle_one_xevent): ...this function.

10 years ago* window.h (Vmouse_window, Vmouse_event): Remove the leftovers.
Dmitry Antipov [Mon, 2 Sep 2013 06:12:26 +0000 (10:12 +0400)]
* window.h (Vmouse_window, Vmouse_event): Remove the leftovers.

10 years ago* xterm.c (toplevel): Drop obsolete comment and move compose_status...
Dmitry Antipov [Mon, 2 Sep 2013 05:59:35 +0000 (09:59 +0400)]
* xterm.c (toplevel): Drop obsolete comment and move compose_status...
(handle_one_xevent): ...to here.
(STORE_KEYSYM_FOR_DEBUG): Move under ENABLE_CHECKING and make no-op
otherwise.

10 years ago* msdos.c (IT_set_terminal_window): Remove no-op.
Dmitry Antipov [Mon, 2 Sep 2013 03:39:06 +0000 (07:39 +0400)]
* msdos.c (IT_set_terminal_window): Remove no-op.
(initialize_msdos_display): Adjust terminal setup.
* w32console.c (w32con_set_terminal_window): Remove no-op.
(initialize_w32_display): Adjust terminal setup.
* w32term.c (w32_set_terminal_window): Remove no-op.
(w32_create_terminal): Adjust terminal setup.
* xterm.c (XTset_terminal_window): Remove no-op.
(x_create_terminal): Adjust terminal setup.

10 years ago* progmodes/python.el (python-nav-if-name-main): New command.
Fabián Ezequiel Gallina [Mon, 2 Sep 2013 03:37:18 +0000 (00:37 -0300)]
* progmodes/python.el (python-nav-if-name-main): New command.

10 years ago* progmodes/python.el (python-shell-completion-get-completions):
Fabián Ezequiel Gallina [Mon, 2 Sep 2013 03:21:13 +0000 (00:21 -0300)]
* progmodes/python.el (python-shell-completion-get-completions):
Drop use of deleted `comint-last-prompt-overlay'.

10 years ago* nsterm.m (ns_set_terminal_modes, ns_reset_terminal_modes):
Dmitry Antipov [Sun, 1 Sep 2013 16:39:20 +0000 (20:39 +0400)]
* nsterm.m (ns_set_terminal_modes, ns_reset_terminal_modes):
Remove no-ops.
(ns_create_terminal): Adjust terminal setup.
* w32term.c (w32_set_terminal_modes, w32_reset_terminal_modes):
Remove no-ops.
(w32_create_terminal): Adjust terminal setup.
* xterm.c (XTset_terminal_modes, XTreset_terminal_modes):
Remove no-ops.
(x_create_terminal): Adjust terminal setup.

10 years ago* dispextern.h (SET_TEXT_POS_FROM_MARKER): Indent.
Dmitry Antipov [Sun, 1 Sep 2013 16:21:48 +0000 (20:21 +0400)]
* dispextern.h (SET_TEXT_POS_FROM_MARKER): Indent.
(CLIP_TEXT_POS_FROM_MARKER): New macro.
* dispnew.c (buffer_posn_from_coords):
* window.c (Fwindow_end, displayed_window_lines):
* xdisp.c (redisplay_mode_lines): Use it.

10 years agoAuto-commit of loaddefs files.
Glenn Morris [Sun, 1 Sep 2013 10:25:27 +0000 (06:25 -0400)]
Auto-commit of loaddefs files.

10 years agoAuto-commit of generated files.
Glenn Morris [Sun, 1 Sep 2013 10:19:10 +0000 (06:19 -0400)]
Auto-commit of generated files.

10 years ago* fontset.c (face_for_char): Check char in the current face font first
Jan Djärv [Sun, 1 Sep 2013 09:59:19 +0000 (11:59 +0200)]
* fontset.c (face_for_char): Check char in the current face font first
if HAVE_NS.

Fixes: debbugs:15138

10 years agoTweak to Makefile rules that list *.el files
Glenn Morris [Sun, 1 Sep 2013 02:12:32 +0000 (19:12 -0700)]
Tweak to Makefile rules that list *.el files

* lisp/Makefile.in (setwins, setwins_almost, setwins_for_subdirs):
* test/automated/Makefile.in (setwins):
Avoid leading space in $wins.  Otherwise the sed command used by
eg compile-main ends up containing "/*.el".

Fixes: debbugs:15170

10 years agoFurther tweak previous change
Glenn Morris [Sun, 1 Sep 2013 01:52:54 +0000 (18:52 -0700)]
Further tweak previous change

10 years agoTweak previous change
Glenn Morris [Sun, 1 Sep 2013 01:32:41 +0000 (18:32 -0700)]
Tweak previous change

10 years ago* lisp/frame.el (frame-background-mode): Doc fix.
Glenn Morris [Sun, 1 Sep 2013 01:29:50 +0000 (18:29 -0700)]
* lisp/frame.el (frame-background-mode): Doc fix.

Fixes: debbugs:15226

10 years ago* lispintro/emacs-lisp-intro.texi (beginning-of-buffer complete):
Glenn Morris [Sun, 1 Sep 2013 01:23:06 +0000 (18:23 -0700)]
* lispintro/emacs-lisp-intro.texi (beginning-of-buffer complete):
Put back a version of the removed paragraph about raw prefix arg.

10 years ago* emacs-lisp-intro.texi (beginning-of-buffer complete): Update function details.
Dani Moncayo [Sun, 1 Sep 2013 01:18:41 +0000 (18:18 -0700)]
* emacs-lisp-intro.texi (beginning-of-buffer complete): Update function details.

Fixes: debbugs:15085

10 years ago* configure.ac (--with-sound): Rename ossaudio to bsd-ossaudio,
Glenn Morris [Sat, 31 Aug 2013 20:00:22 +0000 (13:00 -0700)]
* configure.ac (--with-sound): Rename ossaudio to bsd-ossaudio,
and voxware to oss.

10 years ago* configure.ac: Allow for --with-sound=voxware that will enable
Ulrich Müller [Sat, 31 Aug 2013 19:54:17 +0000 (12:54 -0700)]
* configure.ac: Allow for --with-sound=voxware that will enable
sound but otherwise disable ALSA.  This will use the OSS device,
typically /dev/dsp, for sound output.

Fixes: debbugs:15067

10 years ago* doc/emacs/xresources.texi (Motif Resources):
Ulrich Müller [Sat, 31 Aug 2013 19:49:52 +0000 (12:49 -0700)]
* doc/emacs/xresources.texi (Motif Resources):
Rename from LessTif Resources.  Update xrefs.

* doc/emacs/emacs.texi: Update menu.

* doc/man/emacs.1: Update manual links.

Fixes: debbugs:15145

10 years agoUpdate nt installation instructions to point to supported method
Glenn Morris [Sat, 31 Aug 2013 18:26:59 +0000 (11:26 -0700)]
Update nt installation instructions to point to supported method

* nt/INSTALL: Rename from INSTALL.MSYS.

* nt/INSTALL.OLD: Rename from INSTALL.

* nt/configure.bat: Update for INSTALL name changes.

* make-dist: Update for nt/INSTALL* changes.

10 years agoIn temp_output_buffer_show make sure window returned by display_buffer is live (Bug...
Martin Rudalics [Sat, 31 Aug 2013 09:22:53 +0000 (11:22 +0200)]
In temp_output_buffer_show make sure window returned by display_buffer is live (Bug#15213).

* window.c (temp_output_buffer_show): Make sure window returned
by display_buffer is live (Bug#15213).

10 years ago* bytecomp.el (byte-recompile-directory): Fix is-this-a-directory logic.
Glenn Morris [Fri, 30 Aug 2013 17:40:39 +0000 (13:40 -0400)]
* bytecomp.el (byte-recompile-directory): Fix is-this-a-directory logic.

Fixes: debbugs:15220

10 years agoMinor cleanup to avoid forward declarations.
Dmitry Antipov [Fri, 30 Aug 2013 12:17:44 +0000 (16:17 +0400)]
Minor cleanup to avoid forward declarations.
* coding.h (struct ccl_spec): Remove forward declaration.
* composite.h (toplevel): Include font.h.
(struct composition_it, struct face, struct font_metrics):
Remove forward declaration.
* dispextern.h (struct image, struct atimer): Likewise.
* emacsgtkfixed.h (struct frame): Likewise.
* emacsgtkfixed.c (toplevel): Reorder headers and drop stdio.h.
* font.h (struct font_driver, struct font, struct glyph_string)
(struct face): Remove forward declaration.
* fontset.h (struct face, struct font): Likewise.
* frame.h (toplevel): Style cleanup.
(enum output_method): Move to...
* termhooks.h (enum output_method): ...here.
(struct glyph, struct frame, struct ns_display_info)
(struct x_display_info, struct w32_display_info):
Remove forward declaration.
* xterm.h (toplevel): Include termhooks.h.
(struct font, struct window, struct glyph_matrix, struct frame)
(struct input_event, struct face, struct image): Remove forward
declaration.
* gtkutil.h (struct _widget_value): Likewise.
* keyboard.h (toplevel): Include termhooks.h.
(struct input_event): Remove forward declaration.

10 years ago* lisp/textmodes/css-mode.el: Use SMIE.
Stefan Monnier [Thu, 29 Aug 2013 21:00:18 +0000 (17:00 -0400)]
* lisp/textmodes/css-mode.el: Use SMIE.
(css-smie-grammar): New var.
(css-smie--forward-token, css-smie--backward-token)
(css-smie-rules): New functions.
(css-mode): Use them.
(css-navigation-syntax-table): Remove var.
(css-backward-sexp, css-forward-sexp, css-indent-calculate-virtual)
(css-indent-calculate, css-indent-line): Remove functions.

10 years agoMisc changes to reduce use of `(lambda...); and other cleanups.
Stefan Monnier [Thu, 29 Aug 2013 19:55:58 +0000 (15:55 -0400)]
Misc changes to reduce use of `(lambda...); and other cleanups.
* lisp/cus-edit.el: Use lexical-binding.
(customize-push-and-save, customize-apropos)
(custom-buffer-create-internal): Use closures.
* lisp/progmodes/bat-mode.el (bat-mode-syntax-table): "..." are strings.
* lisp/progmodes/ada-xref.el: Use setq.
* lisp/net/tramp.el (with-tramp-progress-reporter): Avoid setq.
* lisp/dframe.el: Use lexical-binding.
(dframe-frame-mode): Fix calling convention for hooks.  Use a closure.
* lisp/speedbar.el (speedbar-frame-mode): Adjust call accordingly.
* lisp/descr-text.el: Use lexical-binding.
(describe-text-widget, describe-text-sexp, describe-property-list):
Use closures.
* lisp/comint.el (comint-history-isearch-push-state): Use a closure.
* lisp/calculator.el: Use lexical-binding.
(calculator-number-to-string): Make it work with lexical-binding.
(calculator-funcall): Same and use cl-letf.

10 years ago* admin/notes/elpa: Update to the new Git setup.
Stefan Monnier [Thu, 29 Aug 2013 19:20:42 +0000 (15:20 -0400)]
* admin/notes/elpa: Update to the new Git setup.

10 years ago* lisp/emacs-lisp/lisp.el (lisp--company-doc-buffer)
Stefan Monnier [Thu, 29 Aug 2013 19:18:16 +0000 (15:18 -0400)]
* lisp/emacs-lisp/lisp.el (lisp--company-doc-buffer)
(lisp--company-doc-string, lisp--company-location): New functions.
(lisp-completion-at-point): Use them to improve Company support.

10 years ago* lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Add rule for formal
Stefan Monnier [Thu, 29 Aug 2013 18:06:46 +0000 (14:06 -0400)]
* lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Add rule for formal
params of lambda expressions.
(ruby-smie--implicit-semi-p): Refine rule.
(ruby-smie--opening-pipe-p): New function.
(ruby-smie--forward-token, ruby-smie--backward-token): Handle Ruby
symbols and matched |...| for formal params.
(ruby-smie-rules): Don't let the formal params of a "do" prevent it
from being treated as hanging.  Handle "rescue".

Fixes: debbugs:15208

10 years ago* lisp/progmodes/cc-engine.el (c-pull-open-brace): Move definition before use.
Glenn Morris [Thu, 29 Aug 2013 17:26:48 +0000 (13:26 -0400)]
* lisp/progmodes/cc-engine.el (c-pull-open-brace): Move definition before use.
Ref: http://lists.gnu.org/archive/html/emacs-devel/2013-08/msg00773.html

10 years ago* intervals.c (set_point_from_marker): New function.
Dmitry Antipov [Thu, 29 Aug 2013 16:36:54 +0000 (20:36 +0400)]
* intervals.c (set_point_from_marker): New function.
* editfns.c (Fgoto_char):
* process.c (Finternal_default_process_filter):
* window.c (select_window_1): Use it.
* buffer.h (set_point_from_marker): Add prototype.

10 years agoA possible fix for bug #14333 with hanging at exit on MS-Windows.
Eli Zaretskii [Thu, 29 Aug 2013 15:32:04 +0000 (18:32 +0300)]
A possible fix for bug #14333 with hanging at exit on MS-Windows.

 src/w32.c (term_winsock): Call release_listen_threads before calling
 WSACleanup.
 (_sys_wait_accept): Wait for accept event in a loop with a finite
 timeout, instead of waiting indefinitely.  Will hopefully avoid
 hanging during exit because WSACleanup deadlocks waiting for the
 event object to be released.
 src/w32proc.c (release_listen_threads): New function, signals all
 the reader threads that listen for connections to stop waiting.
 src/w32.h (release_listen_threads): Add prototype.

10 years ago* lisp.h (XSETMARKER): Remove unused macro (it doesn't work
Dmitry Antipov [Thu, 29 Aug 2013 15:28:45 +0000 (19:28 +0400)]
* lisp.h (XSETMARKER): Remove unused macro (it doesn't work
anyway because XMISCTYPE is a function and can't be an lvalue).

10 years ago* alloc.c (Fmake_marker, build_marker): Zero need_adjustment
Dmitry Antipov [Thu, 29 Aug 2013 11:22:28 +0000 (15:22 +0400)]
* alloc.c (Fmake_marker, build_marker): Zero need_adjustment
field of new marker (for sanity and safety).

10 years ago* xterm.c (x_clear_area): Lost 7th arg because it is always False.
Dmitry Antipov [Thu, 29 Aug 2013 07:27:27 +0000 (11:27 +0400)]
* xterm.c (x_clear_area): Lost 7th arg because it is always False.
(x_after_update_window_line, x_scroll_bar_create):
(x_scroll_bar_set_handle, XTset_vertical_scroll_bar):
(handle_one_xevent, x_clear_frame_area):
* gtkutil.c (xg_clear_under_internal_border, xg_update_scrollbar_pos):
* xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines): Adjust users.
* xterm.h (x_clear_area): Adjust prototype.

10 years agoHook scanning and indentation functions to find_newline. This helps
Dmitry Antipov [Thu, 29 Aug 2013 07:03:18 +0000 (11:03 +0400)]
Hook scanning and indentation functions to find_newline.  This helps
to avoid duplicated code and renders more respect to newline cache.
* lisp.h (scan_newline): Prefer ptrdiff_t to EMACS_INT.
* cmds.c (Fforward_line):
* indent.c (scan_for_column, Fcurrent_indentation, indented_beyond_p):
Use find_newline and avoid unnecessary point movements.
* search.c (scan_newline): Implement on top of find_newline.

10 years ago* lisp/emacs-lisp/cl-macs.el (cl-defsubst): Make it clear that args
Stefan Monnier [Thu, 29 Aug 2013 03:49:10 +0000 (23:49 -0400)]
* lisp/emacs-lisp/cl-macs.el (cl-defsubst): Make it clear that args
are immutable.  Don't use `unsafe' any more.
(cl--defsubst-expand): Don't substitute at the same time as keeping
a residual unused let-binding.  Don't use `unsafe' any more.

10 years ago* calendar/cal-china.el (calendar-chinese-year-cache): Recenter on 2015.
Glenn Morris [Thu, 29 Aug 2013 03:21:33 +0000 (20:21 -0700)]
* calendar/cal-china.el (calendar-chinese-year-cache): Recenter on 2015.

10 years ago* nxml/nxml-util.el (nxml-debug-clear-inside): Use cl-loop rather than loop.
Glenn Morris [Thu, 29 Aug 2013 01:20:05 +0000 (21:20 -0400)]
* nxml/nxml-util.el (nxml-debug-clear-inside): Use cl-loop rather than loop.