1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-16 13:11:14 -08:00
Commit graph

31809 commits

Author SHA1 Message Date
Kenichi Handa
5cf2b69bdb Avoid crash with invalid default-process-coding-system.
* src/process.c (create_process): Call setup_process_coding_systems
after the pid of the process is set to -1.
2011-08-14 13:51:08 -04:00
Eli Zaretskii
daf17d00fb Fix bug #9296 with vertical cursor motion on images.
src/xdisp.c (move_it_in_display_line_to): Don't invoke
 IT_RESET_X_ASCENT_DESCENT when iterator position was restored from
 ppos_it.  Fixes vertical cursor motion when line beginning is
 covered by an image.
2011-08-14 14:10:19 +03:00
Jan Djärv
08e3161a51 Fix that executing applescript may hang emacs uninterruptedly.
* nsfns.m (as_script, as_result, as_status): New static variables.
(ns_run_ascript): New function.
(Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
the event loop.  Get status from as_status.

* nsterm.h (ns_run_ascript): Declare.
(NSAPP_DATA2_RUNASSCRIPT): Define.

* nsterm.m (sendEvent): If event is NSApplicationDefined and
data2 is NSAPP_DATA2_RUNASSCRIPT, call ns_run_ascript and then exit
the event loop (Bug#7276).
2011-08-14 12:39:38 +02:00
Andreas Schwab
a3720aa275 Follow variable naming convention
* src/gnutls.c (QCgnutls_bootprop_priority)
(QCgnutls_bootprop_trustfiles, QCgnutls_bootprop_keylist)
(QCgnutls_bootprop_crlfiles, QCgnutls_bootprop_callbacks)
(QCgnutls_bootprop_loglevel, QCgnutls_bootprop_hostname)
(QCgnutls_bootprop_min_prime_bits, QCgnutls_bootprop_verify_flags)
(QCgnutls_bootprop_verify_hostname_error)
(QCgnutls_bootprop_callbacks_verify): Rename from
Qgnutls_bootprop_..., all uses changed.

* src/xfaces.c (QCignore_defface): Rename from Qignore_defface, all
uses changed.
2011-08-14 11:08:02 +02:00
Andreas Schwab
b5f0301637 Whitespace cleanup 2011-08-14 11:08:01 +02:00
Paul Eggert
a29eb766a6 * src/xdisp.c (compute_display_string_pos): Fix bzr merge glitch. 2011-08-13 23:04:44 -07:00
Paul Eggert
19d5c50cbb * xfaces.c (Qframe_set_background_mode): Now static.
* dispextern.h (Qframe_set_background_mode): Remove decl.
2011-08-13 22:28:42 -07:00
Paul Eggert
0a0d27fb45 * process.c (Fnetwork_interface_info): Declare local only if needed. 2011-08-13 22:23:51 -07:00
Paul Eggert
358e1dd2b2 Merge from trunk. 2011-08-13 22:11:36 -07:00
Jan Djärv
377538cbcf Fix network-interface-list|info on newer BSD derived OS:es.
* configure.in: Add header check: sys/socket.h,
ifaddrs.h, net/if_dl.h.  Check for getifaddrs and freeifaddrs.
Check for sa_len in struct ifreq.ifr_addr (Bug#8477).

* src/process.c: Include ifaddrs.h and net/if_dl.h if available (Bug#8477).
(Fnetwork_interface_list): Allocate in increments of bytes instead
of sizeof (struct ifreq).  Iterate over ifconf.ifc_req by counting
bytes (Bug#8477).  Count bytes correctly when ifr_addr is a struct
sockaddr.
(struct ifflag_def): notrailers is smart on OSX.
(Fnetwork_interface_info): Handle case when ifr_flags is negative.
Get hardware address with getifaddrs if available.
2011-08-13 12:48:03 +02:00
Eli Zaretskii
08fff70c6e Fix bug #9284 with line/wrap-prefix property on display strings.
src/xdisp.c (iterate_out_of_display_property): xassert that
 IT->position is set to within IT->object's boundaries.  Break from
 the loop as soon as EOB is reached; avoids infloops in redisplay
 when IT->position is set up wrongly due to some bug.  Set
 IT->current to match the bidi iterator unconditionally.
 (push_display_prop): Allow GET_FROM_STRING as IT->method on
 entry; avoids crashes when line/wrap-prefix is set on a display
 string.  Force push_it to save on the stack the current
 buffer/string position, to be restored by pop_it.  Fix flags in
 the iterator structure wrt the object coming from a display
 property, as `line-prefix' and `wrap-prefix' are not ``replacing''
 properties.
2011-08-12 14:19:44 +03:00
Chong Yidong
7be1c708c5 Merge from emacs-23 branch 2011-08-09 18:13:11 -04:00
Eli Zaretskii
757664a454 Improve on previous change in xdisp.c. 2011-08-08 20:37:34 +03:00
Eli Zaretskii
97bb72a608 Speed up bidi redisplay with selective-display.
src/xdisp.c (forward_to_next_line_start): Allow to use the
 no-display-properties-and-no-overlays under bidi display.
2011-08-08 19:57:53 +03:00
Chong Yidong
37e11a6319 Lisp code shouldn't use set-time-zone-rule except through setenv.
* time.el (display-time-world-list, display-time-world-display):
* time-stamp.el (time-stamp-string):
* vc/add-log.el (add-change-log-entry): Use setenv instead of
set-time-zone-rule.

* src/editfns.c (Fset_time_zone_rule): Document relationship with the
setenv function.

Fixes: debbugs:7337
2011-08-08 11:53:35 -04:00
Chong Yidong
d56176114c Don't lose extra font info when using the Fontconfig font cache.
* src/ftfont.c (ftfont_pattern_entity): Copy the extras argument to
the font entity extracted from the cache.

Fixes: debbugs:8109
2011-08-08 10:49:34 -04:00
Chong Yidong
588728344d * composite.c (autocmp_chars): Don't reset point.
That is done by restore_point_unwind (Bug#5984).
2011-08-07 15:40:08 -04:00
Juri Linkov
75bfc66716 Minor doc fixes. Remove duplicate ChangeLog entries.
* doc/emacs/dired.texi (Operating on Files): Rewrite according to the fact
that `dired-do-chmod' doesn't use the `chmod' program anymore.

* lisp/faces.el (list-faces-display): Remove extra angle bracket
from `help-mode-map'.

* lisp/info.el (Info-history-toc-nodes): Doc fix.

* lisp/longlines.el (longlines-mode): Doc fix.

* src/editfns.c (Fformat_time_string): Doc fix, add tag `usage:'
to show the arg `TIME' instead of `TIMEVAL'.
2011-08-07 17:14:54 +03:00
Paul Eggert
3019ceda0d Merge from trunk. 2011-08-06 08:03:25 -07:00
Eli Zaretskii
75b771e489 Really fix bug #9224 with vertical-motion under word-wrap.
src/xdisp.c (move_it_in_display_line_to): Fix vertical-motion in a buffer
 with word-wrap under bidirectional display.
2011-08-06 14:49:35 +03:00
Eli Zaretskii
d141015034 Fix bug #9254 with crash and cursor positioning under longlines-mode.
src/xdisp.c (set_cursor_from_row): Fix cursor positioning when a
 display property strides EOL and includes a newline, as in
 longlines-mode.
 src/bidi.c (bidi_unshelve_cache): Don't reset the cache if JUST_FREE
 is non-zero, even if the data buffer is NULL.  Fixes a crash in
 vertical-motion with longlines-mode.
2011-08-06 13:59:36 +03:00
Paul Eggert
c3b9a83ed3 Merge from trunk. 2011-08-05 17:21:29 -07:00
Eli Zaretskii
412b635880 Bug #9224 was fixed together with bug #9221. 2011-08-05 17:31:40 +03:00
Eli Zaretskii
ec7cc85b39 Make bidi_cache_total_alloc static.
src/bidi.c <bidi_cache_total_alloc>: Now static.
 (bidi_initialize): Initialize bidi_cache_total_alloc.
2011-08-05 17:08:16 +03:00
Eli Zaretskii
5009803bda Fix bug #9221 with memory leak in bidi display.
Add code to monitor memory allocation for bidi cache shelving.

 src/xdisp.c (display_line): Release buffer allocated for shelved bidi
 cache.
 src/bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
 amount allocated this far in `bidi_cache_total_alloc'.
 (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if
 non-zero, only free the data buffer without restoring the cache
 contents.  All callers changed.
 src/dispextern.h (bidi_unshelve_cache): Update prototype.
 src/xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to)
 (move_it_in_display_line, move_it_to)
 (move_it_vertically_backward, move_it_by_lines): Replace the call
 to xfree to an equivalent call to bidi_unshelve_cache.
 (move_it_in_display_line_to): Fix logic of returning
 MOVE_POS_MATCH_OR_ZV in the bidi case.
2011-08-05 14:04:44 +03:00
Eli Zaretskii
3592834967 Fix bug #9221 with resource allocation under word-wrap.
Add diagnostic facility for monitoring memory allocated for cache shelving.

 src/xdisp.c (display_line): Release buffer allocated for shelved bidi
 cache.  (Bug#9221)
 src/bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
 amount allocated this far in `bidi_cache_total_alloc'.
 (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if
 non-zero, only free the data buffer without restoring the cache
 contents.  All callers changed.
 src/dispextern.h (bidi_unshelve_cache): Update prototype.
 src/xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to)
 (move_it_in_display_line, move_it_to)
 (move_it_vertically_backward, move_it_by_lines): Replace the call
 to xfree to an equivalent call to bidi_unshelve_cache.
 (move_it_in_display_line_to): Fix logic of returning
 MOVE_POS_MATCH_OR_ZV in the bidi case.
2011-08-05 13:48:37 +03:00
Eli Zaretskii
e2e2423bf2 Fix bug #9229 with cursor positioning on display strings.
src/xdisp.c (set_cursor_from_row): Prefer the candidate glyph that
 came from a string character with a `cursor' property.
2011-08-05 13:32:06 +03:00
Paul Eggert
d9f0172e44 Merge from trunk. 2011-08-04 13:43:14 -07:00
Jan Djärv
ae9e757af1 Check for pthread and use it if found.
* configure.in (HAVE_PTHREAD): Add check for -lpthread.
(HAVE_GTK_AND_PTHREAD): Remove.

* src/Makefile.in (LIB_PTHREAD): New variable.
(LIBES): Add LIB_PTHREAD (Bug#9216).

* src/alloc.c, src/emacs.c, src/gmalloc.c, src/gtkutil.c, src/keyboard.c, src/syssignal.h:
Rename HAVE_GTK_AND_PTHREAD to HAVE_PTHREAD (Bug#9216).
2011-08-04 19:04:39 +02:00
Andreas Schwab
213bd7f2f1 * regex.c (re_iswctype): Remove some redundant boolean conversions. 2011-08-04 16:25:21 +02:00
Jan Djärv
99aaf75f7c Set _NET_WM_WINDOW_OPACITY on outer window manager window also.
* xterm.c (x_find_topmost_parent): New function.
(x_set_frame_alpha): Find topmost parent window with
x_find_topmost_parent and set the property there also.
(handle_one_xevent): Call x_set_frame_alpha on ReparentNotify.

Fixes: debbugs:9181
2011-08-04 13:06:22 +02:00
Paul Eggert
c74e9d8682 * callproc.c (Fcall_process): Avoid vfork clobbering
the local vars buffer, coding_systems, current_dir.
2011-08-03 20:08:01 -07:00
Paul Eggert
b33f9238e9 Merge from trunk. 2011-08-03 17:58:07 -07:00
Stefan Monnier
640c8776f6 * src/keymap.c (Fmake_composed_keymap): Move to subr.el.
* lisp/subr.el (make-composed-keymap): Move from C.  Change calling
convention, and improve docstring to bring attention to a subtle point.
* lisp/minibuffer.el (completing-read-default): Adjust accordingly.
2011-08-03 17:40:06 -04:00
Paul Eggert
8a10d76c87 * fontset.c (dump_fontset) [FONTSET_DEBUG]: Declare EXTERNALLY_VISIBLE
so that it is not optimized away.
2011-08-03 12:54:12 -07:00
Paul Eggert
f26d0e4c33 * xdisp.c (compute_display_string_pos): Remove unused local. 2011-08-02 22:24:30 -07:00
Paul Eggert
9a70f03d70 Merge from trunk. 2011-08-02 22:05:38 -07:00
Eli Zaretskii
55439c615b Fix bug #9218 with slow cursor motion and scrolling Org Mode buffers.
src/dispextern.h (struct bidi_it): New member disp_prop_p.
 src/xdisp.c: Remove one-slot cache of display string positions.
 (compute_display_string_pos): Accept an additional argument
 DISP_PROP_P; callers changed. Scan at most 5K characters forward
 for a display string or property.  If found, set DISP_PROP_P
 non-zero.
 src/bidi.c (bidi_fetch_char): Accept an additional argument
 DISP_PROP_P, and pass it to compute_display_string_pos.  Only
 handle text covered by a display string if DISP_PROP_P is returned
 non-zero.  All callers of bidi_fetch_char changed.
2011-08-02 22:16:32 +03:00
Stefan Monnier
fb33fa43b4 * src/keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE. 2011-08-02 12:02:52 -04:00
Don March
b099e06392 Fix non-prefix key error message when last character M-[char] is translated to ESC [char] 2011-08-02 17:27:38 +02:00
Kenichi Handa
d0fffa3f69 src/ChangeLog: Fix format. 2011-08-02 12:50:38 +09:00
Kenichi Handa
5cc7f7afed Make uniprop_table non-static. 2011-08-02 12:49:09 +09:00
Eli Zaretskii
ffc21858b7 Fix last change for bug#9212. 2011-08-01 20:59:35 +03:00
Eli Zaretskii
525d5e6efa Fix bug #9212 with selective-display under bidi.
src/xdisp.c (forward_to_next_line_start): Accept additional argument
 BIDI_IT_PREV, and store into it the state of the bidi iterator had
 on the newline.
 (reseat_at_next_visible_line_start): Use the bidi iterator state
 returned by forward_to_next_line_start to restore the state of
 it->bidi_it after backing up to previous newline.  (Bug#9212)
2011-08-01 20:34:04 +03:00
Juanma Barranquero
e8500ff4af src/w32term.c: Fix typos in comments. 2011-07-31 22:38:48 +02:00
Andreas Schwab
31011111a1 * src/regex.c (re_comp): Protoize.
(re_exec): Fix return type.
(regexec): Fix type of `ret'.
2011-07-30 15:20:04 +02:00
Paul Eggert
e5d76069f0 * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
This is needed if max-image-size is a floating-point number.
2011-07-29 00:05:17 -07:00
Andreas Schwab
9a79b20c28 Implement ## reader macro
* src/lread.c (read1): Read ## as empty symbol.

* src/print.c (print_object): Print empty symbol as ##.
2011-07-28 22:23:19 +02:00
Alp Aker
d55e9c533f Fix for raise display property on NS (Bug#8913).
* src/nsfont.m (nsfont_open): Remove assignment to voffset and
unnecessary vars hshink, expand, hd, full_height, min_height.
(nsfont_draw): Use s->ybase as baseline for glyph drawing.

* src/nsterm.h (nsfont_info): Remove voffset field.
2011-07-28 14:50:05 -04:00
Alp Aker
bf3492a57e Fix display artifacts from ns_dumpglyphs_stretch (Bug#8470).
* src/nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
or scroll bar.
2011-07-28 14:41:21 -04:00