]> git.eshelyaron.com Git - emacs.git/log
emacs.git
10 years ago* src/frame.c (Fframe_parameters): Always report frame height without
Dmitry Antipov [Mon, 21 Jul 2014 16:58:12 +0000 (20:58 +0400)]
* src/frame.c (Fframe_parameters): Always report frame height without
menu and tool bar lines.
* etc/TODO: remove frame height remark.

10 years agoMerge from emacs-24; up to 2014-06-25T10:17:41Z!rgm@gnu.org
Glenn Morris [Mon, 21 Jul 2014 06:03:08 +0000 (02:03 -0400)]
Merge from emacs-24; up to 2014-06-25T10:17:41Z!rgm@gnu.org

10 years agoNEWS tweaks
Glenn Morris [Mon, 21 Jul 2014 05:58:27 +0000 (01:58 -0400)]
NEWS tweaks

10 years agoSmall fixes re toggle-read-only, mainly doc
Glenn Morris [Mon, 21 Jul 2014 05:38:17 +0000 (01:38 -0400)]
Small fixes re toggle-read-only, mainly doc

* progmodes/hideif.el (hide-ifdef-mode-submap): Also substitute read-only-mode.

* bindings.el (mode-line-toggle-read-only):
* bs.el (bs-toggle-readonly):
* buff-menu.el (Buffer-menu-toggle-read-only):
* dired.el (dired-toggle-read-only):
* files.el (view-read-only, find-file-read-only)
(find-file-read-only-other-window)
(find-file-read-only-other-frame):
* progmodes/hideif.el (hide-ifdef-toggle-outside-read-only):
Doc fixes re toggle-read-only.

* view.el: Comment updates.

10 years ago* doc/emacs/emacs.texi (Intro): Workaround makeinfo 4 @acronym bug.
Glenn Morris [Mon, 21 Jul 2014 03:31:36 +0000 (23:31 -0400)]
* doc/emacs/emacs.texi (Intro): Workaround makeinfo 4 @acronym bug.

Fixes: debbugs:18040
10 years ago* emacs-lisp/smie.el (smie-config--guess-1): Split from smie-config--guess.
Stefan Monnier [Mon, 21 Jul 2014 01:58:43 +0000 (21:58 -0400)]
* emacs-lisp/smie.el (smie-config--guess-1): Split from smie-config--guess.
(smie-config--guess): Use it.

