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

116839 Commits

Author SHA1 Message Date
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
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
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
Dmitry Antipov
d64a4984c1 * nsfont.m (nsfont_close): Free glyphs and metrics arrays as well. 2014-07-08 18:19:34 +04:00
Juri Linkov
7acd41f38f * lisp/startup.el (command-line): Append displaying the warning about
the errors in the init file to the end of `after-init-hook'.

Fixes: debbugs:17927
2014-07-08 12:17:09 +03:00
Juri Linkov
6dc311adc3 * lisp/faces.el (face-name): Return input arg `face' as is
when it's not a symbol.
(x-resolve-font-name): Don't check if the face is a symbol.

Fixes: debbugs:17956
2014-07-08 12:03:23 +03:00
Juri Linkov
b08e34f03a * lisp/facemenu.el (list-colors-print): In help-echo format use %.2f
instead of %d because now HSV values are floating-point components
between 0.0 and 1.0.
2014-07-08 11:55:00 +03:00
Juri Linkov
b89e78fd90 * lisp/vc/vc-annotate.el (vc-annotate-background-mode): New defcustom.
(vc-annotate-color-map): Use less saturated colors (20%) for
background-mode.
(vc-annotate-very-old-color): Add default value for background-mode.
(vc-annotate-background): Set default value to nil since now text on
the default backgrounds should be legible in light and dark modes.
(vc-annotate-lines): Use `vc-annotate-background-mode'.  Doc fix.

Fixes: debbugs:17808
2014-07-08 11:49:18 +03:00
Juri Linkov
43bb0be61a * lisp/simple.el (transpose-chars): Don't move point into read-only area.
Fixes: debbugs:17829
2014-07-08 11:27:46 +03:00
Juri Linkov
f0f70ec0bc * lisp/window.el (with-displayed-buffer-window): New macro.
(with-temp-buffer-window, with-current-buffer-window):
Use `macroexp-let2' to evaluate and bind variables
in the same order as macro arguments.
(display-buffer--action-function-custom-type): Add
`display-buffer-below-selected' and `display-buffer-at-bottom'.

