Dmitry Antipov [Fri, 24 Jan 2014 03:53:16 +0000 (07:53 +0400)]
* xdisp.c (reseat_1, Fcurrent_bidi_paragraph_direction): Avoid
undefined behavior by initializing display property bit of a
string processed by the bidirectional iterator. For details, see
<http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01920.html>.
David Engster [Wed, 22 Jan 2014 21:50:47 +0000 (22:50 +0100)]
Update EIEIO documentation.
* eieio.texi (Introduction): Move introductory paragraph about
EIEIO and CLOS from 'Building Classes' to here.
(Documentation): Remove, since eieio-doc is not part of Emacs.
(Class Values, CLOS compatibility): Mention that
`describe-function' will also give information about classes.
Glenn Morris [Wed, 22 Jan 2014 19:26:45 +0000 (14:26 -0500)]
ChangeLog fix.
* lisp/ChangeLog: The installed change was based on this one:
http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00372.html
* etc/NEWS: Fix based on the fact that this does not work out of the box,
unless you fetch the notes, as described in
http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00015.html
Seems very non-intuitive to me...
Paul Eggert [Wed, 22 Jan 2014 19:02:41 +0000 (11:02 -0800)]
Fix miscellaneous update-game-score bugs.
* configure.ac (difftime): Remove.
* lib/update-game-score.c (difftime) [!HAVE_DIFFTIME]: Remove.
(read_score) [HAVE_GETDELIM]: Don't access uninitialized storage.
(read_scores, write_scores): Check for fclose failure.
(write_scores): Use fchmod, not chmod, to avoid a race.
(lock_file): Fix test for out-of-date lock file; it was reversed.
Use ordinary subtraction rather than difftime; since we're already
assuming POSIX we don't need to worry about the possibility of
time_t being a magic cookie.
Glenn Morris [Wed, 22 Jan 2014 17:26:14 +0000 (09:26 -0800)]
Fixes for emacs-repository-get-version
* lisp/version.el (emacs-repository-get-version):
Check either .bzr or .git, but not both.
Make the git case actually use the DIR argument, and return nil
rather than the empty string.
* etc/NEWS: Don't mention that emacs-repository-version works for git,
because it only returns nil (since it uses %N and there seem to be no
notes in the git version of the Emacs repo.)
No idea why this change is in trunk during a feature freeze anyway.
Martin Rudalics [Wed, 22 Jan 2014 10:29:23 +0000 (11:29 +0100)]
Fixes in window size functions around Bug#16430 and Bug#16470.
* window.c (Fwindow_pixel_width, Fwindow_pixel_height)
(Fwindow_mode_line_height, Fwindow_header_line_height)
(Fwindow_right_divider_width, Fwindow_bottom_divider_width):
Minor doc-string adjustments.
(Fwindow_total_height, Fwindow_total_width): New argument ROUND.
Rewrite doc-strings.
(window_body_height, window_body_width): Do not count partially
visible lines/columns when PIXELWISE is nil (Bug#16470).
(Qfloor, Qceiling): New symbols.
* window.el (window-total-size, window-size): New argument
ROUND.
(window--min-delta-1, window-min-delta, window--max-delta-1): Be
more conservative when calculating the numbers of lines or
columns a window can shrink (Bug#16430).
(fit-window-to-buffer): Simplify code.
* term.el (term-window-width): Call window-body-width again.
Michael Albinus [Tue, 21 Jan 2014 13:31:39 +0000 (14:31 +0100)]
* automated/file-notify-tests.el
(file-notify--test-local-enabled): Fix error in logic.
(file-notify--wait-for-events): New defmacro.
(file-notify-test02-events): Make short breaks between file operations.
Use `file-notify--wait-for-events'. Check, that events have arrived.
(file-notify-test03-autorevert): Use `file-notify--wait-for-events'.
Stefan Monnier [Tue, 21 Jan 2014 13:09:55 +0000 (08:09 -0500)]
* lisp/emacs-lisp/eldoc.el: Properly remove message in minibuffer case.
(eldoc--message-command-p): New function.
(eldoc-display-message-p): Use it.
(eldoc-pre-command-refresh-echo-area): In the minibuffer case, the
message is not automatically erased for us.
(eldoc-print-current-symbol-info): Erase previous message, if any.
Tassilo Horn [Tue, 21 Jan 2014 08:18:30 +0000 (09:18 +0100)]
Fix regex used for searching citation keys.
* lisp/textmodes/reftex-cite.el (reftex-all-used-citation-keys): Fix
regex used for scanning for citation keys which failed for
citations with optional arguments.
Dmitry Antipov [Tue, 21 Jan 2014 02:28:57 +0000 (06:28 +0400)]
* buffer.c (Fkill_buffer): When killing an indirect buffer,
re-attach intervals to its base buffer (Bug#16502).
* intervals.c (set_interval_object): Move from here...
* intervals.h (set_interval_object): ... to here. Fix comments.
Paul Eggert [Mon, 20 Jan 2014 20:48:14 +0000 (12:48 -0800)]
Merge from gnulib.
This incorporates:
2014-01-20 stdalign: port to HP-UX compilers
2014-01-16 strtoimax: port to platforms lacking 'long long'
2014-01-16 update from texinfo
* doc/misc/texinfo.tex, lib/stdalign.in.h, lib/strtoimax.c:
Update from gnulib.
Paul Eggert [Mon, 20 Jan 2014 16:47:41 +0000 (08:47 -0800)]
Pacify valgrind by initializing buffer redisplay bit.
Problem reported by Dmitry Antipov in
<http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01756.html>.
* alloc.c (USE_VALGRIND): Move this to ...
* conf_post.h (USE_VALGRIND): ... here. Use booleans.
* buffer.c (Fget_buffer_create): Initialize redisplay bit
to pacify valgrind.
Paul Eggert [Mon, 20 Jan 2014 07:56:28 +0000 (23:56 -0800)]
Revert some of the CANNOT_DUMP fix.
Because of this, "make bootstrap" won't work if CANNOT_DUMP=yes,
but fixing this can wait until after the next release.
* leim/Makefile.in (RUN_EMACS): Keep EMACSLOADPATH empty.
* lisp/Makefile.in (emacs): Keep EMACSLOADPATH empty.
* src/lread.c (init_lread): Fix typo: NILP, not !NILP.
Eli Zaretskii [Sun, 19 Jan 2014 15:42:48 +0000 (17:42 +0200)]
Fix Cygwin w32 build broken by last commit in w32font.c.
src/w32font.c (w32_load_unicows_or_gdi32, get_outline_metrics_w)
(get_text_metrics_w, get_glyph_outline_w, get_char_width_32_w)
[!WINDOWSNT]: These functions are no longer compiled on Cygwin;
they are replaced by macros that expand into direct calls to the
corresponding functions from GDI32.DLL.
(globals_of_w32font) [WINDOWSNT]: Don't initialize g_b_* static
variables in the Cygwin build, they are unused.
Michael Albinus [Sun, 19 Jan 2014 13:23:18 +0000 (14:23 +0100)]
* eshell/esh-mode.el (eshell-password-prompt-regexp):
Use `password-word-equivalents'.
(eshell-watch-for-password-prompt): Let-bind `case-fold-search'
to t. (Bug#5664, Bug#13124)
Alan Mackenzie [Sun, 19 Jan 2014 12:32:47 +0000 (12:32 +0000)]
Bind open-paren-in-column-0-is-defun-start to nil at some entry points.
* progmodes/cc-engine.el (c-invalidate-state-cache-1)
(c-parse-state-1, c-guess-basic-syntax): Bind it here.
* progmodes/cc-mode.el (c-before-change, c-after-change)
(c-font-lock-fontify-region): Bind it here.
Paul Eggert [Sun, 19 Jan 2014 08:50:53 +0000 (00:50 -0800)]
update-game-score fixes for -m and integer overflow
* update-game-score.c: Include inttypes.h, stdbool.h.
(min): New macro, if not already defined.
(MAX_SCORES, main): Limit the maximum number of scores only from
limits imposed by the underyling platform, instead of the
arbitrary value 200.
(struct score_entry, main, read_score, write_score):
Scores are now intmax_t, not long.
(get_user_id): Reject user names containing spaces or newlines,
as they would mess up the score file.
Allow uids that don't fit in 'long'.
Increase the size of the buffer, to avoid overrun in weird cases.
(get_prefix, main): Use bool for boolean.
(main): Rewrite expr to avoid possibility of signed integer
overflow. Don't allow newlines in data, as this would mess up
the score file. Check for memory allocation failure when adding
the new score, or when unlockint the file. Implement -m.
(read_score): Check for integer overflow when reading a score.
(read_score) [!HAVE_GETDELIM]: Check for integer overflow when
data gets very long. Check only for space to delimit names,
since that's what's done in the HAVE_GETDELIM case.
(read_scores): New parameter ALLOC. Change counts to ptrdiff_t.
All uses changed. Use push_score to add individual scores;
that's simpler than repeating its contents.
(score_compare_reverse): Simplify.
(push_score): New parameter SIZE. Change counts to ptrdiff_t.
All uses changed. Check for integer overflow of size calculation.
(sort_scores, write_scores): Change counts to ptrdiff_t.
(unlock_file): Preserve errno on success, so that storage
exhaustion is diagnosed correctly.
Eli Zaretskii [Sat, 18 Jan 2014 11:46:22 +0000 (13:46 +0200)]
Fix file name handling on MS-Windows 9X.
src/w32.c (maybe_load_unicows_dll): New function.
src/emacs.c (main) [WINDOWSNT]: Call maybe_load_unicows_dll early
on, to make sure we can convert file names to and from UTF-8 on
Windows 9X. This fixes a failure to start up because Emacs cannot
find term/w32-win.el. Reported by oslsachem <oslsachem@gmail.com>.
src/w32font.c [WINDOWSNT]: Include w32.h.
(w32_load_unicows_or_gdi32): Call maybe_load_unicows_dll, instead
of implementing the same stuff.
Remove now unused g_b_init_is_windows_9x.
src/w32.h (maybe_load_unicows_dll): Add prototype.
nt/runemacs.c (ensure_unicows_dll): Don't tell in the message box
that "emacs -nw" can do without UNICOWS.DLL on Windows 9X. See
w32.c:maybe_load_unicows_dll and its callers for the reason.
Michael Albinus [Fri, 17 Jan 2014 18:20:39 +0000 (19:20 +0100)]
Fix Bug#13124.
* net/tramp.el (tramp-password-prompt-regexp): Use
`password-word-equivalents' if available.
(tramp-action-password, tramp-process-one-action)
(tramp-read-passwd): Let-bind `case-fold-search' to t.
Chong Yidong [Fri, 17 Jan 2014 16:45:45 +0000 (17:45 +0100)]
Fix Bug#13124.
* simple.el (password-word-equivalents): New defcustom.
* comint.el (comint-password-prompt-regexp): Use it. Bump version to 24.4.
(comint-watch-for-password-prompt): Let-bind `case-fold-search' to t.
Eli Zaretskii [Fri, 17 Jan 2014 11:55:00 +0000 (13:55 +0200)]
Provisional fix for bug #16479 with client connecting while in a TTY menu.
src/menu.c (Fx_popup_menu): When invoking tty_menu_show, temporarily
switch to single keyboard. Prevents daemon crashes when a new
client connects while we show a TTY menu in an existing client.
Michael Albinus [Fri, 17 Jan 2014 11:50:15 +0000 (12:50 +0100)]
Fix Bug#13662.
* automated/inotify-test.el (inotify-file-watch-simple): Skip test
case if inotify is not linked with Emacs. Use `read-event' rather
than `sit-for' in order to process events.
Dmitry Gutov [Fri, 17 Jan 2014 03:15:02 +0000 (05:15 +0200)]
ruby-mode: Align def...end to the beginning of statement
* lisp/progmodes/ruby-mode.el (ruby-alignable-keywords): New constant.
(ruby-align-to-stmt-keywords): Change the default value. Use
`ruby-alignable-keywords' to generate the possible customization
choices.
(ruby-smie-rules): Instead of using a hardcoded list of alignable
keywords, check against the value of `ruby-alignable-keywords'
(http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01439.html).
Glenn Morris [Fri, 17 Jan 2014 02:11:36 +0000 (21:11 -0500)]
Make M-x authors return zero *Authors Errors* from current logs
* lisp/emacs-lisp/authors.el (authors-obsolete-files-regexps):
(authors-ignored-files): Add some entries, remove others.
(authors-ambiguous-files, authors-valid-file-names): Add some entries.
(authors-renamed-files-alist): Add, remove, and adjust entries.
(authors-renamed-files-regexps): Add some entries.
Remove some very broad ones. Make some entries `lax'.
(authors-lax-changelogs): New constant.
(authors-disambiguate-file-name): Treat top-level specially.
(authors-lax-changelog-p): New function.
(authors-canonical-file-name): Check file as written against
authors-valid-file-names. Do not special-case etc/.
Handle `lax' logs and authors-renamed-files-regexps elements.
* admin/make-tarball.txt: Update for no expected *Authors Errors*.