10 years ago* lisp/emacs-lisp/edebug.el: Use nadvice.
Stefan Monnier [Mon, 21 Jul 2014 01:56:54 +0000 (21:56 -0400)]
* lisp/emacs-lisp/edebug.el: Use nadvice.
(edebug-original-read): Remove.
(edebug--read): Rename from edebug-read and add `orig' arg.
(edebug-uninstall-read-eval-functions)
(edebug-install-read-eval-functions): Use nadvice.
(edebug-read-sexp, edebug-read-storing-offsets, edebug-read-symbol)
(edebug-read-and-maybe-wrap-form1, edebug-instrument-callee)
(edebug-read-string, edebug-read-function): Use just `read'.
(edebug-original-debug-on-entry): Remove.
(edebug--debug-on-entry): Rename from edebug-debug-on-entry and add
`orig' arg.
(debug-on-entry): Override with nadvice.

10 years agoIndentation, punctuation, and other nitpicks.
Stefan Monnier [Mon, 21 Jul 2014 01:41:59 +0000 (21:41 -0400)]
Indentation, punctuation, and other nitpicks.

10 years ago* lisp/mouse.el (tear-off-window): Rename from mouse-tear-off-window since
Stefan Monnier [Mon, 21 Jul 2014 01:38:21 +0000 (21:38 -0400)]
* lisp/mouse.el (tear-off-window): Rename from mouse-tear-off-window since
it also makes sense to bind it to a non-mouse event.

10 years ago* test/automated/advice-tests.el (advice-test-call-interactively): Make sure
Stefan Monnier [Mon, 21 Jul 2014 01:34:03 +0000 (21:34 -0400)]
* test/automated/advice-tests.el (advice-test-call-interactively): Make sure
the function's definition is fully restored at the end.

10 years ago* lisp/vc/vc-bzr.el (vc-bzr-shelve): Make it operate on fileset.
Stefan Monnier [Mon, 21 Jul 2014 01:25:59 +0000 (21:25 -0400)]
* lisp/vc/vc-bzr.el (vc-bzr-shelve): Make it operate on fileset.

10 years ago* lisp/progmodes/python.el: Add comment about pipe buffering and
Fabián Ezequiel Gallina [Sun, 20 Jul 2014 19:51:16 +0000 (16:51 -0300)]
* lisp/progmodes/python.el: Add comment about pipe buffering and
solutions for missing/delayed output in inferior Python shells.

Fixes: debbugs:17304
10 years ago* lisp/progmodes/python.el (python-mode): Don't set
Fabián Ezequiel Gallina [Sun, 20 Jul 2014 18:28:50 +0000 (15:28 -0300)]
* lisp/progmodes/python.el (python-mode): Don't set
mode-require-final-newline.

Fixes: debbugs:17990
10 years agoMake python.el work with IPython automatically.
Fabián Ezequiel Gallina [Sun, 20 Jul 2014 18:12:30 +0000 (15:12 -0300)]
Make python.el work with IPython automatically.

* lisp/progmodes/python.el:
(python-shell-completion-setup-code): New value supporting iPython.
(python-shell-completion-string-code): New value supporting iPython.
(python-shell-completion-get-completions): Use them.
(python-shell-completion-module-string-code): Make obsolete.
(python-shell-prompt-input-regexps)
(python-shell-prompt-output-regexps): Add safeguard for ipdb.
(python-shell-output-filter): Fix comment typo.

* test/automated/python-tests.el:
(python-util-clone-local-variables-1): Fix test.

Fixes: debbugs:15510
10 years ago* frame.h (struct frame) [USE_X_TOOLKIT]: New member shell_position.
Dmitry Antipov [Sun, 20 Jul 2014 16:14:58 +0000 (20:14 +0400)]
* frame.h (struct frame) [USE_X_TOOLKIT]: New member shell_position.
* xfns.c (x_window): Use it to allow xfree later.
(x_encode_text): Drop 3rd arg; unused.  Tweak comment and adjust users
where appropriate.  Use bool for booleans and remove redundant checks.
(Fx_backspace_delete_keys_p): Use XkbFreeKeyboard; explain why.
* xterm.c (x_free_frame_resources): Free shell_position.

10 years ago* macfont.h (macfont_update_antialias_threshold): Declare.
Jan Djärv [Sun, 20 Jul 2014 13:18:47 +0000 (15:18 +0200)]
* macfont.h (macfont_update_antialias_threshold): Declare.

* macfont.m (macfont_update_antialias_threshold): Remove static.

* nsterm.h (EmacsApp): Add antialiasThresholdDidChange.

* nsterm.m (applicationDidFinishLaunching:): Call
antialiasThresholdDidChange, register for antialias changes.
(antialiasThresholdDidChange:): New method for EmacsApp.

Fixes: debbugs:17534
10 years agoFix Python shell prompts detection for remote hosts.
Fabián Ezequiel Gallina [Sat, 19 Jul 2014 19:19:47 +0000 (16:19 -0300)]
Fix Python shell prompts detection for remote hosts.

* lisp/progmodes/python.el (python-shell-prompt-detect): Replace
call-process with process-file and make it more robust.

10 years ago* lisp/xt-mouse.el (xterm-mouse-event): Don't assume last-click is non-nil.
Stefan Monnier [Sat, 19 Jul 2014 16:56:40 +0000 (12:56 -0400)]
* lisp/xt-mouse.el (xterm-mouse-event): Don't assume last-click is non-nil.

Fixes: debbugs:18015
10 years ago2014-07-19 Kenichi Handa <handa@gnu.org>
Kenichi Handa [Sat, 19 Jul 2014 15:18:23 +0000 (00:18 +0900)]
2014-07-19  Kenichi Handa  <handa@gnu.org>

* xfaces.c (realize_x_face): Call font_load_for_lface with no
mandatory font spec (Bug#17973).

2014-07-19  Stefan Monnier  <monnier@iro.umontreal.ca>

* font.c (font_score): Return the worst score if the size of
ENTITY is wrong by more than a factor 2 (Bug#17973).

10 years agoAutodetect Python shell prompts.
Fabián Ezequiel Gallina [Sat, 19 Jul 2014 13:13:07 +0000 (10:13 -0300)]
Autodetect Python shell prompts.

* lisp/progmodes/python.el:
(python-shell-interpreter-interactive-arg)
(python-shell-prompt-detect-enabled)
(python-shell-prompt-detect-failure-warning)
(python-shell-prompt-input-regexps)
(python-shell-prompt-output-regexps): New vars.
(python-shell-prompt-calculated-input-regexp)
(python-shell-prompt-calculated-output-regexp): New vars.
(python-shell-get-process-name)
(python-shell-internal-get-process-name)
(python-shell-output-filter)
(python-shell-completion-get-completions): Use them.
(python-shell-prompt-detect)
(python-shell-prompt-validate-regexps): New functions.
(python-shell-prompt-set-calculated-regexps): New function.
(inferior-python-mode): Use it.  Also honor overriden
python-shell-interpreter and python-shell-interpreter-args.
(python-shell-make-comint): Honor overriden
python-shell-interpreter and python-shell-interpreter-args.
(python-shell-get-or-create-process): Make it testable by allowing
to call run-python non-interactively.
(python-util-valid-regexp-p): New function.
(python-shell-prompt-regexp, python-shell-prompt-block-regexp)
(python-shell-prompt-output-regexp)
(python-shell-prompt-pdb-regexp): Use it as defcustom :safe.

* test/automated/python-tests.el (python-shell-make-comint-1):
(python-shell-make-comint-2): Fix indentation.
(python-shell-make-comint-3)
(python-shell-make-comint-4): New tests.
(python-shell-get-or-create-process-1): Fix test.
(python-shell-get-or-create-process-2)
(python-shell-get-or-create-process-3): New tests.
(python-shell-internal-get-or-create-process-1): Fix test.
(python-shell-prompt-detect-1): New test.
(python-shell-prompt-detect-2): New test.  (Bug#17370)
(python-shell-prompt-detect-3)
(python-shell-prompt-detect-4)
(python-shell-prompt-detect-5)
(python-shell-prompt-detect-6)
(python-shell-prompt-validate-regexps-1)
(python-shell-prompt-validate-regexps-2)
(python-shell-prompt-validate-regexps-3)
(python-shell-prompt-validate-regexps-4)
(python-shell-prompt-validate-regexps-5)
(python-shell-prompt-validate-regexps-6)
(python-shell-prompt-validate-regexps-7)
(python-shell-prompt-set-calculated-regexps-1)
(python-shell-prompt-set-calculated-regexps-2)
(python-shell-prompt-set-calculated-regexps-3)
(python-shell-prompt-set-calculated-regexps-4)
(python-shell-prompt-set-calculated-regexps-5)
(python-shell-prompt-set-calculated-regexps-6)
(python-util-valid-regexp-p-1): New tests.

10 years ago* lisp/rect.el (rectangle--string-preview): Don't assume there
Stefan Monnier [Sat, 19 Jul 2014 01:43:29 +0000 (21:43 -0400)]
* lisp/rect.el (rectangle--string-preview): Don't assume there
a non-nil default.

Fixes: debbugs:17984
10 years agoPrefer 'x_display_info *' to 'Display *' in X selection code.
Dmitry Antipov [Fri, 18 Jul 2014 11:04:37 +0000 (15:04 +0400)]
Prefer 'x_display_info *' to 'Display *' in X selection code.
This helps to avoid unneeded calls to x_display_info_for_display.
* xterm.h (struct selection_input_event): Record 'x_display_info *'
instead of 'Display *'.
(SELECTION_EVENT_DPYINFO): New macro.
(SELECTION_EVENT_DISPLAY): Now inline function to prohibit using
it as an lvalue.  Mention this in comment.
* xterm.c (handle_one_xevent): Use SELECTION_EVENT_DPYINFO.
* xselect.c (x_get_window_property_as_lisp_data, x_atom_to_symbol)
(selection_data_to_lisp_data, receive_incremental_selection):
Convert to use 'x_display_info *'.  Adjust users where appropriate.
(lisp_data_to_selection_data): Likewise.  Also pass 'struct
selection data *' as last arg to not return values in args.
(unexpect_property_change): Use common removal technique.

10 years ago* lisp/gnus/gnus-msg.el (gnus-configure-posting-style):
Albert Krewinkel [Fri, 18 Jul 2014 08:23:49 +0000 (08:23 +0000)]
* lisp/gnus/gnus-msg.el (gnus-configure-posting-style):
Allow string replacements in values when matching against a header.

* doc/misc/gnus.texi (Posting Styles): Document the possibility to
perform string replacements when matching against headers.

10 years ago* frame.c (frame_unspecified_color): New function
Dmitry Antipov [Fri, 18 Jul 2014 06:02:19 +0000 (10:02 +0400)]
* frame.c (frame_unspecified_color): New function
refactored out from ...
(Fframe_parameters, Fframe_parameter): ... adjusted users.
(x_fullscreen_adjust, set_frame_param): Move Windows-specific
function to ...
* w32term.c (x_fullscreen_adjust, set_frame_param): ... static here.
* frame.h (x_fullscreen_adjust) [HAVE_NTGUI]:
* lisp.h (set_frame_param): Remove prototype.
* xterm.c (x_display_pixel_width, x_display_pixel_height): Now ...
* xterm.h (x_display_pixel_width, x_display_pixel_height): ...
inlined from here.

10 years agoFix last commit of src/w16select.c.
Eli Zaretskii [Thu, 17 Jul 2014 15:40:18 +0000 (18:40 +0300)]
Fix last commit of src/w16select.c.

10 years agoFix src/ChangeLog entry of last commit.
Eli Zaretskii [Thu, 17 Jul 2014 15:39:07 +0000 (18:39 +0300)]
Fix src/ChangeLog entry of last commit.

10 years agoFix setting up coding-systems for clipboard access on MS-Windows and MS-DOS.
Eli Zaretskii [Thu, 17 Jul 2014 15:37:48 +0000 (18:37 +0300)]
Fix setting up coding-systems for clipboard access on MS-Windows and MS-DOS.

 src/w32select.c (setup_windows_coding_system): Apply
 CODING_ANNOTATION_MASK to the common_flags member of struct
 coding_system.  Reported by Martin Rudalics <rudalics@gmx.at>.
 src/w16select.c (Fw16_get_clipboard_data): Apply
 CODING_ANNOTATION_MASK to the common_flags member of struct
 coding_system.

10 years agoFix assertion violation when restoring hscrolled window configurations.
Eli Zaretskii [Thu, 17 Jul 2014 15:25:21 +0000 (18:25 +0300)]
Fix assertion violation when restoring hscrolled window configurations.

 src/xdisp.c (hscroll_window_tree): Don't try hscrolling windows whose cursor
 row has zero buffer position as their start position.  Reported by
 Martin Rudalics <rudalics@gmx.at>.

10 years agoFix part of bug #18035 with overlay strings on invisible text.
Eli Zaretskii [Thu, 17 Jul 2014 15:17:52 +0000 (18:17 +0300)]
Fix part of bug #18035 with overlay strings on invisible text.

 src/xdisp.c (init_iterator): Initialize it->stop_charpos to the
 buffer position where we are to start the iteration.
 (handle_invisible_prop): Record in it->stop_charpos the position
 where the invisible text ends.

10 years ago* data.c (wrong_choice): Not static any more.
Dmitry Antipov [Thu, 17 Jul 2014 10:18:19 +0000 (14:18 +0400)]
* data.c (wrong_choice): Not static any more.
* lisp.h (wrong_choice): Add prototype.
* frame.h (struct frame) [USE_X_TOOLKIT || HAVE_NTGUI]:
Declare namebuf as such.  Tweak comment.
[USE_GTK]: Likewise for tool_bar_position.
(fset_tool_bar_position) [USE_GTK]: Ditto.
(FRAME_TOOL_BAR_POSITION): New macro.
* frame.c (x_report_frame_params):
* gtkutil.c (update_frame_tool_bar):
* xfns.c (Fx_create_frame): Use it.
(x_set_tool_bar_position): Add meaningful diagnostic messages.

10 years ago* print.c (print_preprocess): Adjust to match changed
Dmitry Antipov [Thu, 17 Jul 2014 09:12:51 +0000 (13:12 +0400)]
* print.c (print_preprocess): Adjust to match changed
sub char-table structure and avoid crash (Bug#18038).

10 years agoFix bug #18036 with infloop in redisplay with huge fringes.
Eli Zaretskii [Wed, 16 Jul 2014 18:39:35 +0000 (21:39 +0300)]
Fix bug #18036 with infloop in redisplay with huge fringes.

 src/xdisp.c (move_it_vertically_backward, move_it_by_lines): Prevent
 infinite looping in redisplay when display lines don't have enough
 space to display even a single character.

10 years agoMerge from emacs-24; up to 2014-06-23T06:25:47Z!rgm@gnu.org
Glenn Morris [Wed, 16 Jul 2014 17:06:12 +0000 (13:06 -0400)]
Merge from emacs-24; up to 2014-06-23T06:25:47Z!rgm@gnu.org

10 years ago* frame.h (enum fullscreen_type) [HAVE_WINDOW_SYSTEM]: Use more natural
Dmitry Antipov [Wed, 16 Jul 2014 15:39:15 +0000 (19:39 +0400)]
* frame.h (enum fullscreen_type) [HAVE_WINDOW_SYSTEM]: Use more natural
values.  Add comment.
(struct frame): Re-arrange layout to avoid extra padding and use bit
fields for output_method, want_fullscreen and vertical_scroll_bar_type.
(FRAME_VERTICAL_SCROLL_BAR_TYPE, FRAME_HAS_VERTICAL_SCROLL_BARS)
(FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT)
(FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT) [!HAVE_WINDOW_SYSTEM]:
Define as no-ops because there are no scroll bars anyway.
* frame.c (make_frame, make_terminal_frame, make_initial_frame):
Adjust users.

* font.c (fset_font_data) [HAVE_XFT || HAVE_FREETYPE]:
Add convenient setter.
(font_put_frame_data, font_get_frame_data): Use it.

10 years agoMore precise control over values of some buffer-local variables.
Dmitry Antipov [Wed, 16 Jul 2014 08:45:22 +0000 (12:45 +0400)]
More precise control over values of some buffer-local variables.
* keyboard.c (Qvertical_scroll_bar):
* frame.c (Qleft, Qright): Move to ...
* buffer.c (Qleft, Qright, Qvertical_scroll_bar): ... here.
* buffer.c (Qchoice, Qrange, Qoverwrite_mode, Qfraction): New symbols.
(syms_of_buffer): DEFSYM all of the above, attach special properties.
Use special symbols to DEFVAR_PER_BUFFER overwrite-mode,
vertical-scroll-bar, scroll-up-aggressively
and scroll-down-aggressively.
* buffer.h (Qchoice, Qrange, Qleft, Qright, Qvertical_scroll_bar):
Add declarations.
* nsfns.m, frame.h (Qleft, Qright):
* nsterm.m (Qleft): Remove declarations.
* gtkutil.c (toplevel): Include buffer.h.
* data.c (wrong_choice, wrong_range): New functions.
(store_symval_forwarding): Handle special properties of buffer-local
variables and use functions from the above to signal error, if any.

10 years agoRevert 2014-07-16T04:11:08Z!ueno@gnu.org and fix XCHAR2B_BYTE[12] in nsgui.h only
Daiki Ueno [Wed, 16 Jul 2014 05:44:05 +0000 (14:44 +0900)]
Revert 2014-07-16T04:11:08Z!ueno@gnu.org and fix XCHAR2B_BYTE[12] in nsgui.h only

* nsgui.h (XCHAR2B_BYTE1): Add missing parentheses around
pointer argument, before dereferencing.
(XCHAR2B_BYTE2): Likewise.

10 years agoRemove unnecessary ifdef from nsgui.h, introduced by my last commit
Daiki Ueno [Wed, 16 Jul 2014 04:40:43 +0000 (13:40 +0900)]
Remove unnecessary ifdef from nsgui.h, introduced by my last commit

10 years agoMove back the XChar2b definition to w32gui.h and nsgui.h
Daiki Ueno [Wed, 16 Jul 2014 04:31:31 +0000 (13:31 +0900)]
Move back the XChar2b definition to w32gui.h and nsgui.h

Fix the last change.  XChar2b still needs to be defined platform dependently,
to match with the argument types of drawing functions.

10 years ago* lisp/desktop.el (after-init-hook): Disable startup frame restoration
Glenn Morris [Wed, 16 Jul 2014 04:28:42 +0000 (21:28 -0700)]
* lisp/desktop.el (after-init-hook): Disable startup frame restoration
in non-graphical situations.

Fixes: debbugs:17693
10 years agoConsolidate XChar2b macros for the X, W32, and NS
Daiki Ueno [Wed, 16 Jul 2014 04:11:08 +0000 (13:11 +0900)]
Consolidate XChar2b macros for the X, W32, and NS

Suggested by Jan Djärv in:
https://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00203.html
* w32gui.h (XChar2b, STORE_XCHAR2B, XCHAR2B_BYTE1, XCHAR2B_BYTE2):
Move the fallback definitions to dispextern.h.
* nsgui.h (XChar2b, STORE_XCHAR2B, XCHAR2B_BYTE1, XCHAR2B_BYTE2):
Likewise.  Share the same definition with W32.
* xterm.h (STORE_XCHAR2B, XCHAR2B_BYTE1, XCHAR2B_BYTE2): Move to ...
* dispextern.h (STORE_XCHAR2B, XCHAR2B_BYTE1, XCHAR2B_BYTE2):
... here for the consistency with W32 and NS.

10 years agoUse "b" flag more consistently; avoid "t".
Paul Eggert [Tue, 15 Jul 2014 19:28:25 +0000 (12:28 -0700)]
Use "b" flag more consistently; avoid "t".

* make-docfile.c (READ_TEXT): Remove; all uses replaced by "r".
(READ_BINARY): Remove; all uses replaced by "rb".

Fixes: debbugs:18006
10 years agoetc/TODO: Minor updates.
Eli Zaretskii [Tue, 15 Jul 2014 16:11:33 +0000 (19:11 +0300)]
etc/TODO: Minor updates.

10 years agoFix bug #18025 with typos in Emacs Lisp Introduction manual.
Alvar Jesus Ibeas Martin [Tue, 15 Jul 2014 16:06:49 +0000 (19:06 +0300)]
Fix bug #18025 with typos in Emacs Lisp Introduction manual.

 doc/lispintro/emacs-lisp-intro.texi (Variables, Buffer Names, if & or)
 (Symbols as Chest, fwd-para while): Fix typos.

10 years ago* regex.c (re_search_2): Use ssize_t to avoid integer overflow.
Dmitry Antipov [Tue, 15 Jul 2014 14:04:06 +0000 (18:04 +0400)]
* regex.c (re_search_2): Use ssize_t to avoid integer overflow.

10 years ago* lwlib/lwlib.h (toplevel): Use unsigned int for LWLIB_ID.
Dmitry Antipov [Tue, 15 Jul 2014 09:59:05 +0000 (13:59 +0400)]
* lwlib/lwlib.h (toplevel): Use unsigned int for LWLIB_ID.
* src/xmenu.c (toplevel): Use LWLIB_ID for next_menubar_widget_id.
(pop_down_menu) [USE_X_TOOLKIT]: Accept integer arg.
(create_and_show_popup_menu, create_and_show_dialog) [USE_X_TOOLKIT]:
Use record_unwind_protect_int and avoid consing.
(syms_of_xmenu) [USE_X_TOOLKIT]: Declare WIDGET_ID_TICK_START.

10 years agoUnbreak compilation of derived cc-mode modes
Daniel Colascione [Mon, 14 Jul 2014 23:58:52 +0000 (16:58 -0700)]
Unbreak compilation of derived cc-mode modes

* lisp/progmodes/cc-defs.el (c-lang-defconst-eval-immediately):
Use `macroexpand-all' instead of `cl-macroexpand-all'.

