1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-21 12:03:55 -08:00
Commit graph

36616 commits

Author SHA1 Message Date
Paul Eggert
ad013ba631 Minor cleanups for Lisp objects and symbols
* alloc.c (next_vector, set_next_vector):
* lisp.h (lisp_h_INTEGERP, make_number, XFASTINT, make_natnum):
(lisp_h_make_number) [USE_LSB_TAG]:
Use Lisp_Int0 instead of the mystery constant 0.
* alloc.c (mark_object): Always set and use po; that's simpler.
(CHECK_LIVE, CHECK_ALLOCATED_AND_LIVE):
Properly parenthesize definientia.
* bidi.c (bidi_initialize):
* buffer.c (init_buffer_once):
* nsfns.m (syms_of_nsfns):
* nsmenu.m (syms_of_nsmenu):
* nsselect.m (syms_of_nsselect):
Prefer DEFSYM to defining by hand.
* data.c: Fix too-long line.
* lisp.h (DECLARE_GDB_SYM): New macro.
(DEFINE_GDB_SYMBOL_BEGIN): Use it.
(DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END) [!MAIN_PROGRAM]:
Declare the symbol, so it's visible to everywhere lisp.h is included.
Move forward decls as far forward as they can go,
to allow future changes to use them.
2014-12-18 18:12:24 -08:00
Paul Eggert
d9639a28cf * gnutls.c: Include gnutls.h.
This to check syms_of_gnutls's API even when !HAVE_GNUTLS.
2014-12-18 14:32:38 -08:00
Paul Eggert
d8183f8fef * image.c (svg_load): Fix pointer signedness. 2014-12-18 13:16:41 -08:00
Martin Rudalics
47f730e3b6 Add code for "preserving" window sizes.
* frame.c (frame_windows_min_size): New argument IGNORE.
(adjust_frame_size): When called from change_frame_size call
frame_windows_min_size with IGNORE Qt so we can ignore size
restrictions.