* lisp/minibuffer.el (minibuffer-completion-help): Replace
`with-output-to-temp-buffer' with `with-displayed-buffer-window'
with actions that display *Completions* at-bottom when called
from the minibuffer, or below-selected in a normal buffer.
Associate `window-height' with `fit-window-to-buffer'.
Let-bind `pop-up-windows' to nil.

* lisp/dired.el (dired-mark-pop-up): Use `with-displayed-buffer-window'
instead of `with-current-buffer-window'.

Fixes: debbugs:17809
2014-07-08 11:02:50 +03:00
Dmitry Antipov
f298de5264 * chartab.c (char_table_translate): Move to...
* character.h (char_table_translate): ... inline function here.
Avoid Faref and assume that args are always valid.  This helps to
speedup search, which is especially important for a huge buffers.
* lisp.h (char_table_translate): Remove prototype.
2014-07-08 11:17:04 +04:00
Paul Eggert
12dc542935 * process.c: Add sanity checks for file descriptors.
(wait_reading_process_output, Fprocess_filter_multibyte_p):
Check that infd is nonnegative before using it as an fd.
(read_and_dispose_of_process_output, Fprocess_send_eof):
Likewise, for outfd.
(wait_reading_process_output): Omit unnecessary check of infd.

Fixes: debbugs:17844
2014-07-07 23:24:07 -07:00
Luke Lee
ffcba0a9a6 ChangeLog fix: correcting file path. 2014-07-08 09:52:48 +08:00
Paul Eggert
cae17e36bc Minor fixups related to usage of the 'long' type.
* gnutls.c (emacs_gnutls_handshake):
* xfaces.c (dump_realized_face):
Work even if 'long' is narrower than 'void *'.
* termcap.c (scan_file):
* xselect.c (x_decline_selection_request)
(x_reply_selection_request, x_get_window_property):
* xterm.c (x_set_frame_alpha):
Remove unnecessary 'L' suffixes of integer constants.
* xfns.c (hack_wm_protocols):
* xselect.c (x_fill_property_data):
* xterm.c (x_set_offset, x_set_window_size_1, x_make_frame_invisible):
Remove unnecessary casts to 'long'.
(set_machine_and_pid_properties): Don't assume pid_t fits in 32 bits.
2014-07-07 16:33:05 -07:00
Paul Eggert
0e14232948 Minor ImageMagick safety fixes.
* image.c (imagemagick_compute_animated_image):
Remove useless assignment to local.  Avoid problems if dest_width is 0.
(imagemagick_load_image): Use int for pixel counts that can't
exceed INT_MAX.  Avoid problem if PixelGetNextIteratorRow returns
a row width greater than the image width (or greater than LONG_MAX!).
2014-07-07 16:25:13 -07:00
Luke Lee
2c57885024 HideIfDef mode bug fixes and enhancements. This is #3 of 3 patches based
on the completed work posted on http://www.emacswiki.org/emacs/HideIfDef.

- Add macro evaluation function and key binding for a marked region.
- Merge continuous "..." lines into one.
- Fix old hideif bugs that fail to hide the correct #elif regions
- Support hide/show commands in a marked region.
- Expand top level for .h files to prevent re-inclusion protection.
- Change maintainer.

* lisp/progmodes/hideif.el (hide-ifdef-env): Change to global.
(hide-ifdef-env-backup): New variable.
(hide-ifdef-expand-reinclusion-protection, hide-ifdef-header-regexp):
New customizable variables.
(hif-clear-all-ifdef-defined): New defun.
(hif-merge-ifdef-region, hide-ifdef-region-internal, hide-ifdef-region)
(hif-show-ifdef-region): Merge hidden regions to prevent continuous "...".
(hif-tokenize): Fix for MS-DOS/Win EOL style.
(hif-endif-to-ifdef, hif-make-range, hif-find-range, hif-possibly-hide):
Fix bug to hide the correct #elif region(s).
(hif-range-elif): New defun.
(hif-recurse-level): New var.
(hif-evaluate-region, hif-evaluate-macro): New defun.
(hide-ifdef-guts): Prevent reinclusion protected C/C++ headers from
fully hidden.
(hide-ifdef-define, hide-ifdefs, hide-ifdef-block, show-ifdef-block):
Better interaction.
2014-07-07 16:59:32 +08:00
Katsumi Yamaoka
4cf00b8c15 lisp/gnus/gnus-start.el (gnus-dribble-read-file): Don't stop auto-saving 2014-07-07 05:47:59 +00:00
Glenn Morris
50802fa8e2 * cua-rect.el (cua--activate-rectangle): Avoid setting cua--rectangle to nil.
Fixes: debbugs:17877
2014-07-06 16:58:52 -07:00
Stephen Berman
41cd2704e2 * calendar/todo-mode.el: Fix wrong-type-argument error when
marking multiple consecutive items.
(todo-toggle-mark-item): Don't try to mark the empty lines at the
end of the todo and done items sections.  Note in doc string that
items marked by passing a numeric prefix argument can include the
last todo and first done items.
(todo-mark-category): Don't try to mark the empty line between the
todo and done items sections.
2014-07-06 22:28:38 +02:00
Stefan Monnier
b16a9348e4 * lisp/emacs-lisp/edebug.el (edebug-eval-defun): Print result using
proper Lisp quoting.

Fixes: debbugs:17934
2014-07-05 15:11:59 -04:00
Stefan Monnier
d66146bf18 * lisp/progmodes/ruby-mode.el (ruby-mode-variables): Don't meddle with
require-final-newline since prog-mode already took care of it.

Fixes: debbugs:17947
2014-07-05 14:37:45 -04:00
Kenichi Handa
aeb894a9a0 merge trunk 2014-07-05 23:07:57 +09:00
Eli Zaretskii
bff2d1ffc4 src/xdisp.c (pos_visible_p): Fix inaccurate comment. 2014-07-05 13:24:11 +03:00
Eli Zaretskii
546c26b394 Fix bug #17944 with pos-visible-in-window-p when there's image at window start.
src/xdisp.c (pos_visible_p): 	Fix condition for finding CHARPOS by the
 first call to move_it_to.
2014-07-05 12:53:50 +03:00
Eli Zaretskii
f2c74bf383 A better fix for bug #17942.
src/xdisp.c (pos_visible_p): If CHARPOS is at beginning of window,
 and there is a display property at that position, don't call
 move_it_to to move to a position before window start.
2014-07-05 11:24:07 +03:00
Eli Zaretskii
bf97132f83 Fix bug #17942 with pos-visible-in-window-p and image and BOB.
src/xdisp.c (pos_visible_p): If CHARPOS is at BEGV, and there is a
 display property at BEGV, don't call move_it_to to move to a
 position before BEGV.
2014-07-05 10:38:13 +03:00
Stefan Monnier
6246df666b * src/syntax.c (find_defun_start): Try the cache even
if !open_paren_in_column_0_is_defun_start.
(back_comment): If find_defun_start was pessimistic, use the
scan_sexps_forward result to improve the cache.

Fixes: debbugs:16526
2014-07-04 22:17:14 -04:00
Stephen Berman
661b90d8b6 * todo-mode.texi (Levels of Organization): Comment out statement
that Emacs recognizes todo files by their extension, since this
feature has been removed due to bug#17482.
2014-07-04 21:09:29 +02:00
Stephen Berman
95fab4ba13 * calendar/todo-mode.el: Fix two bugs. Shorten Commentary and
refer to the Todo mode Info manual.  Update the comment on
requiring cl-lib.
(todo-find-filtered-items-file): Add todo-prefix overlays.
(todo-filter-items): Reorder a let-bound variable to avoid a
wrong-type-argument error on canceling the file choice dialog.
2014-07-04 17:53:25 +02:00
Jan Djärv
8069993ef7 Backport from trunk.
* xfns.c (create_frame_xic): Pass XNStatusAttributes to XCreateIC
only if xic_style calls for it.  This change allows Emacs to work
with ibus.  Also, don't leak resources if create_frame_xic fails,
and stop caching xic_style across different displays.
(supported_xim_styles): Make const.
(best_xim_style): Remove first parameter: it's always just
supported_xim_styles.  Change to look at supported_xim_styles
directly.

Fixes: debbugs:17928
2014-07-04 17:15:02 +02:00
Eli Zaretskii
5b5953c070 Fix bug #17905 with display of point in partially visible line at end of window.
src/xdisp.c (redisplay_window): If redisplay of a window ends up
 with point in a partially visible line at end of the window, make
 sure the amended position of point actually has smaller Y
 coordinate; if not, give up and scroll the display.
 src/window.c (window_scroll_pixel_based): When point ends up at the
 last fully visible line, don't let move_it_to stop at the left
 edge of the line and dupe us into thinking point is inside the
 scroll margin.
2014-07-04 16:22:04 +03:00
Michael Albinus
a984543a44 * automated/dbus-tests.el (dbus-test02-register-service-session)
(dbus-test02-register-service-system): Fix docstring.
(dbus-test02-register-service-own-bus)
(dbus-test03-peer-interface): New tests.
2014-07-04 12:07:45 +02:00