* lisp/progmodes/cc-langs.el: Change comments from `cl-macroexpand-all'
to `macroexpand-all'

10 years agoTweak earlier vc-log-edit change
Glenn Morris [Mon, 14 Jul 2014 19:29:29 +0000 (15:29 -0400)]
Tweak earlier vc-log-edit change

* lisp/vc/vc-dispatcher.el (vc-log-edit): Do set up the log buffer
if it was "empty", or used for a different set of files.

Fixes: debbugs:17884
10 years agoUse binary-io module, O_BINARY, and "b" flag.
Paul Eggert [Mon, 14 Jul 2014 19:23:18 +0000 (12:23 -0700)]
Use binary-io module, O_BINARY, and "b" flag.

* admin/merge-gnulib (GNULIB_MODULES): Add binary-io.  It was already
present implicitly; this just makes the dependence explicit.
* lib-src/etags.c, lib-src/hexl.c, lib-src/make-docfile.c:
Include binary-io.h instead of fcntl.h and/or io.h.
(main): Use set_binary_mode or SET_BINARY
in place of handcrafted code.
* lib-src/etags.c (main) [DOS_NT]:
* lib-src/movemail.c (main) [WINDOWSNT]:
Don't mess with _fmode.
* lib-src/etags.c (main, process_file_name, analyse_regex):
Use fopen/popen's "b" flag instead.
* lib-src/movemail.c (main, popmail): Use open/lk_open/mkostemp's O_BINARY
instead.
* src/callproc.c (create_temp_file): Use mkostemp's O_BINARY flag.
* src/emacs.c [MSDOS]:
* src/emacs.c (main) [DOS_NT]: Don't mess with _fmode.
(main) [MSDOS]: Use SET_BINARY instead of setmode.
* src/minibuf.c: Include binary-io.h instead of fcntl.h.
(read_minibuf_noninteractive):
Use set_binary_mode instead of handcrafted code.
Don't call emacs_set_tty if emacs_get_tty failed.
* src/sysdep.c, src/systty.h (emacs_get_tty): Return int, not void.
* src/sysdep.c (emacs_open, emacs_pipe): Use O_BINARY.
* src/w32.c (pipe2): Adjust eassert to include O_BINARY.

