1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-01 18:00:40 -08:00
Commit graph

11979 commits

Author SHA1 Message Date
Paul Eggert
db7b8d066d * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
Privately reported by Herbert J. Skuhra.
(make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
All uses changed.
(system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
not make_lisp_timeval, when the argument is of type EMACS_TIME.
2012-06-23 09:44:45 -07:00
Eli Zaretskii
9651255509 Fix a bug in w32-get-locale-info.
src/w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
 last argument of make_unibyte_string.
2012-06-23 15:44:42 +03:00
Eli Zaretskii
0bd8297f9c Improve and document the language-change event on MS-Windows.
src/keyboard.c (kbd_buffer_get_event): Include the codepage and the
 language ID in the event parameters.
 src/w32term.c (w32_read_socket): Put the new keyboard codepage into
 event.code, not the obscure "character set ID".
 doc/lispref/commands.texi (Misc Events): Document the language-change event.
2012-06-23 15:39:23 +03:00
Chong Yidong
63def6b6d1 * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select. 2012-06-23 18:47:00 +08:00
Eli Zaretskii
388cdec072 Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
nt/inc/sys/time.h (struct timespec): Define.
 lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/dtotimespec.$(O),
 $(BLD)/gettime.$(O), $(BLD)/timespec-add.$(O), and
 $(BLD)/timespec-sub.$(O).
 ($(BLD)/dtotimespec.$(O)):
 ($(BLD)/gettime.$(O)):
 ($(BLD)/timespec-add.$(O)):
 ($(BLD)/timespec-sub.$(O)): New dependencies.
 lib/stat-time.h:
 lib/timespec.h:
 lib/utimens.h: Include sys/time.h
 src/w32.c (fdutimens): New function.
 src/w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
 src/s/ms-w32.h (pselect): Redirect to sys_select.
 src/sysselect.h [WINDOWSNT]: Don't include sys/select.h.

Fixes: debbugs:9000
2012-06-23 13:22:59 +03:00
Eli Zaretskii
e8a022046f Really fix bug #11519, by fixing the last change in ralloc.c.
src/ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
 in the logic of incrementing and decrementing the value of
 use_relocatable_buffers.
2012-06-23 12:46:33 +03:00
Paul Eggert
d054f3fb9a * sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
Privately reported by Herbert J. Skuhra.
[__FreeBSD__]: Remove "*/" typo after "#include".
(timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
(TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
(TIMEVAL, system_process_attributes) [__FreeBSD__]:
Don't assume EMACS_TIME and struct timeval are the same type.
2012-06-23 01:21:48 -07:00
Paul Eggert
d35af63cd6 Support higher-resolution time stamps.
Fixes: debbugs:9000
2012-06-22 14:17:42 -07:00
Chong Yidong
b6a92dfe32 * xdisp.c (x_consider_frame_title): Revert last change. 2012-06-22 15:28:28 +08:00
Eli Zaretskii
d251c37c72 Enlarge NSTATICS to 0x650.
src/alloc.c (NSTATICS): Enlarge to 0x650.  Otherwise, Emacs compiled
 with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
 aborts in staticpro during startup.  (Without -DBYTE_CODE_METER,
 staticidx goes up to 1597 out of 1600 = 0x640.)
2012-06-22 09:51:06 +03:00
Paul Eggert
f10deafb12 * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
Otherwise, the umask might be mistakenly 0 while handling input signals.
2012-06-20 14:20:06 -07:00
Paul Eggert
8b5257e1d4 Fix misspelling of Dmitry's last name in ChangeLog. 2012-06-19 11:57:39 -07:00
Stefan Monnier
ec6de1e2ee * src/minibuf.c (Fread_string): Bind minibuffer-completion-table. 2012-06-19 13:05:41 -04:00
Dmitry Antipov
28be1ada0f * alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
* font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
* print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
access to `contents' member of Lisp_Vector objects with AREF and ASET
where appropriate.
2012-06-19 20:56:28 +04:00
Chong Yidong
c6bf302224 Preserve tty top-frames under various window-changing operations.
* subr.el (with-selected-window): Preserve the selected window's
terminal's top-frame.

* window.el (save-selected-window): Likewise.

* frame.c (delete_frame): When selecting a frame on a different
text terminal, do not alter the terminal's top-frame.

* term.c (Ftty_top_frame): New function.

* xdisp.c (format_mode_line_unwind_data): Record the target
frame's selected window and its terminal's top-frame.
(unwind_format_mode_line): Restore them.
(x_consider_frame_title, display_mode_line, Fformat_mode_line):
Callers changed.
(x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
since tty frames can be explicitly named.
(prepare_menu_bars): Likewise.

Fixes: debbugs:4702
2012-06-19 14:49:50 +08:00
Paul Eggert
defd4196e7 Port byte-code-meter to modern targets.
* bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
!CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG.  Problem with
CHECK_LISP_OBJECT_TYPE reported by Dmitry Andropov in
<http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
(METER_1, METER_2): Simplify.
2012-06-18 15:53:53 -07:00
Stefan Monnier
1053a8716b Fix return value of `defun' and un-define it.
* src/data.c (Fdefalias): Return `symbol'.
* doc/lispref/functions.texi (Defining Functions):
* doc/lispref/macros.texi (Defining Macros): Un-define the return value of
`defun', `defmacro' and `defalias'.

Fixes: debbugs:11686
2012-06-18 11:57:41 -04:00
Martin Rudalics
b7e8d08167 Handle cases where buffer gets killed while running Fkill_buffer (Bug#11665).
* buffer.c (Fkill_buffer): Don't throw an error when the buffer
gets killed during executing of this function (Bug#11665).  Try
to always return Qt when the buffer has been actually killed.
(Vkill_buffer_query_functions): In doc-string say that functions
run by this hook should not change the current buffer.
2012-06-18 09:20:19 +02:00
Paul Eggert
7ea2b33947 Fix recently-introduced process.c problems found by static checking.
* process.c (write_queue_push, write_queue_pop, send_process):
Use ptrdiff_t, not int or EMACS_INT, for buffer lengths and offsets.
(write_queue_pop): Fix pointer signedness problem.
(send_process): Remove unused local.
2012-06-17 23:58:00 -07:00
Chong Yidong
96a313a1da Optimization to avoid redisplaying hidden terminal frames.
* xdisp.c (redisplay_internal): No need to redisplay terminal
frames that are not on top.
2012-06-17 18:11:39 +08:00
Troels Nielsen
20ca2e9451 Ensure correct ordering of process writes.
* process.c (make_process): Initialize write_queue.
(write_queue_push, write_queue_pop): New functions.
(send_process): Use them to maintain correct ordering of process writes.

Fixes: debbugs:10815
2012-06-17 17:00:37 +08:00
Paul Eggert
310fbfa8e2 * lisp.h (eassert): Assume C89 or later.
This removes the need for CHECK.
(CHECK): Remove.  Its comments about always evaluating its
argument were confusing, as 'eassert' typically does not evaluate
its argument.
2012-06-17 01:21:25 -07:00
Paul Eggert
27bb1ca4b0 * coding.c (produce_chars): Use ptrdiff_t, not int. 2012-06-17 00:57:28 -07:00
Paul Eggert
9a900ca947 * xterm.c (x_draw_underwave): Check for integer overflow.
This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
2012-06-17 00:39:50 -07:00
Chong Yidong
41b7f8bc6c Merge changes from emacs-24; up to 2012-04-26T02:03:19Z!ueno@unixuser.org 2012-06-17 13:13:40 +08:00
Alp Aker
9b0e3ebaef Implement wave-style variant of underlining.
* doc/lispref/display.texi: Document new face attribute.
  * lisp/cus-face.el (custom-face-attributes): Add wave-style underline
  attribute.
  * lisp/faces.el (set-face-attribute): Update docstring.
  * src/dispextern.h (face_underline_type): New enum.
  (face): Add field for underline type.
  * src/nsterm.m (ns_draw_underwave): New function.
  (ns_draw_text_decoration): Use it.
  * src/w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
  New functions.
  (x_draw_glyph_string): Use them.
  * src/xfaces.c (Qline, Qwave): New Lisp objects.
  (check_lface_attrs, merge_face_ref)
  (Finternal_set_lisp_face_attribute, realize_x_face): Handle
  wave-style underline face attributes.
  * src/xterm.c (x_draw_underwave): New function.
  (x_draw_glyph_string): Use it.
2012-06-16 20:32:36 -04:00
Juanma Barranquero
0fb52f118b src/makefile.w32-in: Update dependencies. 2012-06-16 15:44:20 +02:00
Andreas Schwab
e5560ff7d2 * buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline.
(BUF_FETCH_MULTIBYTE_CHAR): Likewise.
* character.c (_fetch_multibyte_char_p): Remove.
* alloc.c: Include "character.h" before "buffer.h".
* bidi.c: Likewise.
* buffer.c: Likewise.
* bytecode.c: Likewise.
* callint.c: Likewise.
* callproc.c: Likewise.
* casefiddle.c: Likewise.
* casetab.c: Likewise.
* category.c: Likewise.
* cmds.c: Likewise.
* coding.c: Likewise.
* composite.c: Likewise.
* dired.c: Likewise.
* dispnew.c: Likewise.
* doc.c: Likewise.
* dosfns.c: Likewise.
* editfns.c: Likewise.
* emacs.c: Likewise.
* fileio.c: Likewise.
* filelock.c: Likewise.
* font.c: Likewise.
* fontset.c: Likewise.
* fringe.c: Likewise.
* indent.c: Likewise.
* insdel.c: Likewise.
* intervals.c: Likewise.
* keyboard.c: Likewise.
* keymap.c: Likewise.
* lread.c: Likewise.
* macros.c: Likewise.
* marker.c: Likewise.
* minibuf.c: Likewise.
* nsfns.m: Likewise.
* nsmenu.m: Likewise.
* print.c: Likewise.
* process.c: Likewise.
* regex.c: Likewise.
* region-cache.c: Likewise.
* search.c: Likewise.
* syntax.c: Likewise.
* term.c: Likewise.
* textprop.c: Likewise.
* undo.c: Likewise.
* unexsol.c: Likewise.
* w16select.c: Likewise.
* w32fns.c: Likewise.
* w32menu.c: Likewise.
* window.c: Likewise.
* xdisp.c: Likewise.
* xfns.c: Likewise.
* xmenu.c: Likewise.
* xml.c: Likewise.
* xselect.c: Likewise.
2012-06-16 14:24:15 +02:00
Eli Zaretskii
946fdb736d Fix bug #11720 with cursor positioning in outline-mode and Org buffers.
src/xdisp.c (set_cursor_from_row): Use the leftmost glyph as GLYPH_BEFORE, not
 the rightmost.
2012-06-16 14:47:44 +03:00
Eli Zaretskii
1097afe455 Fix bug #11653 with a crash when more than 16 overlay strings are loaded.
src/xdisp.c (handle_face_prop): Use chunk-relative overlay string index when
 indexing into it->string_overlays array.
2012-06-16 13:18:21 +03:00
Eli Zaretskii
2f07e6afc9 Fix bug #11653 with cursor positioning in a row that has only strings.
src/xdisp.c (set_cursor_from_row): Don't dereference glyphs_end.  If
 all the glyphs of the glyph row came from strings, and we have no
 cursor positioning clues, put the cursor on the first glyph of the
 row.
2012-06-16 12:57:56 +03:00
Andreas Schwab
29b83cecea * category.h (CHAR_HAS_CATEGORY): Define as inline.
(CATEGORY_MEMBER): Enforce 1/0 value.
* category.c (_temp_category_set): Remove.
2012-06-16 10:20:19 +02:00
Eli Zaretskii
4c5501e98f Fix bug #11677 with segfault when deleting windows under -batch.
src/window.c (Fdelete_other_windows_internal)
 (Fdelete_window_internal): Don't access frame's mouse highlight
 info of the initial frame.
2012-06-16 10:18:44 +03:00
Paul Eggert
e93864f943 .gdbinit: Update to match recent lisp.h changes. 2012-06-13 21:02:35 -07:00
Paul Eggert
2b57012478 Simplify lisp.h in minor ways that should not affect code.
* lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined.
(LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P)
(LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number):
Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined.
(INTTYPEBITS): New macro, for clarity.
(INTMASK, MOST_POSITIVE_FIXNUM): Use it.
(LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P): Simplify
now that USE_LSB_TAG is always defined.
(TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
(make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
2012-06-13 19:27:39 -07:00
Juanma Barranquero
81755f695c src/makefile.w32-in ($(BLD)/data.$(O)): Update dependencies. 2012-06-13 23:37:23 +02:00
Glenn Morris
16192a5711 Remove some unused definitions from src/s
* src/s/bsd-common.h (BSD4_3):
* src/s/usg5-4-common.h (USG5_4): No longer define; unused.

* admin/CPP-DEFINES, src/s/template.h: Related edits.
2012-06-13 14:11:05 -04:00
Andreas Schwab
646b5f55df Use a simple struct to implement compile time checks for the Lisp_Object type
* configure.in: Rename --enable-use-lisp-union-type to
--enable-check-lisp-object-type and define CHECK_LISP_OBJECT_TYPE
instead of USE_LISP_UNION_TYPE.

* admin/make-emacs: Rename --union-type to --check-lisp-type.  Define
CHECK_LISP_OBJECT_TYPE insted of USE_LISP_UNION_TYPE.
* admin/CPP-DEFINES (DEBUG_LISP_OBJECT_TYPE): Renamed from
USE_LISP_UNION_TYPE.

* src/lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
instead of union.
(XLI, XIL): Define.
(XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG): Use
them.
* src/emacs.c (gdb_use_struct): Renamed from gdb_use_union.
* src/.gdbinit: Check gdb_use_struct instead of gdb_use_union.
* src/alloc.c (widen_to_Lisp_Object): Removed.
(mark_memory): Use XIL instead of widen_to_Lisp_Object.
* src/frame.c (delete_frame): Remove outdated comment.
* src/w32fns.c (Fw32_register_hot_key): Use XLI instead of checking
USE_LISP_UNION_TYPE.
(Fw32_unregister_hot_key): Likewise.
(Fw32_toggle_lock_key): Likewise.
* src/w32menu.c (add_menu_item): Likewise.
(w32_menu_display_help): Use XIL instead of checking
USE_LISP_UNION_TYPE.
* src/w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE.
(init_heap): Likewise.
* src/w32term.c (w32_read_socket): Update comment.
2012-06-13 15:40:48 +02:00
Glenn Morris
c62ff70691 Remove HAVE_SYSV_SIGPAUSE unused remnants
* src/s/usg5-4-common.h, src/s/unixware.h:
Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04).

* admin/CPP-DEFINES: Remove HAVE_SYSV_SIGPAUSE.
2012-06-12 22:39:20 -04:00
Glenn Morris
1d3823c985 * src/s/gnu.h (POSIX_SIGNALS): Remove (again).
This was added in 2012-01 in response to http://debbugs.gnu.org/10552 .
However, this issue had already been fixed in the trunk two years
earlier, by removing POSIX_SIGNALS altogether. Ref:

http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00002.html
2012-06-12 22:32:49 -04:00
Paul Eggert
bfe3e0a23e USE_LISP_UNION_TYPE + USE_LSB_TAG cleanup (Bug#11604)
* alloc.c (make_number) [!defined make_number]:
Remove, as lisp.h always defines this now.
(mark_maybe_pointer): Simplify since USE_LSB_TAG is always defined now.
(roundup_size): Verify that it is a power of 2.
* data.c (Fmake_variable_buffer_local, Fmake_local_variable):
* ftfont.c (ftfont_driver): Use LISP_INITIALLY_ZERO.
* lisp.h (USE_LSB_TAG): Allow the builder to compile with
-DUSE_LSB_TAG=0, to override the automatically-selected default.
USE_LSB_TAG now is always defined to be either 0 or 1.
All uses changed.
(union Lisp_Object): Don't worry about WORDS_BIGENDIAN; the
code works fine either way, and efficiency is not a concern here,
as the union type is for debugging, not for production.
(LISP_MAKE_RVALUE, make_number) [USE_LISP_UNION_TYPE]:
Use an inline function on all platforms when using the union type,
since this is simpler and 'static inline' can be used portably
within Emacs now.
(LISP_INITIALLY_ZERO): New macro.
(XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove.
(XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
2012-06-12 17:26:40 -07:00
Glenn Morris
b4492cba7a Remove src/s/sol2-10.h
* configure.in (HAVE_PROCFS, _STRUCTURED_PROC): New AC_DEFINEs.
(opsysfile): Set specially for sol2-10.

* src/s/gnu-linux.h (HAVE_PROCFS): Move to configure.

* src/s/sol2-10.h: Remove file.
2012-06-12 15:03:32 -04:00
Glenn Morris
8a07a8c6fe Remove src/s/hpux11.h
* configure.in (BROKEN_SA_RESTART, USG_SUBTTY_WORKS): New AC_DEFINEs.
(opsysfile): Set specially for hpux11.

* src/s/hpux11.h: Remove file.
2012-06-12 14:44:31 -04:00
Glenn Morris
0d3697298d Remove a couple of src/s files
* configure.in (opsysfile): Set specially for gnu-kfreebsd, openbsd.

* src/s/gnu-kfreebsd.h, src/s/openbsd.h: Remove files.
2012-06-12 13:53:25 -04:00
Glenn Morris
45fa9c0fbf Move NO_TERMIO, BROKEN_SIGIO from src/s to configure
* configure.in (NO_TERMIO, BROKEN_SIGIO): New AC_DEFINEs.

* src/s/bsd-common.h, src/s/darwin.h, src/s/gnu-kfreebsd.h, src/s/hpux10-20.h:
Remove NO_TERMIO.

* src/s/hpux10-20.h, src/s/openbsd.h, src/s/usg5-4-common.h:
Remove BROKEN_SIGIO.
2012-06-12 13:43:09 -04:00
Chong Yidong
0e25d3345f Handle availability of MagickMergeImageLayers and MagickExportImagePixels
* configure.in: Check for MagickMergeImageLayers.

* src/image.c (imagemagick_load_image): Use MagickFlattenImage if
MagickMergeImageLayers is undefined.  Use pixel pusher loop if
MagickExportImagePixels is undefined.

Fixes: debbugs:11678
2012-06-12 18:08:39 +08:00
Paul Eggert
43682bb61e * image.c (imagemagick_load_image): Remove unused label. 2012-06-11 17:30:18 -07:00
Glenn Morris
a9be7d2b19 Move SYSTEM_TYPE from src/s to configure
* configure.in (SYSTEM_TYPE): New AC_DEFINE.

* msdos/sed2v2.inp (SYSTEM_TYPE): Set it.

* nt/config.nt (SYSTEM_TYPE): Define it.

* src/s/aix4-2.h, src/s/bsd-common.h, src/s/cygwin.h, src/s/darwin.h:
* src/s/gnu-kfreebsd.h, src/s/gnu-linux.h, src/s/gnu.h, src/s/hpux10-20.h:
* src/s/irix6-5.h, src/s/ms-w32.h, src/s/msdos.h, src/s/template.h:
* src/s/usg5-4-common.h: Remove SYSTEM_TYPE.
2012-06-11 19:17:11 -04:00
Jan Djärv
50a938632d * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't
referenced.

Fixes: debbugs:11583
2012-06-11 18:53:12 +02:00
Stefan Monnier
3017f87fbd Don't purify in Fmake_byte_code.
* src/alloc.c (make_byte_code): New function.
(Fmake_byte_code): Use it.  Don't purify here.
* src/lread.c (read1): Use it as well to avoid extra allocation.
2012-06-11 11:13:27 -04:00