1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-13 06:50:39 -08:00
Commit graph

33743 commits

Author SHA1 Message Date
Paul Eggert
69deda53a8 Don't assume process IDs fit in int.
* emacs.c (shut_down_emacs) [!DOS_NT]:
* sysdep.c (sys_suspend) [SIGTSTP && !MSDOS]:
* term.c (dissociate_if_controlling_tty) [!DOS_NT]:
Use pid_t, not int, to store process IDs, as 'int'
is not wide enough on a few platforms (e.g., AIX and IRIX).
2012-10-24 21:35:39 -07:00
Kenichi Handa
6a8f819329 merge trunk 2012-10-24 00:47:51 +09:00
Kenichi Handa
7e70a15287 Make face-font-rescale-alist work correctly for non-ASCII fonts. 2012-10-24 00:42:29 +09:00
Chong Yidong
49238e7f5c Make unused variable font-list-limit obsolete, and move it out of C.
* display.texi (Font Lookup): Remove font-list-limit.

* lisp/startup.el (command-line):
* lisp/cus-start.el: Don't refer to font-list-limit.

* lisp/faces.el (font-list-limit): Define as an obsolete variable.

* xfaces.c (Vfont_list_limit): Move unused variable to faces.el.
2012-10-23 10:39:13 +08:00
Jan Djärv
ef44695952 * nsfont.m (nsfont_open, ns_glyph_metrics): Force integer advancement
for screen font.
(nsfont_draw): Turn off LCD-smoothing.

Fixes: debbugs:11484
2012-10-21 20:48:11 +02:00
Jan Djärv
5ec86886a7 * xterm.c (x_focus_changed): Check if daemonp when sending focus in
event.

Fixes: debbugs:12681
2012-10-21 16:53:28 +02:00
Paul Eggert
791ef5f8ea Spelling fixes. 2012-10-21 00:23:34 -07:00
Glenn Morris
ee7a418df3 Recognize that cp51932.el and eucjp-ms.el are loaded during dumping
* src/lisp.mk (lisp): Add cp51932.el and eucjp-ms.el.

* lib-src/make-docfile.c (scan_lisp_file): Add cp51932.el and eucjp-ms.el.
2012-10-20 18:19:46 -07:00
Paul Eggert
4973679b3f Port to OpenBSD 5.1.
* frame.c (Fmouse_position, Fmouse_pixel_position):
* xdisp.c (produce_stretch_glyph):
Declare local vars only when they're needed.
This is clearer and avoids a warning on OpenBSD about unused vars.
* frame.h (FRAME_WINDOW_P): Always evaluate its argument.
This is safer, and avoids OpenBSD warnings about unused vars.
* keyboard.c (record_menu_key): Remove unnecessary decl.
(poll_timer): Define only if POLL_FOR_INPUT is defined.
* unexelf.c (ELFSIZE) [!ElfW]: Do not define if already defined,
as our definition clashes with OpenBSD's.
* xfaces.c (load_face_colors, check_lface_attrs)
(get_lface_attributes_no_remap, get_lface_attributes)
(lface_fully_specified_p, x_supports_face_attributes_p)
(tty_supports_face_attributes_p, face_fontset, realize_face)
(realize_x_face, realize_tty_face):
Declare parameters to be Lisp_Object[LFACE_VECTOR_SIZE], not
merely Lisp_Object *.  This is more informative and avoids
a warning on OpenBSD about accessing beyond an object's size.
2012-10-20 14:30:51 -07:00
Eli Zaretskii
c95a426663 Add comments with instructions for creating new Lisp data types. 2012-10-20 15:20:44 +02:00
Chong Yidong
c664f46329 * lread.c (Fload): Doc fix.
Fixes: debbugs:12592
2012-10-20 20:50:49 +08:00
Paul Eggert
f0a8017501 Undo faccessat change. 2012-10-19 12:25:18 -07:00
Paul Eggert
e752e0b0a2 Use faccessat, not access, when checking file permissions.
* .bzrignore: Add lib/fcntl.h.
* configure.ac (euidaccess): Remove check; gnulib does this for us now.
(gl_FCNTL_O_FLAGS): Define a dummy version.
* lib/at-func.c, lib/euidaccess.c, lib/faccessat.c, lib/fcntl.in.h:
* lib/getgroups.c, lib/group-member.c, lib/root-uid.h:
* lib/xalloc-oversized.h, m4/euidaccess.m4, m4/faccessat.m4:
* m4/fcntl_h.m4, m4/getgroups.m4, m4/group-member.m4:
New files, from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* admin/merge-gnulib (GNULIB_MODULES): Add faccessat.
(GNULIB_TOOL_FLAGS): Avoid at-internal, fchdir, malloc-posix,
openat-die, openat-h, save-cwd.  Do not avoid fcntl-h.
Omit gnulib's m4/fcntl-o.m4.
* nt/inc/ms-w32.h (AT_FDCWD, AT_EACCESS): New symbols.
(access): Remove.
(faccessat): New macro.
* src/Makefile.in (LIB_EACCESS): New macro.
(LIBES): Use it.
* src/callproc.c (init_callproc):
* src/charset.c (init_charset):
* src/fileio.c (check_existing, check_executable):
* src/lread.c (openp, load_path_check):
* src/process.c (allocate_pty):
* src/xrdb.c (file_p):
Use faccessat, not access or euidaccess.  Use symbolic names
instead of integers for the flags, as they're portable now.
* src/charset.c, src/xrdb.c: Include <fcntl.h>, for the new flags used.
* src/fileio.c (Ffile_readable_p):
Use faccessat, not stat + open + close.
(file_directory_p): New function, which uses 'stat' on most places
but 'access' (for efficiency) if WINDOWSNT.
* src/fileio.c (Ffile_directory_p, Fset_file_times):
* src/xrdb.c (file_p): Use file_directory_p.
* src/lisp.h (file_directory_p): New decl.
* src/lread.c (openp): When opening a file, use fstat rather than
stat, as that avoids a permissions race.  When not opening a file,
use file_directory_p rather than stat.
* src/process.c, src/sysdep.c, src/term.c: All uses of '#ifdef O_NONBLOCK'
changed to '#if O_NONBLOCK', to accommodate gnulib O_* tyle.
* src/w32.c (sys_faccessat): Rename from sys_access and switch to
faccessat's API.  All uses changed.

