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*.
Eric S. Raymond [Thu, 16 Jan 2014 15:05:18 +0000 (10:05 -0500)]
Minor correction to admin/notes/bzr: *fourth* VCS, not third.
RCS -> CVS -> Bzr -> Git. And (as Stefan Monnier reports) "GNU Arch
was semi-officially used for a while between CVS and Bzr, tho not for
the main branch."
Stefan Monnier [Thu, 16 Jan 2014 00:26:45 +0000 (19:26 -0500)]
* lisp/follow.el (follow-adjust-window): Remove `dest' argument.
Assume we're already in the proper buffer.
Inspired by Anders Lindgren <andlind@gmail.com>.
(follow-post-command-hook): Call it from the right buffer.
(follow-comint-scroll-to-bottom): Adjust call.
(follow-all-followers): Use get-buffer-window-list.
Paul Eggert [Wed, 15 Jan 2014 19:38:44 +0000 (11:38 -0800)]
Fix copyright license notices for Adobe Unicode mapping files.
* charsets/mapfiles/README: The copied files are not compressed.
Check for copies as of today.
* charsets/mapfiles/stdenc.txt, charsets/mapfiles/symbol.txt:
Update from table version 0.2 (1999-03-30) to 1.0 (2011-07-12).
This doesn't change the table data, just copyright license notice.
The new notices are compatible with the GPL, the old ones were not.
Nicolas Richard [Tue, 14 Jan 2014 22:30:42 +0000 (23:30 +0100)]
simple.el (define-alternatives): Add 'definition-name to COMMAND-alternatives
* simple.el (define-alternatives): When creating the
COMMAND-alternatives variable, assign COMMAND as its definition
name so that `describe-variable' can relocate it.
See http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01340.html
Daiki Ueno [Tue, 14 Jan 2014 08:41:09 +0000 (17:41 +0900)]
* epa-file.el: Respect buffer-file-format when writing
* epa-file.el (epa-file-write-region): Encode the region according
to `buffer-file-format'. Problem reported at:
<http://sourceforge.jp/ticket/browse.php?group_id=2267&tid=32917>.
Paul Eggert [Tue, 14 Jan 2014 01:19:42 +0000 (17:19 -0800)]
Fix MinGW64 porting problem with _setjmp.
Reported by Eli Zaretskii in:
http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01297.html
* image.c (FAST_SETJMP, FAST_LONGJMP): New macros, replacing
the old _setjmp and _longjmp. All uses changed.
Bastien Guerry [Mon, 13 Jan 2014 22:13:44 +0000 (23:13 +0100)]
`define-alternatives' bugfix and UI enhancement
* simple.el (define-alternatives): Call the selected command
interactively. When setting `COMMAND--implementation' for the
first time, tell the user how to chose another implementation.
Enhance the docstring.
David Engster [Mon, 13 Jan 2014 20:04:08 +0000 (21:04 +0100)]
Merge bug fixes from CEDET upstream.
* semantic/analyze/refs.el (semantic-analyze-refs-impl): Fix Typo
in a doc string.
* semantic/ia.el (semantic-ia-complete-symbol): Ignore case if
prefix is all lower case.
(semantic-ia-fast-jump): Push mark before jumping to an include
file.
* semantic/complete.el (semantic-displayor-point-position):
Calculate if the toolbar is on the left when calculating point
position.
Stefan Monnier [Mon, 13 Jan 2014 15:33:01 +0000 (10:33 -0500)]
* lisp/vc/log-edit.el: Fix highlighting of summary when it's the first line.
(log-edit--match-first-line): New function.
(log-edit-font-lock-keywords): Use it.
(log-edit-mode): Make jit-lock-defer-multiline work.
Bastien Guerry [Mon, 13 Jan 2014 10:55:22 +0000 (11:55 +0100)]
Partially fix Bug#16403.
* rect.el (rectangle-mark-mode): When the region is not active,
display a message saying that the mark as been set and that
rectangle mode is in use.
(rectangle--highlight-for-redisplay): Only put an overlay with a
visible vertical bar when (display-graphic-p) is non-nil.
This partially fixes Bug#16403.
Jan Djärv [Mon, 13 Jan 2014 10:32:48 +0000 (11:32 +0100)]
* macfont.m: Include termchar.h.
(CG_SET_FILL_COLOR_WITH_FACE_FOREGROUND)
(CG_SET_FILL_COLOR_WITH_FACE_BACKGROUND)
(CG_SET_STROKE_COLOR_WITH_FACE_FOREGROUND): Modified from
*_WITH_GC_* to take face and f as parameters.
(macfont_draw): Check for DRAW_MOUSE_FACE and set face accordingly.
Use *_WITH_FACE_*, and pass face as parameter.
Juri Linkov [Mon, 13 Jan 2014 08:04:09 +0000 (10:04 +0200)]
* lisp/info.el (Info-find-file): Go to DIR before displaying the error
about a nonexistent file if no previous Info file is visited.
Use `user-error' instead of `error' for "Info file %s does not exist".
(Info-find-node-2): In case of a nonexistent node in unwind forms
go to the Top node if there is no previous node to revert to.