Fixes: debbugs:18006
10 years ago* macros.c (Fstart_kbd_macro): Avoid need for overflow check.
Paul Eggert [Mon, 14 Jul 2014 19:07:54 +0000 (12:07 -0700)]
* macros.c (Fstart_kbd_macro): Avoid need for overflow check.

10 years ago* macros.c (Fstart_kbd_macro): Simplify.
Paul Eggert [Mon, 14 Jul 2014 18:56:35 +0000 (11:56 -0700)]
* macros.c (Fstart_kbd_macro): Simplify.

This works around a GCC compiler bug when Emacs is configured with
--enable-gcc-warnings.

10 years agosrc/ChangeLog: Fix a typo in a recently added entry.
Eli Zaretskii [Mon, 14 Jul 2014 15:10:20 +0000 (18:10 +0300)]
src/ChangeLog: Fix a typo in a recently added entry.

10 years ago* term.c (tty_menu_add_pane, tty_menu_add_selection):
Dmitry Antipov [Mon, 14 Jul 2014 15:06:52 +0000 (19:06 +0400)]
* term.c (tty_menu_add_pane, tty_menu_add_selection):
Use menu_item_width.
(tty_menu_show): Simplify because ty_menu_create never return NULL.

10 years ago* lisp.h (CHECK_VECTOR_OR_STRING): Return number of elements
Dmitry Antipov [Mon, 14 Jul 2014 04:44:01 +0000 (08:44 +0400)]
* lisp.h (CHECK_VECTOR_OR_STRING): Return number of elements
or characters in string, respectively.  Add comment.
* fringe.c (Fdefine_fringe_bitmap):
* fns.c (Fsubstring, substring_both): Use it.
* keymap.c (Fdefine_key, Flookup_key):
* macros.c (Fstart_kbd_macro): Likewise.  Avoid call to Flength.

