1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-25 07:28:20 +00:00
Commit Graph

116868 Commits

Author SHA1 Message Date
Paul Eggert
a705278de7 * 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.
2014-07-13 17:45:19 -07:00
Paul Eggert
4939f58d2c 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.
2014-07-13 08:50:35 -07:00
Paul Eggert
d105c56ff9 Merge from gnulib, incorporating:
2014-06-27 mktime: merge #if/#ifdef usage from glibc
* lib/mktime.c: Update from gnulib.
2014-07-12 13:02:44 -07:00
Glenn Morris
b39c4d7b33 Merge from emacs-24; up to 2014-06-22T05:00:14Z!dmantipov@yandex.ru 2014-07-12 10:53:29 -07:00
Paul Eggert
fb02552638 * etags.c (Lisp_functions): Also record cl-defun etc.
Fixes: debbugs:17965
2014-07-12 09:26:54 -07:00
Eli Zaretskii
dc47c639f9 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.
2014-07-12 13:29:13 +03:00
Eli Zaretskii
47f63aa79a 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.
2014-07-12 12:25:29 +03:00
Eli Zaretskii
a5a8e250d5 etc/PROBLEMS: Update problems specific to MS-Windows. 2014-07-12 12:08:41 +03:00
Eli Zaretskii
2a0bae50e3 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
2014-07-12 10:47:40 +03:00
Dmitry Antipov
cf90015a10 * XMenuInt.h (XDeleteAssoc): Remove duplicated prototype to
pacify -Wredundant-decls.
2014-07-12 08:06:32 +04:00
Paul Eggert
114ce4b879 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
2014-07-11 19:24:02 -07:00
Paul Eggert
6a89fc81ea 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.
2014-07-11 10:55:24 -07:00
Paul Eggert
c9a1635c38 * Makefile.in (install-arch-indep): Avoid readdir race.
Fixes: debbugs:17971
2014-07-11 10:28:53 -07:00
Jan Djärv
4757131077 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.
2014-07-11 18:33:17 +02:00
Eli Zaretskii
d79194419b 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
2014-07-11 18:44:25 +03:00
Eli Zaretskii
e8963bd757 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
2014-07-11 16:58:02 +03:00
Eli Zaretskii
ca849522fe doc/lispref/internals.texi (Garbage Collection): Fix last change. 2014-07-11 15:49:49 +03:00
Michael Albinus
fb96e203d8 * sysdep.c (suppress_echo_on_tty): New function.
* minibuf.c (read_minibuf_noninteractive): Use it.
2014-07-11 14:35:23 +02:00
Dmitry Antipov
3aa96ff51e * 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.
2014-07-11 16:19:58 +04:00
Eli Zaretskii
5f7c30e757 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.
2014-07-11 13:09:51 +03:00
Eli Zaretskii
8f4fc468ca 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
2014-07-11 12:56:58 +03:00
Michael Albinus
0e02d309ef * NEWS: Passwords in batch mode are hidden. 2014-07-11 11:33:06 +02:00
Michael Albinus
c0ada75921 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
2014-07-11 11:09:54 +02:00
Eli Zaretskii
644656aa56 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.
2014-07-10 22:09:26 +03:00
Eli Zaretskii
64c333303c lisp/files.el (warn-maybe-out-of-memory): Fix the wording of the warning. 2014-07-10 21:19:37 +03:00
Glenn Morris
46b7604ea4 Tweak previous log-edit-changelog-entries change
* lisp/vc/log-edit.el (log-edit-changelog-entries):
Check for a visited-but-never-saved ChangeLog.
2014-07-10 14:09:04 -04:00
Dmitry Antipov
53dc172807 * files.el (warn-maybe-out-of-memory): Fix last change. 2014-07-10 17:00:45 +04:00
Dmitry Antipov
9242810cd3 * 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.
2014-07-10 16:33:35 +04:00
Dmitry Antipov
80fb41cd90 * 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.
2014-07-10 08:35:55 +04:00
Paul Eggert
09880d8533 * syntax.c (back_comment): Use more-natural location for label. 2014-07-09 16:39:58 -07:00
Paul Eggert
f507537736 * font.c, font.h (font_unparse_fcname): Now static.
Define only if HAVE_XFT || HAVE_FREETYPE || HAVE_NS.
2014-07-09 16:35:31 -07:00
Stefan Monnier
5d71cc6bfd * lisp/vc/log-edit.el (log-edit-changelog-entries): Don't both visiting
a non-existing file.