Fixes: debbugs:12632
2012-10-19 09:52:02 -07:00
Kenichi Handa
6ec83f926d src/ChangeLog: Fix changers name. 2012-10-19 22:02:52 +09:00
Kenichi Handa
a0d7415fb6 font.c (Ffont_at): Fix previous change. 2012-10-19 21:59:42 +09:00
Eli Zaretskii
c052c554b4 Increase the value of BASE_PURESIZE to avoid pure space overflow.
src/puresize.h (BASE_PURESIZE): Bump the base value to 1700000.  See
 http://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00593.html
 for the reasons.
2012-10-19 12:05:09 +02:00
Eli Zaretskii
d282492862 Decrease NSTATICS to 0x800. 2012-10-19 08:43:12 +02:00
Stefan Monnier
f60d391f5f * src/fns.c (Fnreverse): Include the problem element when signalling an error.
Fixes: debbugs:12677
2012-10-18 20:54:35 -04:00
Jan Djärv
1a9327d5cd * nsterm.m (ns_select): Check writefds before call to
FD_ISSET.

Fixes: debbugs:12668
2012-10-18 20:54:37 +02:00
Eli Zaretskii
afb8aa2482 Fix wording of error message in staticpro. 2012-10-18 20:21:55 +02:00
Daniel Colascione
14145a1e84 Increase NSTATICS; tell the user when we run out of static slots. 2012-10-18 09:00:08 -08:00
Martin Rudalics
1f76f6f579 In window.c fix two flaws reported by Dmitry Antipov.
* window.c (Ftemp_output_buffer_show): Remove.
(Fwindow_vscroll, Fset_window_vscroll): Use decode_live_window.
(syms_of_window): Remove defsubr for Stemp_output_buffer_show.
2012-10-18 10:27:49 +02:00
Eli Zaretskii
a68089e4a4 Fix warnings when compiling on MS-Windows with -std=gnu99.
src/makefile.w32-in ($(BLD)/w32.$(O)): 
 ($(BLD)/vm-limit.$(O)): 
 ($(BLD)/term.$(O)): 
 ($(BLD)/unexw32.$(O)): 
 ($(BLD)/fileio.$(O)): 
 ($(BLD)/dispnew.$(O)): Update dependencies.
 src/w32term.h (w32_initialize_display_info, initialize_w32_display):
 Add prototypes.
 src/w32proc.c: Include ctype.h.
 src/w32.h (init_environment, check_windows_init_file)
 (syms_of_ntproc, syms_of_ntterm, dostounix_filename)
 (unixtodos_filename, init_winsock, srandom, random, sys_pipe)
 (set_process_dir, sys_spawnve, register_child, sys_sleep, getwd)
 (sys_link): Add prototypes.
 src/w32.c: Include w32select.h.
 (sys_access, e_malloc, sys_select): Add prototypes.
 (emacs_gnutls_pull): 'timeout' is now EMACS_TIME, not struct timeval.
 src/vm-limit.c [WINDOWSNT]: Include w32heap.h.
 src/unexw32.c: Include lisp.h and w32.h.
 src/term.c [WINDOWSNT]: Include w32term.h.
 src/process.c [WINDOWSNT]: Add prototype of sys_select.
 src/fileio.c [WINDOWSNT]: Include w32.h.
 src/dispnew.c [WINDOWSNT]: Include w32.h.

 nt/inc/pwd.h (getuid, geteuid): Add prototypes.
 nt/inc/ms-w32.h (sys_wait, _getpid, gmtgime_r, localtime_r)
 (signal_handler, sys_signal, sigemptyset, sigfillset, sigprocmask)
 (pthread_sigmask, sigismember, setpgrp, sigaction, alarm)
 (sys_kill, getpagesize): Add prototypes for emulated functions.
 nt/inc/grp.h (getgid, getegid): Add prototypes.
 nt/gmake.defs (DEBUG_CFLAGS) [NOOPT]: Add -std=gnu99.
 nt/configure.bat (chkapiN): Avoid compiler warning in junk.c when
 compiling with -std=gnu99.
 nt/config.nt (CHECK_LISP_OBJECT_TYPE): Don't undef, so that it
 could be used via --cflags switch to configure.bat.