10 years ago* make-docfile.c: Simplify a bit, to simplify further refactoring.
Paul Eggert [Mon, 14 Jul 2014 00:45:19 +0000 (17:45 -0700)]
* make-docfile.c: Simplify a bit, to simplify further refactoring.

(outfile): Remove static var.  All uses changed to use stdout,
since it's always stdout anyway.  While we're at it, prefer
putchar/puts/fputs to printf when there are no format strings.
(main): Use freopen rather than fopen, so that stdout is reused.
Move O_BINARY stuff after the freopen, so it affects the
reopened file.
(write_c_args): Omit first arg, since it's always stdout now.
All uses changed.

10 years agoImprove behavior of 'bzr up; cd src; make -k'.
Paul Eggert [Sun, 13 Jul 2014 15:50:35 +0000 (08:50 -0700)]
Improve behavior of 'bzr up; cd src; make -k'.

* Makefile.in (ACLOCAL_INPUTS): Add all m4/*.m4 files.
* src/Makefile.in (top_srcdir): New var.
(ntsource, lispsource, ALL_CFLAGS, gl-stamp, emacs.res):
Use '$(top_srcdir)' instead of '$(srcdir)/..';
its expansion is a bit shorter.
(../config.status): Actually build config.status instead of
just complaining.
(ACLOCAL_INPUTS, AUTOCONF_INPUTS):
New macros, copied and relocated from ../Makefile.in.
($(top_srcdir)/aclocal.m4, $(top_srcdir)/configure, config.in)
(../config.status, Makefile): New dependencies and rules,
copied with relocation from ../Makefile.in.  This should be more
likely to rebuild the build machinery properly if you do a 'make'
in the src directory.

10 years agoFix bug #17986 with infloop in redisplay when default-directory is nil.
Eli Zaretskii [Sun, 13 Jul 2014 14:49:59 +0000 (17:49 +0300)]
Fix bug #17986 with infloop in redisplay when default-directory is nil.

 src/xdisp.c (decode_mode_spec): Call file-remote-p on the current
 buffer's default-directory only if it is a string.

 lisp/bindings.el (mode-line-remote): If default-directory is not a
 string, don't call file-remote-p on it; instead state in the
 help-echo that it is nil.

10 years agoMerge from gnulib, incorporating:
Paul Eggert [Sat, 12 Jul 2014 20:02:44 +0000 (13:02 -0700)]
Merge from gnulib, incorporating:

2014-06-27 mktime: merge #if/#ifdef usage from glibc
* lib/mktime.c: Update from gnulib.

10 years agoMerge from emacs-24; up to 2014-06-22T05:00:14Z!dmantipov@yandex.ru
Glenn Morris [Sat, 12 Jul 2014 17:53:29 +0000 (10:53 -0700)]
Merge from emacs-24; up to 2014-06-22T05:00:14Z!dmantipov@yandex.ru

10 years ago* etags.c (Lisp_functions): Also record cl-defun etc.
Paul Eggert [Sat, 12 Jul 2014 16:26:54 +0000 (09:26 -0700)]
* etags.c (Lisp_functions): Also record cl-defun etc.

Fixes: debbugs:17965
10 years agoAttempt to fix bug #17962 with SIGSEGV in display_line.
Eli Zaretskii [Sat, 12 Jul 2014 10:29:13 +0000 (13:29 +0300)]
Attempt to fix bug #17962 with SIGSEGV in display_line.

 src/xdisp.c (display_line): Don't call FETCH_BYTE with argument less than 1.

10 years agoDocument the behavior of file selection dialogs on Windows 7 (bug #17950).
Eli Zaretskii [Sat, 12 Jul 2014 09:25:29 +0000 (12:25 +0300)]
Document the behavior of file selection dialogs on Windows 7 (bug #17950).

 etc/PROBLEMS: Mention the problem from bug #17950.

 src/w32fns.c (Fx_file_dialog): Mention in the doc string the
 behavior on Windows 7 and later when the function is repeatedly
 invoked with the same value of DIR.
 src/xfns.c (Fx_file_dialog) [USE_MOTIF, USE_GTK]: Update the doc
 string to match the one in w32fns.c.

10 years agoetc/PROBLEMS: Update problems specific to MS-Windows.
Eli Zaretskii [Sat, 12 Jul 2014 09:08:41 +0000 (12:08 +0300)]
etc/PROBLEMS: Update problems specific to MS-Windows.

10 years agoMinor fix for read_minibuf_noninteractive on MS-Windows.
Eli Zaretskii [Sat, 12 Jul 2014 07:47:40 +0000 (10:47 +0300)]
Minor fix for read_minibuf_noninteractive on MS-Windows.

 src/minibuf.c (read_minibuf_noninteractive) [WINDOWSNT]: Switch
 stdin to binary mode only if it is connected to a terminal.

Fixes: debbugs:17839
10 years ago* XMenuInt.h (XDeleteAssoc): Remove duplicated prototype to
Dmitry Antipov [Sat, 12 Jul 2014 04:06:32 +0000 (08:06 +0400)]
* XMenuInt.h (XDeleteAssoc): Remove duplicated prototype to
pacify -Wredundant-decls.

10 years agoFix bug: C-x v v discarded existing log message.
Paul Eggert [Sat, 12 Jul 2014 02:24:02 +0000 (19:24 -0700)]
Fix bug: C-x v v discarded existing log message.

* lisp/vc/vc-dispatcher.el (vc-log-edit):
Don't clobber an already-existing log message.

Fixes: debbugs:17884
10 years agoCoalesce extern decls.
Paul Eggert [Fri, 11 Jul 2014 17:55:24 +0000 (10:55 -0700)]
Coalesce extern decls.

* minibuf.c (emacs_get_tty, emacs_set_tty, suppress_echo_on_tty):
* sysdep.c (emacs_get_tty, emacs_set_tty):
Move duplicate extern decls from here ...
* systty.h: ... to here, so that there's just one copy.

10 years ago* Makefile.in (install-arch-indep): Avoid readdir race.
Paul Eggert [Fri, 11 Jul 2014 17:28:53 +0000 (10:28 -0700)]
* Makefile.in (install-arch-indep): Avoid readdir race.

Fixes: debbugs:17971
10 years agoAdd ifdef NS_IMPL_COCOA aound OSX version check (for clang)
Jan Djärv [Fri, 11 Jul 2014 16:33:17 +0000 (18:33 +0200)]
Add ifdef NS_IMPL_COCOA aound OSX version check (for clang)

* nsfns.m (Fns_popup_font_panel): Ditto.

* nsterm.m (changeFont:): Add ifdef NS_IMPL_COCOA.

10 years agoFix reading input without echoing on MS-Windows.
Eli Zaretskii [Fri, 11 Jul 2014 15:44:25 +0000 (18:44 +0300)]
Fix reading input without echoing on MS-Windows.

 src/minibuf.c (read_minibuf_noninteractive) [WINDOWSNT]: Switch stdin
 to binary mode when not echoing input.

Fixes: debbugs:17839
10 years agoImplement echo suppression in non-interactive mode for MS-Windows.
Eli Zaretskii [Fri, 11 Jul 2014 13:58:02 +0000 (16:58 +0300)]
Implement echo suppression in non-interactive mode for MS-Windows.

 src/minibuf.c (read_minibuf_noninteractive): Finish reading on '\r',
 not only on '\n'.
 src/sysdep.c (emacs_get_tty, emacs_set_tty, suppress_echo_on_tty)
 [DOS_NT]: Implement for WINDOWSNT.
 src/systty.h (struct emacs_tty) [DOS_NT]: The struct member is now
 unsigned.

Fixes: debbugs:17839
10 years agodoc/lispref/internals.texi (Garbage Collection): Fix last change.
Eli Zaretskii [Fri, 11 Jul 2014 12:49:49 +0000 (15:49 +0300)]
doc/lispref/internals.texi (Garbage Collection): Fix last change.

10 years ago* sysdep.c (suppress_echo_on_tty): New function.
Michael Albinus [Fri, 11 Jul 2014 12:35:23 +0000 (14:35 +0200)]
* sysdep.c (suppress_echo_on_tty): New function.
* minibuf.c (read_minibuf_noninteractive): Use it.

10 years ago* src/alloc.c (Fmemory_info) [HAVE_LINUX_SYSINFO]: Return nil if
Dmitry Antipov [Fri, 11 Jul 2014 12:19:58 +0000 (16:19 +0400)]
* src/alloc.c (Fmemory_info) [HAVE_LINUX_SYSINFO]: Return nil if
sysinfo failed.  Adjust docstring.
* doc/lispref/internals.texi (Garbage Collection): Mention memory-info.
* lisp/files.el (out-of-memory-warning-percentage): New defcustom.
(warn-maybe-out-of-memory): Use it.

10 years agoImplement memory-info for MS-DOS.
Eli Zaretskii [Fri, 11 Jul 2014 10:09:51 +0000 (13:09 +0300)]
Implement memory-info for MS-DOS.

 src/dosfns.c (dos_memory_info): New function.
 src/dosfns.h (dos_memory_info): Add prototype.
 src/alloc.c (Fmemory_info) [MSDOS]: Call dos_memory_info.
 src/vm-limit.c (get_lim_data) [MSDOS]: Call dos_memory_info, instead
 of doing some of its job.

10 years agoTemporary fix for the MS-Windows build broken by last commit.
Eli Zaretskii [Fri, 11 Jul 2014 09:56:58 +0000 (12:56 +0300)]
Temporary fix for the MS-Windows build broken by last commit.

 src/minibuf.c (read_minibuf_noninteractive) [WINDOWSNT]: Don't
 reference termios structure members.

Fixes: debbugs:17839
10 years ago* NEWS: Passwords in batch mode are hidden.
Michael Albinus [Fri, 11 Jul 2014 09:33:06 +0000 (11:33 +0200)]
* NEWS: Passwords in batch mode are hidden.

10 years agoHide password in batch mode
Michael Albinus [Fri, 11 Jul 2014 09:09:54 +0000 (11:09 +0200)]
Hide password in batch mode

* doc/lispref/minibuf.texi (Intro to Minibuffers, Reading a Password):
Password hiding is available in batch mode, do not mention it in
the exclusion list.  Mention `read-hide-char'.

* lisp/subr.el (read-passwd): Use `read-hide-char' if non-nil.  Bind it
when calling `read-string'.

* src/minibuf.c (top): Include systty.h.  Declare external
emacs_get_tty and emacs_set_tty.
(Vread_hide_char): New lisp variable.
(read_minibuf_noninteractive): Hide characters with
Vread_hide_char if it is a character.

* src/sysdep.c (emacs_get_tty, emacs_set_tty): Make them externally visible.

Fixes: debbugs:17839
10 years agoImplement memory-info for MS-Windows.
Eli Zaretskii [Thu, 10 Jul 2014 19:09:26 +0000 (22:09 +0300)]
Implement memory-info for MS-Windows.

 src/w32.c (w32_memory_info): New function.
 src/w32.h (w32_memory_info): Prototype it.
 src/alloc.c (Fmemory_info) [WINDOWSNT]: Call it.

10 years agolisp/files.el (warn-maybe-out-of-memory): Fix the wording of the warning.
Eli Zaretskii [Thu, 10 Jul 2014 18:19:37 +0000 (21:19 +0300)]
lisp/files.el (warn-maybe-out-of-memory): Fix the wording of the warning.

10 years agoTweak previous log-edit-changelog-entries change
Glenn Morris [Thu, 10 Jul 2014 18:09:04 +0000 (14:09 -0400)]
Tweak previous log-edit-changelog-entries change

* lisp/vc/log-edit.el (log-edit-changelog-entries):
Check for a visited-but-never-saved ChangeLog.

10 years ago* files.el (warn-maybe-out-of-memory): Fix last change.
Dmitry Antipov [Thu, 10 Jul 2014 13:00:45 +0000 (17:00 +0400)]
* files.el (warn-maybe-out-of-memory): Fix last change.

10 years ago* configure.ac: Check whether sys/sysinfo.h provides
Dmitry Antipov [Thu, 10 Jul 2014 12:33:35 +0000 (16:33 +0400)]
* configure.ac: Check whether sys/sysinfo.h provides
Linux 'sysinfo' function and 'struct sysinfo' type.
* src/alloc.c (Fmemory_info): New function.
* lisp/files.el (warn-maybe-out-of-memory): New function.
(find-file-noselect): Use it.

10 years ago* coding.h (struct coding_system): Remove 'error_positions' (unused)
Dmitry Antipov [Thu, 10 Jul 2014 04:35:55 +0000 (08:35 +0400)]
* coding.h (struct coding_system): Remove 'error_positions' (unused)
and 'errors' (set but unused) fields.  Use bitfields for 'eol_seen',
'mode', 'common_flags' and 'result' fields, adjust layout to avoid
extra padding and shrink struct coding_system by 56 bytes (x86_64).
* coding.c (decode_coding_utf_8, decode_coding_utf_16)
(decode_coding_emacs_mule, decode_coding_iso_2022, decode_coding_sjis)
(decode_coding_big5, decode_coding_charset, decode_coding)
(encode_coding): Adjust users.

10 years ago* syntax.c (back_comment): Use more-natural location for label.
Paul Eggert [Wed, 9 Jul 2014 23:39:58 +0000 (16:39 -0700)]
* syntax.c (back_comment): Use more-natural location for label.

10 years ago* font.c, font.h (font_unparse_fcname): Now static.
Paul Eggert [Wed, 9 Jul 2014 23:35:31 +0000 (16:35 -0700)]
* font.c, font.h (font_unparse_fcname): Now static.

Define only if HAVE_XFT || HAVE_FREETYPE || HAVE_NS.

10 years ago* lisp/vc/log-edit.el (log-edit-changelog-entries): Don't both visiting
Stefan Monnier [Wed, 9 Jul 2014 18:54:06 +0000 (14:54 -0400)]
* lisp/vc/log-edit.el (log-edit-changelog-entries): Don't both visiting
a non-existing file.

Fixes: debbugs:17970
10 years ago* lisp/faces.el (face-name): Undo last change.
Stefan Monnier [Wed, 9 Jul 2014 18:46:33 +0000 (14:46 -0400)]
* lisp/faces.el (face-name): Undo last change.
(x-resolve-font-name): Don't call face-name.

Fixes: debbugs:17956
10 years agoTreat the perl keyword `constant' like `bless', `return' &c
Sam Steingold [Wed, 9 Jul 2014 14:51:52 +0000 (10:51 -0400)]
Treat the perl keyword `constant' like `bless', `return' &c

* lisp/progmodes/cperl-mode.el (cperl-block-p): Tread the perl keyword
`constant' like `bless', `return' &c

10 years ago* coding.c (ALLOC_CONVERSION_WORK_AREA): Prefer ptrdiff_t to int and
Dmitry Antipov [Wed, 9 Jul 2014 10:36:35 +0000 (14:36 +0400)]
* coding.c (ALLOC_CONVERSION_WORK_AREA): Prefer ptrdiff_t to int and
so avoid integer overflow if decoded gap size exceeds INT_MAX bytes.

10 years agoNext minor cleanup of font subsystem.
Dmitry Antipov [Wed, 9 Jul 2014 06:25:35 +0000 (10:25 +0400)]
Next minor cleanup of font subsystem.
* font.h (enum font_property_index): Remove FONT_ENTITY_INDEX (no
users) and FONT_FORMAT_INDEX (set by a few font drivers but never
really used).
(FONT_ENTITY_NOT_LOADABLE, FONT_ENTITY_SET_NOT_LOADABLE): Remove;
unused.
* ftfont.h (ftfont_font_format): Remove prototype.
* ftfont.c (ftfont_font_format): Remove; now unused.
(ftfont_open):
* nsfont.m (nsfont_open):
* w32font.c (w32font_open_internal):
* w32uniscribe.c (uniscribe_open):
* xfont.c (xfont_open):
* xftfont.c (xftfont_open): All users changed.

10 years agoFix dedenters and electric colon handling.
Fabián Ezequiel Gallina [Wed, 9 Jul 2014 03:55:53 +0000 (00:55 -0300)]
Fix dedenters and electric colon handling.

* lisp/progmodes/python.el
(python-rx-constituents): Add dedenter and block-ender.
(python-indent-dedenters, python-indent-block-enders): Delete.
(python-indent-context): Return new case for dedenter-statement.
(python-indent-calculate-indentation): Handle new case.
(python-indent-calculate-levels): Fix levels calculation for
dedenter statements.
(python-indent-post-self-insert-function): Fix colon handling.
(python-info-dedenter-opening-block-message): New function.
(python-indent-line): Use it.
(python-info-closing-block)
(python-info-closing-block-message): Remove.
(python-info-dedenter-opening-block-position)
(python-info-dedenter-opening-block-positions)
(python-info-dedenter-statement-p): New functions.

* test/automated/python-tests.el
(python-indent-block-enders-1)
(python-indent-block-enders-2): Fix tests.
(python-indent-block-enders-3)
(python-indent-block-enders-4)
(python-indent-block-enders-5)
(python-indent-dedenters-1)
(python-indent-dedenters-2): Remove tests.
(python-indent-dedenters-1)
(python-indent-dedenters-2)
(python-indent-dedenters-3)
(python-indent-dedenters-4)
(python-indent-dedenters-5)
(python-indent-dedenters-6)
(python-indent-dedenters-7)
(python-info-dedenter-opening-block-position-1)
(python-info-dedenter-opening-block-position-2)
(python-info-dedenter-opening-block-position-3)
(python-info-dedenter-opening-block-positions-1)
(python-info-dedenter-opening-block-positions-2)
(python-info-dedenter-opening-block-positions-3)
(python-info-dedenter-opening-block-positions-4)
(python-info-dedenter-opening-block-positions-5)
(python-info-dedenter-opening-block-message-1)
(python-info-dedenter-opening-block-message-2)
(python-info-dedenter-opening-block-message-3)
(python-info-dedenter-opening-block-message-4)
(python-info-dedenter-opening-block-message-5)
(python-info-dedenter-statement-p-1)
(python-info-dedenter-statement-p-2)
(python-info-dedenter-statement-p-3)
(python-info-dedenter-statement-p-4)
(python-info-dedenter-statement-p-5): New tests.

Fixes: debbugs:15163
10 years ago* lisp/rect.el (apply-on-rectangle): Check forward-line really moved to the
Stefan Monnier [Wed, 9 Jul 2014 02:20:21 +0000 (22:20 -0400)]
* lisp/rect.el (apply-on-rectangle): Check forward-line really moved to the
next line.

10 years agoMerge from emacs-24; up to 2014-06-19T14:03:45Z!monnier@iro.umontreal.ca
Glenn Morris [Wed, 9 Jul 2014 02:04:12 +0000 (19:04 -0700)]
Merge from emacs-24; up to 2014-06-19T14:03:45Z!monnier@iro.umontreal.ca

10 years ago* lisp/erc/erc.el (erc-channel-receive-names): Reduce redundancy.
Stefan Monnier [Tue, 8 Jul 2014 19:45:24 +0000 (15:45 -0400)]
* lisp/erc/erc.el (erc-channel-receive-names): Reduce redundancy.

10 years ago* lisp/linum.el (linum--face-height): New function.
Stefan Monnier [Tue, 8 Jul 2014 19:33:37 +0000 (15:33 -0400)]
* lisp/linum.el (linum--face-height): New function.
(linum-update-window): Use it to adjust margin to linum's width.

Fixes: debbugs:17813
10 years ago* lisp/leim/quail/sisheng.el (sisheng-list): Don't bother with-case-table.
Stefan Monnier [Tue, 8 Jul 2014 19:15:28 +0000 (15:15 -0400)]
* lisp/leim/quail/sisheng.el (sisheng-list): Don't bother with-case-table.
* lisp/eshell/em-smart.el (eshell-smart-scroll-window): Use
with-selected-window.

10 years ago* lisp/xt-mouse.el (xterm-mouse-translate-1): Intern drag event.
Stefan Monnier [Tue, 8 Jul 2014 18:47:47 +0000 (14:47 -0400)]
* lisp/xt-mouse.el (xterm-mouse-translate-1): Intern drag event.
Remove also pointless window&mark manipulation.

Fixes: debbugs:17894
10 years ago* lisp/progmodes/sh-script.el (sh-smie-sh-rules): Don't align with a && in
Stefan Monnier [Tue, 8 Jul 2014 18:38:07 +0000 (14:38 -0400)]
* lisp/progmodes/sh-script.el (sh-smie-sh-rules): Don't align with a && in
the middle of a line.

Fixes: debbugs:17896
10 years ago* doc/lispref/debugging.texi (Function Debugging, Debugger Commands):
Stefan Monnier [Tue, 8 Jul 2014 18:24:39 +0000 (14:24 -0400)]
* doc/lispref/debugging.texi (Function Debugging, Debugger Commands):
Update debug-on-entry w.r.t behavior after redefinitions.

Fixes: debbugs:17902
10 years ago* process.c (read_and_dispose_of_process_output): Fix typo
Paul Eggert [Tue, 8 Jul 2014 17:13:32 +0000 (10:13 -0700)]
* process.c (read_and_dispose_of_process_output): Fix typo

in previous patch: we want nonnegative fds, not nonzero fds.