* dired.el (dired-pop-to-buffer): Call fit-window-to-buffer with
`preserve-size' t.
(dired-mark-pop-up): Preserve size of window showing marked
files.
* electric.el (Electric-pop-up-window):
* help.el (resize-temp-buffer-window): Call fit-window-to-buffer
with `preserve-size' t.
* minibuffer.el (minibuffer-completion-help): Use
`resize-temp-buffer-window' instead of `fit-window-to-buffer'
(Bug#19355).  Preserve size of completions window.
* register.el (register-preview): Preserve size of register
preview window.
* tmm.el (tmm-add-prompt): Call fit-window-to-buffer
with `preserve-size' t (Bug#1291).
* window.el (with-displayed-buffer-window): Add calls to
`window-preserve-size'.
(window-min-pixel-size, window--preservable-size)
(window-preserve-size, window-preserved-size)
(window--preserve-size, window--min-size-ignore-p): New
functions.
(window-min-size, window-min-delta, window--resizable)
(window--resize-this-window, split-window-below)
(split-window-right): Amend doc-string.
(adjust-window-trailing-edge): Handle preserving window
sizes.  Signal user-error instead of an error when there's no
window above or below.
(window--min-size-1, window-sizable, window--size-fixed-1)
(window-size-fixed-p, window--min-delta-1)
(frame-windows-min-size, window--max-delta-1, window-resize)
(window--resize-child-windows, window--resize-siblings)
(enlarge-window, shrink-window, split-window): Handle preserving
window sizes.
(window--state-put-2): Handle horizontal scroll bars.
(window--display-buffer): Call `preserve-size' if asked for.
(display-buffer): Mention `preserve-size' alist member in
doc-string.
(fit-window-to-buffer): New argument PRESERVE-SIZE.
2014-12-18 18:12:24 +01:00
Eli Zaretskii
b197822916 Allow querying font by name for its height and other info. (Bug#19395)
src/font.c (Ffont_info): Add more font information to the vector
 returned by the function, inspired by query-font.  Doc fix.

 doc/lispref/display.texi (Low-Level Font): Document font-info and query-font.

 lisp/international/mule-diag.el (describe-font-internal): Display
 additional info returned by font-info.
 lisp/linum.el (linum--face-width): Rename from linum--face-height,
 and use the new functionality of font-info.
 (linum-update-window): Use linum--face-width and frame-char-width,
 instead of approximating with height.

 etc/NEWS: Mention the enhancement in font-info.
2014-12-18 18:07:26 +02:00
Stefan Monnier
9e77c1b7bc * src/keyboard.c (input_was_pending): New var.
(read_char): Use it to make sure we only skip redisplay when we can't
keep up with the repeat rate.
2014-12-17 21:03:30 -05:00
Stefan Monnier
ec10ba2792 * src/keyboard.c (swallow_events): Don't redisplay if there's input pending. 2014-12-17 17:08:07 -05:00
Ulf Jasper
ad46070e42 Fixed problems with svg_load_image -- no more crashes (hopefully)
* src/image.c (svg_load): Watch out for nil value of current buffer's
filename.  Re-enable filename thing for not-a-file case.
2014-12-17 22:00:22 +01:00
Ulf Jasper
af2952fb27 Partially disabled previous change.
* src/image.c (svg_load): Temporarily disabled filename thing for
not-a-file case as it can cause crashs.
2014-12-17 21:42:23 +01:00
Ulf Jasper
197a9e0c9e Fix problem with images referenced within svg files. (bug#19373)
Fixes: debbugs:19373

* src/image.c: Additional parameter 'filename' for
svg_load_image. Include "buffer.h".  Define library function
rsvg_handle_set_base_uri for WINDOWSNT.
(init_svg_functions): Initialize rsvg_handle_set_base_uri.
(fn_rsvg_handle_set_base_uri): Define fn_rsvg_handle_set_base_uri.
(svg_load): Pass a filename to svg_load_image: either name of
actual file or of current buffer's file.
(svg_load_image): New parameter 'filename', used for setting
base_uri, necessary for loading referenced images.
2014-12-17 20:50:12 +01:00
Paul Eggert
005b86c0d0 * lread.c (init_obarray): Declare Qt as special.
This fixes a typo in the 2012-05-15 patch that
tried to declare Qt as special.
2014-12-16 14:50:01 -08:00
Stefan Monnier
07e47aad41 * src/: Various fixes to use bool type and constants.
* src/dispnew.c (update_single_window): Remove arg `force_p' since it's
always true.
* src/xfaces.c (clear_face_cache): Use bool for the argument type.
2014-12-15 15:41:11 -05:00
Paul Eggert
e2815bfe2a Correct same_at_end when restoring window points
* fileio.c (Finsert_file_contents): Compute same_at_end character
position using the old buffer size, not the new one, since
restore_window_points wants the old size.
Fixes: debbugs:19161
2014-12-15 00:01:42 -08:00
Alan Mackenzie
3713931778 New feature optionally to accelerate auto-repeated scrolling.
src/xdisp.c: Remove "static" from declaration of
Qfontification_functions.

src/window.c (window_scroll): bind fontification-functions to nil when
scrolling by whole screens and fast-but-imprecise-scrolling is non-nil.
(syms_of_window): New DEFVAR_BOOL fast-but-imprecise-scrolling.

src/lisp.h (bool): Declare Qfontification_functions extern.

lisp/cus-start.el (all): Add fast-but-imprecise-scrolling.

doc/emacs/display.texi (Scrolling): fast-but-imprecise-scrolling.
Describe new variable.

etc/NEWS: Add entry for fast-but-imprecise-scrolling.
2014-12-14 18:26:44 +00:00
Eli Zaretskii
e99ce63233 Load system's default trusted Certificate Authorities if available.
src/gnutls.c (gnutls_certificate_set_x509_system_trust)
 [GNUTLS >= 3.0.20]: Declare for WINDOWSNT.
 (init_gnutls_functions)(gnutls_certificate_set_x509_system_trust)
 [GNUTLS >= 3.0.20]: Load from shared library for WINDOWSNT.
 (fn_gnutls_certificate_set_x509_system_trust) [!WINDOWSNT]: Define
 new macro.
 (Fgnutls_boot) [GNUTLS >= 3.0.20]: Call
 gnutls_certificate_set_x509_system_trust.  Log an error message if
 it fails.
2014-12-14 18:47:51 +02:00
Paul Eggert
3de474e4ac Spelling fixes
All uses changed.
* lib-src/etags.c (analyze_regex): Rename from analyse_regex.
* lisp/cedet/semantic/lex-spp.el:
(semantic-lex-spp-analyzer-do-replace):
Rename from semantic-lex-spp-anlyzer-do-replace.
* lisp/emacs-lisp/cconv.el (cconv--analyze-use):
Rename from cconv--analyse-use.
(cconv--analyze-function): Rename from cconv--analyse-function.
(cconv-analyze-form): Rename from cconv-analyse-form.
* src/regex.c (analyze_first): Rename from analyze_first.
2014-12-13 23:41:33 -08:00
Glenn Morris
a8af924ba9 Place ChangeLog entries in the correct files 2014-12-13 17:50:06 -08:00
Eli Zaretskii
c081fe29d7 Fix dates in ChangeLog entries merged from emacs-24. 2014-12-13 10:00:31 +02:00
Paul Eggert
d19bf72ac9 Spelling fixes 2014-12-12 18:42:57 -08:00
Paul Eggert
7fc616afcf Replace union hack with C11-style max_align_t
* admin/merge-gnulib (GNULIB_MODULES): Add stddef, for max_align_t.
* lib/gnulib.mk: Regenerate.
* src/alloc.c (XMALLOC_BASE_ALIGNMENT): Use max_align_t instead of
a hack involving a union.
2014-12-12 17:54:02 -08:00
Ted Zlatanov
28e0d0c95d Merge from origin/emacs-24
bd6c441 * simple.el (password-word-equivalents): Add "passcode", used for numeric secrets like PINs or RSA tokens.
16d4c1c A better fix for bug#19346
82ec808 * .gitignore: Add !lib/std*.in.h, so as to not ignore the .in.h files.
3cf7629 Git ignore lib/std*.h
301a401 Always define `gnutls-available-p' even if GnuTLS is not available.
d76b9b2 Don't break example string between 2 lines (bug#19257)
75b4857 Port commit-msg to mawk
9ac0332 Improve commit-msg messages and autosquash
0c2f254 Support overflow-newline-into-fringe together with word-wrap (bug#19300)
935ee05 * net/tramp-sh.el (tramp-get-remote-path): Use a login shell in order to determine `tramp-own-remote-path'.
c2db939 python.el: Support interpreter paths with spaces
d83f329 ChangeLog fix
0f9fbb9 Port commit-message checking to FreeBSD 9.
3db1ada admin/MAINTAINERS: Update my interests and responsibilities.
6382f24 * .gitignore: Ignore autosave files.

Conflicts:
	ChangeLog
	lisp/progmodes/python.el
	src/gnutls.c
2014-12-12 19:23:19 -05:00
Stefan Monnier
aeeaf082e6 Fixes: debbugs:19161
* src/fileio.c: Better preserve window-points during revert.

(Qget_buffer_window_list): New var.
(get_window_points_and_markers, restore_window_points): New functions.
(Finsert_file_contents): Use them to save and restore window-points.
2014-12-11 16:07:23 -05:00
Dmitry Antipov
3e92b9882b Never pass an invalid X connection descriptor to an input reading loop
Fixes: debbugs:19147

* xterm.c (x_delete_terminal): Call emacs_close for X connection
descriptor if called from x_connection_closed and always delete
this descriptor from keyboard waiting set (Bug#19147).
2014-12-11 16:26:00 +03:00
Eli Zaretskii
f3e16cbb52 Fix out-of-memory condition in display of long bracketed lines (bug#19322)
src/bidi.c (BIDI_CACHE_MAX_ELTS_PER_SLOT): New macro.
 (bidi_cache_max_elts): New global variable.
 (bidi_shelve_header_size): Add the sizeof bidi_cache_max_elts.
 (bidi_cache_shrink, bidi_initialize): Reset bidi_cache_max_elts to
 its initial value.
 (bidi_cache_search): Handle overflown cache.  Improve commentary.
 (bidi_cache_ensure_space): Limit allocations to the current value
 of bidi_cache_max_elts.  Force xpalloc not to over-allocate.  If
 less than a full BIDI_CACHE_CHUNK is left to the limit, decrease
 the increment to not exceed the limit.
 (bidi_cache_iterator_state): Now returns non-zero if succeeded to
 cache, zero otherwise (meaning the cache overflowed).  In the
 latter case, set bidi_cache_last_idx to -1.
 (bidi_peek_at_next_level): Handle overflown cache.
 (bidi_push_it): Increase the cache limit for iterating the new
 object.
 (bidi_pop_it): Decrease the cache limit back to previous value.
 (bidi_shelve_cache): Shelve the current value of the cache limit.
 (bidi_unshelve_cache): Restore the value of cache limit.
 (bidi_find_bracket_pairs): If the cache overflows while looking
 for the paired bracket, give up and let bidi_resolve_neutrals
 process the bracket as a simple neutral.
 (bidi_find_other_level_edge): If the cache overflows, fall back on
 Plan B, which effectively stops the reordering and restarts it on
 the next character (after resetting the cache).
 (bidi_move_to_visually_next): When the cache overflows, reset it
 after processing the last cached character.
2014-12-10 19:42:12 +02:00
Paul Eggert
99be75085c Fix glitches in gnutls.c, mostly memory-related
* gnutls.c: Sort macro definitions by name.
(fn_gnutls_transport_set_errno): Omit unreachable definition.
(fn_gnutls_x509_crt_get_signature): Omit unused symbol.
(gnutls_hex_string): Arg is now unsigned char *, to avoid a cast.
Prefer ptrdiff_t for sizes.  Check for arithmetic overflow when
calculating string length.  Use make_uninit_string, to avoid
copying the string.  Cast the char, not the pointer.
(gnutls_certificate_details): Use xmalloc and xfree, not malloc
and free.  Work even for dates past the year 9999.  Use void *
for buffers, to avoid casts.
2014-12-09 23:47:45 -08:00
Paul Eggert
cc857dd0db Fix misspellings like "an unibyte buffer" 2014-12-09 16:27:23 -08:00
Andy Moreton
9b185aa1ae gnutls.c (gnutls_protocol_get_name): Fix a copy/paste typo. 2014-12-09 19:16:55 +02:00
Lars Magne Ingebrigtsen
ad67503f50 Make gnutls-peer-status return even more data
* src/gnutls.c (Fgnutls_peer_status): Return the key exchange, cipher
and MAC algorithms.
2014-12-08 22:23:50 +01:00
Lars Magne Ingebrigtsen
d81562f583 (Fgnutls_error_fatalp): Doc fix (bug#18210)
Fixes: debbugs:18210
2014-12-08 21:12:11 +01:00
Stefan Monnier
b76bea4c26 Various minor details accumulated over time
* lisp/info.el (Info-mode-map): Remove left-over binding.
* lisp/net/tramp.el (tramp-handle-make-symbolic-link): Mark unused arg.
* lisp/obsolete/gulp.el (gulp-create-m-p-alist): Remove unused var `mnt-tm'.
* lisp/progmodes/gud.el (gud-gdb-completions): Remove unused var `start'.
* lisp/url/url-http.el (url-http-activate-callback): Make debug more verbose.
* src/process.c: Whitespace and line-break nitpicks.
2014-12-08 15:02:26 -05:00
Lars Magne Ingebrigtsen
e0e2f363e8 Fatal GnuTLS errors are now silent by default
Fixes: debbugs:16253

(emacs_gnutls_handle_error): Fatal errors should be on level 1, so
that they are not messaged by default.
2014-12-08 20:57:49 +01:00
Lars Magne Ingebrigtsen
7c67502647 * src/gnutls.c: Add Windows specs for gnutls_dh_get_prime_bits. 2014-12-08 20:09:31 +01:00
Lars Magne Ingebrigtsen
ca7ad4271c Put back :signature-algorithm into gnutls.c
(gnutls_certificate_details): Put :signature-algorithm back again,
which was removed by mistake.
2014-12-08 19:58:39 +01:00
Lars Magne Ingebrigtsen
a0fe9b0481 (Fgnutls_peer_status): Return the DH prime bits for the connection 2014-12-08 19:48:38 +01:00
Lars Magne Ingebrigtsen
c498441ee6 (gnutls_certificate_details): Clean up whitespace slightly. 2014-12-08 19:40:50 +01:00
Lars Magne Ingebrigtsen
172bcf6f9f Remove unused data from gnutls_certificate_details
* src/gnutls.c (gnutls_certificate_details): The :signature isn't
that useful, so remove it.
2014-12-08 19:35:57 +01:00
Eli Zaretskii
2354db7f53 Fix merge glitches in 2 ChangeLog files. 2014-12-08 19:10:38 +02:00
Jan D
f3a685812a Fixes: debbugs:19133
* nsimage.m (setPixmapData): Make bmRep local so class member is not
set.
2014-12-07 17:12:40 +01:00
Stefan Monnier
4fda400e58 Merge from emacs-24 2014-12-05 15:30:09 -05:00
Eli Zaretskii
fcc4da3e52 Reduce memory footprint of struct bidi_it by a factor of 5.
src/dispextern.h (enum bidi_dir_t): Force NEUTRAL_DIR to be zero.
 (struct bidi_stack): Reduce size by using bit fields and by
 packing sos, override, and isolate_status into a single 8-bit
 byte called 'flags'.
 src/bidi.c (ISOLATE_STATUS, OVERRIDE): New macros.
 (bidi_push_embedding_level): Construct flags from individual
 bits.  Adapt to changes in prev_for_neutral and next_for_neutral
 members.
 (bidi_pop_embedding_level): Use ISOLATE_STATUS.  Extract 'sos'
 from flags.  Adapt to changes in prev_for_neutral,
 next_for_neutral, and last_strong members.
 (bidi_line_init): Initialize flags to zero.
 (bidi_resolve_explicit, bidi_resolve_weak, bidi_resolve_brackets)
 (bidi_resolve_neutral): Use ISOLATE_STATUS and OVERRIDE.
2014-12-05 12:17:15 +02:00
Stefan Monnier
6194477a62 * src/eval.c (backtrace_eval_unrewind): Rewind also the excursions.
(Fapply): Try and simplify the control flow.
2014-12-04 14:16:59 -05:00
Lee Duhem
c1c2cee7c5 * src/eval.c (Fsignal): Remove duplicate test.
(Fautoload_do_load): Fix up docstring.
2014-12-04 14:13:13 -05:00
Chris Zheng
38aaf904c7 Fix gnutls.c build on MinGW
Fixes: debbugs:19231

* gnutls.c (init_gnutls_functions, gnutls_certificate_details):
Use gnutls_sign_get_name directly because
gnutls_sign_algorithm_get_name is a macro on MinGW.
(init_gnutls_functions): Load missing gnutls_server_name_set.
2014-12-03 15:40:18 +01:00
Eli Zaretskii
dd601050e7 Allow to search for characters whose bidi directionality was overridden.
src/bidi.c (bidi_find_first_overridden): New function.
 src/xdisp.c (Fbidi_find_overridden_directionality): New function.
 (syms_of_xdisp): Defsubr it.
 src/dispextern.h (bidi_find_first_overridden): Add prototype.

 doc/lispref/display.texi (Bidirectional Display): Document
 'bidi-find-overridden-directionality'.

 etc/NEWS: Mention 'bidi-find-overridden-directionality'.
2014-12-02 16:13:47 +02:00
Jan Djärv
a92789b1fc Fixes: debbugs:9133
* nsimage.m (initFromSkipXBM:width:height:flip:length:): Set bmRep
to nil after release.
2014-12-02 14:30:47 +01:00
Jan Djärv
d9d3831472 More flicker fixes for OSX, related to bug 18757.
* nsfns.m (ns_set_name_as_filename): Don't set represented filename
at once, call ns_set_represented_filename instead.

* nsterm.h: Declare ns_set_represented_filename.

* nsterm.m (represented_filename, represented_frame): New variables.
(ns_set_represented_filename): New function.
(sendEvent:): Set represented filename here to avoid flicker,
related to Bug#18757.
2014-12-02 14:05:27 +01:00
Paul Eggert
3517da701e Port better to AddressSanitizer.
These changes suffice for temacs on x86-64 with GCC 4.9.2 and
-fsanitize=address.
* alloc.c (valid_pointer_p) [ADDRESS_SANITIZER]:
Return -1 or 0, as the pipe trick doesn't work.
* alloc.c (relocatable_string_data_p, mark_object, sweep_symbols):
* data.c (Ffset):
* print.c (print_object):
When a pointer-check primitive returns -1, do not assume this
means the pointer is valid or that the underlying system has failed.
It could just be that addresses are being sanitized so Emacs can't
test for pointer validity.
* lisp.h (defined_GC_CHECK_STRING_BYTES): New constant.
(USE_STACK_STRING) [GC_CHECK_STRING_BYTES]: Now false, since the
string validity checker doesn't work on stack-based strings.
2014-11-29 23:32:29 -08:00
Glenn Morris
aa1459ae2a Fix up merged ChangeLog entries (dates, duplication, etc) 2014-11-29 13:25:50 -08:00
Paul Eggert
366c1ceb03 Improve clarity of USE_LSB_TAG definition.
Problem reported by Lee Duhem.  Suggestion by Andreas Schwab in:
http://lists.gnu.org/archive/html/emacs-devel/2014-11/msg02222.html
* lisp.h (USE_LSB_TAG): Define in terms of the (simpler)
VAL_MAX / 2 rather than in terms of the (more complicated)
EMACS_INT_MAX >> GCTYPEBITS, and adjust commentary to match.
2014-11-28 23:39:06 -08:00
Paul Eggert
0cce3623b1 Merge branch 'emacs-24'. 2014-11-28 23:07:16 -08:00