2012-10-17 21:02:44 +02:00
Eli Zaretskii
fcf148759e Fix bug #12661 with w32 and cygw32 builds under --enable-check-lisp-object-type.
src/cygw32.c (Fcygwin_convert_path_to_windows)
 (Fcygwin_convert_path_from_windows): Use EQ to compare 2
 Lisp_Object values.
 src/w32fns.c (w32_msg_pump): Use XIL instead of casting an integer
 to Lisp_Object.
2012-10-17 17:37:55 +02:00
Kenichi Handa
596846525b merge trunk 2012-10-17 22:33:48 +09:00
Kenichi Handa
fe0b1ec409 xdisp.c (reseat_1): Make the information stored in it->cmp_it invalidate. 2012-10-17 22:30:56 +09:00
Juanma Barranquero
1f9f395d80 Fix ChangeLog typos. 2012-10-17 13:24:34 +02:00
Dmitry Antipov
d556ebf9b8 * buffer.c (Fkill_buffer): When unchaining the marker,
reset it's buffer pointer to NULL (Bug#12652).
2012-10-17 09:22:23 +04:00
Dmitry Antipov
f0863a5468 Do not verify indirection counters of killed buffers (Bug#12579).
* buffer.h (BUFFER_CHECK_INDIRECTION): New macro.
* buffer.c (compact_buffer, set_buffer_internal_1): Use it.
2012-10-17 08:58:15 +04:00
Dmitry Antipov
12fbe7552c * alloc.c (Fmake_byte_code): Fix typo in comment.
* print.c (print_interval): Define as static to match prototype.
* indent.c (disptab_matches_widthtab, recompute_width_table):
Convert to eassert.
2012-10-16 11:56:44 +04:00
Dmitry Antipov
61655b89f4 * editfns.c (get_system_name): Remove.
* lisp.h (get_system_name): Remove prototype.
* xrdb.c (getenv, getpwuid, getpwnam): Remove prototypes.
(get_environ_db): Use Vsystem_name.  Avoid call to strlen.
2012-10-16 06:22:25 +04:00
Stefan Monnier
8599b23a90 * lisp/erc/erc.el (erc-log): Make it into a defsubst.
(erc-with-server-buffer, define-erc-module, erc-with-buffer)
(erc-with-all-buffers-of-server): Use `declare'.
* lisp/erc/erc-backend.el (erc-log): Adjust autoload accordingly.
2012-10-15 12:49:57 -04:00
Daniel Colascione
9520f2f20c Add comment for undef of "interface" 2012-10-15 02:10:17 -08:00
Martin Rudalics
dca778d53a Fix Fwindow_end's handling of cached position (Bug#12600).
* window.c (Fwindow_end): Rewrite check whether cached position
can be used (Bug#12600).
(resize_frame_windows, grow_mini_window, shrink_mini_window):
Set windows_or_buffers_changed.
2012-10-15 11:03:56 +02:00
Daniel Colascione
3e0341b0a4 Fix cygw32 build break with dbus compilation 2012-10-14 17:38:07 -08:00
Daniel Colascione
33d4113cf5 * image.c (init_tiff_functions, init_imagemagick_functions)
(init_svg_functions): Fix cygw32 build break by using these
functions only when WINDOWSNT _and_ HAVE_NTGUI.
2012-10-14 15:25:37 -08:00
Jan Djärv
a36fb15e08 * nsterm.m (ns_select): Count fd:s in writefs also.
Fixes: debbugs:12422
2012-10-14 20:28:48 +02:00
Glenn Morris
8336c6b3c5 ChangeLog fix 2012-10-13 17:17:07 -07:00
Jan Djärv
537f336d62 * gtkutil.c (xg_set_widget_bg): Divide by 65535.
Fixes: debbugs:12612
2012-10-13 23:52:09 +02:00
Kenichi Handa
2e58893d16 merge trunk 2012-10-13 22:11:40 +09:00
Kenichi Handa
0ba06a77fd coding.c (detect_coding): Set coding->id before calling this->detector. 2012-10-13 21:58:52 +09:00
Andreas Schwab
ce2fe65ae1 * fileio.c: Formatting fixes. 2012-10-13 10:55:26 +02:00
Paul Eggert
d6453ce497 Fix some stat-related races.
* fileio.c (Fwrite_region): Avoid race condition if a file is
removed or renamed by some other process immediately after Emacs
writes it but before Emacs stats it.  Do not assume that stat (or
fstat) succeeds.
* image.c (slurp_file): Resolve the file name with fopen + fstat
rather than stat + fopen.
(pbm_read_file) [0]: Remove unused code with stat race.
* process.c (allocate_pty) [HAVE_PTYS && !PTY_ITERATION && !PTY_OPEN]:
Remove ineffective code with stat race.
2012-10-12 17:52:01 -07:00
Stefan Monnier
06485aa821 * src/doc.c (get_doc_string): Don't signal an error if the file is missing.
* lisp/help-fns.el (describe-variable, describe-function-1):
* lisp/help-mode.el (help-make-xrefs): Remove error handler, made unneeded.
2012-10-12 16:11:50 -04:00
Jan Djärv
167e3640f1 * nsterm.m (hold_event_q): New static variable.
(EV_TRAILER, sendScrollEventAtLoc:fromEvent:): Call hold_event if
! q_event_ptr.
(hold_event): New function.
(ns_read_socket): If hold_event_q have events, store them and
return.
(setPosition:portion:whole:): Send SIGIO to ourselves if apploopnr
is zero (Bug#12384).
2012-10-12 19:50:39 +02:00
Juanma Barranquero
c40239dff9 src/makefile.w32-in ($(BLD)/w32select.$(O)): Update dependencies. 2012-10-12 18:32:40 +02:00
Eli Zaretskii
99b1553e07 Fix typo in last change. 2012-10-12 17:30:06 +02:00
Eli Zaretskii
2a9f109915 Update dependencies in src/makefile.w32-in.
src/makefile.w32-in ($(BLD)/fileio.$(O)): Add sys/file.h.
2012-10-12 17:22:50 +02:00
Eli Zaretskii
bb385a92ec Fix bug #12587 with slow startup on MS-Windows with Netlogon service.
src/fileio.c (check_existing): New function.
 (make_temp_name, Ffile_exists_p, Ffile_writable_p): Call it
 instead of calling 'stat', when what's needed is to check whether
 a file exists.  This avoids expensive system calls on MS-Windows.
 src/w32.c (init_environment): Call 'check_existing' instead of 'stat'.
 src/lread.c (openp) [WINDOWSNT]: Call 'access' instead of 'stat' to
 determine whether a file exists and is not a directory.
 src/lisp.h (check_existing): Add prototype.
2012-10-12 17:19:54 +02:00
Eli Zaretskii
605a3df681 Add comments about how non-GUI input works on MS-Windows. 2012-10-12 16:14:35 +02:00