Fixes: debbugs:17970
2014-07-09 14:54:06 -04:00
Stefan Monnier
f972be090b * lisp/faces.el (face-name): Undo last change.
(x-resolve-font-name): Don't call face-name.

Fixes: debbugs:17956
2014-07-09 14:46:33 -04:00
Sam Steingold
140ea213db 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
2014-07-09 10:51:52 -04:00
Dmitry Antipov
205ededbb2 * coding.c (ALLOC_CONVERSION_WORK_AREA): Prefer ptrdiff_t to int and
so avoid integer overflow if decoded gap size exceeds INT_MAX bytes.
2014-07-09 14:36:35 +04:00
Dmitry Antipov
876d043fad 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.
2014-07-09 10:25:35 +04:00
Fabián Ezequiel Gallina
fded0b4a15 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
2014-07-09 00:55:53 -03:00
Stefan Monnier
388b22deb4 * lisp/rect.el (apply-on-rectangle): Check forward-line really moved to the
next line.
2014-07-08 22:20:21 -04:00
Glenn Morris
5613a6f6d5 Merge from emacs-24; up to 2014-06-19T14:03:45Z!monnier@iro.umontreal.ca 2014-07-08 19:04:12 -07:00
Stefan Monnier
27e81f9f4e * lisp/erc/erc.el (erc-channel-receive-names): Reduce redundancy. 2014-07-08 15:45:24 -04:00
Stefan Monnier
dff76c18cc * lisp/linum.el (linum--face-height): New function.
(linum-update-window): Use it to adjust margin to linum's width.

Fixes: debbugs:17813
2014-07-08 15:33:37 -04:00
Stefan Monnier
78478ff636 * 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.
2014-07-08 15:15:28 -04:00
Stefan Monnier
dee89b6708 * lisp/xt-mouse.el (xterm-mouse-translate-1): Intern drag event.
Remove also pointless window&mark manipulation.

Fixes: debbugs:17894
2014-07-08 14:47:47 -04:00
Stefan Monnier
d8899d09b9 * lisp/progmodes/sh-script.el (sh-smie-sh-rules): Don't align with a && in
the middle of a line.

Fixes: debbugs:17896
2014-07-08 14:38:07 -04:00
Stefan Monnier
c838708452 * doc/lispref/debugging.texi (Function Debugging, Debugger Commands):
Update debug-on-entry w.r.t behavior after redefinitions.

Fixes: debbugs:17902
2014-07-08 14:24:39 -04:00
Paul Eggert
ef0cc37f85 * process.c (read_and_dispose_of_process_output): Fix typo
in previous patch: we want nonnegative fds, not nonzero fds.
2014-07-08 10:13:32 -07:00
Stefan Monnier
5e799349fd * lisp/progmodes/perl-mode.el: Use syntax-ppss; fix one indentation case.
(perl-indent-line): Use syntax-ppss to detect we're in a doc-section.
(perl-continuation-line-p): Don't skip over anything else than labels.
Return the previous char.
(perl-calculate-indent): Use syntax-ppss instead of parse-start
and update callers accordingly.  For continuation lines, check the
the case of array hashes.
(perl-backward-to-noncomment): Make it non-interactive.
(perl-backward-to-start-of-continued-exp): Rewrite.
* test/indent/perl.perl: Add indentation pattern for hash-table entries.
2014-07-08 12:51:35 -04:00
Sam Steingold
a897d1b1fe New user commands, similar to what is available in ESS
* lisp/progmodes/inf-lisp.el (lisp-eval-paragraph, lisp-eval-form-and-next):
New user commands.
2014-07-08 11:35:29 -04:00
Eli Zaretskii
9aac592d88 Fix bug #17969 with vertical-motion through continuation lines with TABs.
src/xdisp.c (move_it_to): Adjust calculation of line_start_x to what
 x_produce_glyphs does when it generates a stretch glyph that
 represents a TAB.
2014-07-08 18:12:39 +03:00
Dmitry Antipov
96f17a2f73 * font.c (font_build_object) [HAVE_XFT || HAVE_FREETYPE || HAVE_NS]:
New function, with an intention to avoid code duplication between
a few font drivers.
* font.h (font_build_object) [HAVE_XFT || HAVE_FREETYPE || HAVE_NS]:
Add prototype.
* ftfont.c (ftfont_open):
* macfont.m (macfont_open):
* xftfont.c (xftfont_open): Use it.
2014-07-08 18:50:45 +04:00