1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-01 11:14:55 +00:00
Commit Graph

108955 Commits

Author SHA1 Message Date
Stefan Monnier
63f251724c * lisp/emacs-lisp/byte-run.el (defun-declarations-alist): Don't accept
non-symbols for compiler macros (yet).
2012-11-19 15:57:36 -05:00
Stefan Monnier
93b050412a * lisp/eshell/em-cmpl.el (eshell-pcomplete): Refine fix for bug#12838:
Fallback on completion-at-point rather than
pcomplete-expand-and-complete, and only if pcomplete actually failed.
(eshell-cmpl-initialize): Setup completion-at-point.
* lisp/pcomplete.el (pcomplete--entries): Obey pcomplete-ignore-case.
2012-11-19 14:22:07 -05:00
Stefan Monnier
1000d89524 * lisp/vc/diff-mode.el (diff-hunk): Don't make useless timers. 2012-11-19 13:40:18 -05:00
Stefan Monnier
ac5392dcfd * lisp/files.el (load-file): Require match in minibuffer selection, as was
the case in Emacs-20 before we changed the spec to allow .elc files.

Fixes: debbugs:12935
2012-11-19 13:27:25 -05:00
Eli Zaretskii
88c4a13c3b More fixes for bug #12878 with MS-Windows MSVC build.
src/xdisp.c (start_hourglass) [HAVE_NTGUI]: Don't mix declaration of
 w32_note_current_window with code.  (Backport from trunk.)
 src/w32.c (FILE_DEVICE_FILE_SYSTEM, METHOD_BUFFERED)
 (FILE_ANY_ACCESS, CTL_CODE, FSCTL_GET_REPARSE_POINT) [_MSC_VER]:
 Define for the MSVC compiler.
 src/w32term.h (EnumSystemLocalesW) [_MSC_VER]: Add a missing
 semi-colon.

 nt/inc/stdint.h (PTRDIFF_MIN) [!__GNUC__]: Define for MSVC.
2012-11-19 19:34:21 +02:00
Stefan Monnier
19dc72069c Use cl-lib instead of cl, and interactive-p => called-interactively-p.
* lisp/erc/erc-track.el, lisp/erc/erc-networks.el, lisp/erc/erc-netsplit.el:
* lisp/erc/erc-dcc.el, lisp/erc/erc-backend.el: Use cl-lib, nth, pcase, and
called-interactively-p instead of cl.
* lisp/erc/erc-speedbar.el, lisp/erc/erc-services.el:
* lisp/erc/erc-pcomplete.el, lisp/erc/erc-notify.el, lisp/erc/erc-match.el:
* lisp/erc/erc-log.el, lisp/erc/erc-join.el, lisp/erc/erc-ezbounce.el:
* lisp/erc/erc-capab.el: Don't require cl since we don't use it.
* lisp/erc/erc.el: Use cl-lib, nth, pcase, and called-interactively-p i.s.o cl.
(erc-lurker-ignore-chars, erc-common-server-suffixes): Move before first use.
* lisp/json.el: Don't require cl since we don't use it.
* lisp/color.el: Don't require cl.
(color-complement): `caddr' -> `nth 2'.
* test/automated/ert-x-tests.el: Use cl-lib.
* test/automated/ert-tests.el: Use lexical-binding and cl-lib.
2012-11-19 12:24:12 -05:00
Stefan Monnier
bc715d67b3 * lisp/emacs-lisp/ert.el (ert--expand-should-1): Adapt to cl-lib. 2012-11-19 12:02:20 -05:00
Stefan Monnier
855b17af8f * lisp/calendar/time-date.el (time-to-seconds): De-obsolete. 2012-11-19 11:17:49 -05:00
Stefan Monnier
020423c2c3 * lisp/cedet/semantic/fw.el (semantic-make-local-hook)
(semantic-mode-line-update): Simplify via CSE.
2012-11-19 11:16:07 -05:00
Michael Albinus
d7f2a65cc2 * net/tramp-sh.el (tramp-do-copy-or-rename-file): If both files
are remote, check out-of-band property for both.
2012-11-19 16:25:10 +01:00
Katsumi Yamaoka
3394be35d9 message.el (message-get-reply-headers): Fix typo in comment 2012-11-19 11:36:02 +00:00
Katsumi Yamaoka
70678cd508 message.el (message-get-reply-headers): Make sure the reply goes to the author if it is a wide reply 2012-11-19 06:24:14 +00:00
Jay Belanger
e8909bdc32 * calc/calc-forms.el (math-leap-year-p): Fix formula for negative
year numbers.
(math-date-to-julian-dt): Adjust the initial approximation for the
year to deal with the new definition of the DATE.
2012-11-18 23:03:08 -06:00
Stefan Monnier
d1c0cddf73 * lisp/window.el (switch-to-buffer): Re-add the warning that was lost in the
code rewrite.
2012-11-18 22:16:03 -05:00
Daniel Colascione
6e9f7997b3 Rename cygwin_convert_path* to cygwin_convert_file_name* 2012-11-18 17:39:37 -08:00
Paul Eggert
535efd4a43 More minor time fixes.
* calendar/time-date.el: Commentary fix.
* net/tramp-sh.el (tramp-do-file-attributes-with-ls): Undo last change;
too much other code depends on (0 0) time stamps.
* net/tramp.el (tramp-time-less-p, tramp-time-subtract):
Add a couple of FIXME comments.
2012-11-18 09:10:35 -08:00
Eli Zaretskii
031b541f19 Fix latest changes in nt/inc/unistd.h.
nt/inc/unistd.h: Don't include fcntl.h and don't define O_RDWR.

Fixes: debbugs:12881
2012-11-18 18:54:31 +02:00
Eli Zaretskii
273ac8d1ef Prevent crashes on MS-Windows when w32-downcase-file-names is non-nil.
src/fileio.c (Fsubstitute_in_file_name, Ffile_name_directory)
 (Fexpand_file_name) [DOS_NT]: Pass encoded file name to
 dostounix_filename.  Prevents crashes down the road, because
 dostounix_filename assumes it gets a unibyte string.  Reported by
 Michel de Ruiter <michel@sentient.nl>, see
 http://lists.gnu.org/archive/html/help-emacs-windows/2012-11/msg00017.html
2012-11-18 18:43:36 +02:00
Martin Rudalics
66c466d4fd Fix example for Display Action Functions.
* windows.texi (Display Action Functions): Fix recently added
example.  Suggested by Michael Heerdegen.
2012-11-18 12:34:36 +01:00
Kenichi Handa
e1d276cbf9 merge trunk 2012-11-18 20:29:54 +09:00
Kenichi Handa
00dc3ead07 font.c (font_unparse_xlfd): Fix previous change. Keep "const" for the variable "f". 2012-11-18 20:29:06 +09:00
Glenn Morris
dfa8939b28 Auto-commit of generated files. 2012-11-18 06:19:05 -05:00
Dani Moncayo
d1a355a1bf Emacs manual fixes regarding automatic scrolling.
* display.texi (Auto Scrolling): Fix some inaccuracies, plus
clarifications.
(Horizontal Scrolling): Clarifications.

Fixes: debbugs:12865
2012-11-18 14:27:43 +08:00
Chong Yidong
6a3dd257cf Avoid using "X" interactive flag in filecache.el.
* filecache.el (file-cache--read-list): New function.
(file-cache-add-directory-list, file-cache-add-file-list)
(file-cache-delete-file-list, file-cache-delete-directory-list):
Use it to read a list of files or directories.
(file-cache-add-file, file-cache-add-directory)
(file-cache-delete-file-list, file-cache-delete-file-regexp)
(file-cache-delete-directory): Print an message.

Fixes: debbugs:12846
2012-11-18 13:38:13 +08:00
Jay Belanger
eef97f35c8 * calc/calc-forms.el (math-date-to-dt): Use integer date
when calling `math-date-to-julian-dt' and 'math-date-to-gregorian-dt'.
2012-11-17 21:59:00 -06:00
Paul Eggert
552a1590c6 * nsterm.m (ns_select): Send SIGIO only to self, not to process group. 2012-11-17 18:29:09 -08:00
Glenn Morris
6c9c9b0b70 ChangeLog Merge fix 2012-11-17 18:19:43 -08:00
Paul Eggert
0c93aa38b3 Minor cleanup for times as lists of four integers.
* doc/lispref/os.texi (Time Parsing): Time values can now be four integers.
* lisp/files.el (dir-locals-directory-cache):
* lisp/ps-bdf.el (bdf-file-mod-time, bdf-read-font-info):
Doc fixes.
* lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls):
* lisp/ps-bdf.el (bdf-file-newer-than-time):
Process four-integers time stamps, not two.  Doc fixes.
2012-11-17 18:13:19 -08:00
Glenn Morris
2ac9538d67 Merge from emacs-24; up to 2012-11-15T23:31:37Z!dancol@dancol.org 2012-11-17 17:52:36 -08:00
Glenn Morris
291a654dad NEWS tweak 2012-11-17 17:45:44 -08:00
Glenn Morris
913c8291bd * lisp/image.el (insert-image, insert-sliced-image): Doc fix. 2012-11-17 17:43:32 -08:00
Glenn Morris
7351b73d45 Document eager macro expansion
* doc/lispref/loading.texi (How Programs Do Loading): Add eager macro expansion.
* doc/lispref/macros.texi (Expansion): Mention eager macro expansion.

* etc/NEWS: Related edit.
2012-11-17 17:38:42 -08:00
Juanma Barranquero
c9ed8e3d2b Silence some warnings.
lisp/woman.el (woman-non-underline-faces): Use `set-face-underline'.
lisp/calc/calc.el (math-format-date-cache): Declare.
2012-11-18 02:20:04 +01:00
Juanma Barranquero
c1f7ba3a74 src/w32proc.c (waitpid): Remove unused label get_result. 2012-11-18 02:12:17 +01:00
Juanma Barranquero
1b47437371 nt/config.nt: Sync with autogen/config.in.
(HAVE_FPATHCONF): Remove.
2012-11-18 00:58:56 +01:00
Glenn Morris
7f6705c313 * minibuf.texi (Basic Completion): Mention completion-table-with-quoting 2012-11-17 15:29:29 -08:00
Glenn Morris
e3369c41e6 Add some cindex entries for previous change 2012-11-17 15:24:36 -08:00
Juanma Barranquero
a75ce9d3fd lib-src/makefile.w32-in, src/makefile.w32-in: Update dependencies.
* lib-src/makefile.w32-in (SYSWAIT_H): New macro.
($(BLD)/movemail.$(O)): Update dependencies.

* src/makefile.w32-in (SYSWAIT_H): New macro.
($(BLD)/callproc.$(O), $(BLD)/w32proc.$(O), $(BLD)/process.$(O))
($(BLD)/sysdep.$(O)): Update dependencies.
2012-11-18 00:16:24 +01:00
Glenn Morris
a045a16773 * minibuf.texi (Basic Completion): Mention misc completion-table funcs.
* etc/NEWS: Related edit.
2012-11-17 14:45:24 -08:00
Paul Eggert
49cdacdad3 Assume POSIX 1003.1-1988 or later for fcntl.h.
* admin/CPP-DEFINES (O_RDONLY, O_RDWR, HAVE_FCNTL_H): Remove.
* admin/merge-gnulib (GNULIB_MODULES): Add fcntl-h.
* configure.ac: Do not check for fcntl.h.
* lib/gnulib.mk: Regenerate.
* lib-src/movemail.c, lib-src/update-game-score.c: Assume <fcntl.h> exists.
* nt/inc/sys/socket.h (O_NONBLOCK): Rename from O_NDELAY, since the
POSIX name for this flag is O_NONBLOCK.  All uses changed.
* nt/inc/unistd.h (O_RDWR, O_NOCTTY): New macros.  Like AT_FDCWD etc.
these really should be moved to a replacement <fcntl.h> if and
when that gets implemented.  In the meantime, include <fcntl.h>
to make sure we don't override its definitions.
* src/callproc.c (relocate_fd): Assume F_DUPFD.
* src/emacs.c, src/term.c (O_RDWR): Remove.
* src/keyboard.c (tty_read_avail_input): Use O_NONBLOCK rather than
O_NDELAY, since O_NONBLOCK is the standard name for this flag.
* src/nsterm.m: Assume <fcntl.h> exists.
* src/process.c (NON_BLOCKING_CONNECT, allocate_pty, create_process)
(create_pty, Fmake_network_process, server_accept_connection)
(wait_reading_process_output, init_process_emacs):
Assume O_NONBLOCK.
(wait_reading_process_output): Put in a special case for WINDOWSNT
to mimick the older behavior where it had O_NDELAY but not O_NONBLOCK.
It's not clear this is needed, but it's a more-conservative change.
(create_process): Assume FD_CLOEXEC.
(create_process, create_pty): Assume O_NOCTTY.
* src/sysdep.c (init_sys_modes, reset_sys_modes): Assume F_SETFL.
(reset_sys_modes): Use O_NONBLOCK rather than O_NDELAY.
Omit if not DOS_NT, since F_GETFL is not defined there.
(serial_open): Assume O_NONBLOCK and O_NOCTTY.
* src/term.c: Include <fcntl.h>, for flags like O_NOCTTY.
(O_NOCTTY): Remove.
(init_tty): Assume O_IGNORE_CTTY is defined to 0 on platforms that
lack it, since gnulib guarantees this.
* src/w32.c (fcntl): Test for O_NONBLOCK rather than O_NDELAY.

Fixes: debbugs:12881
2012-11-17 14:12:47 -08:00
Paul Eggert
310e60d945 Calc now uses the Gregorian calendar for all dates,
and uses January 1, 1 AD as its day number 1.
* doc/misc/calc.texi (Date Forms): Document this.

* lisp/calc/calc-forms.el (math-julian-date-beginning)
(math-julian-date-beginning-int): Implement this.
2012-11-17 16:01:59 -06:00
Juanma Barranquero
d7fe635216 lisp/*.el: Add missing declarations.
* descr-text.el (quail-find-key):
* dired.el (desktop-file-name):
* dirtrack.el (shell-prefixed-directory-name, shell-process-cd):
* generic-x.el (comint-mode, comint-exec):
* image-dired.el (widget-forward):
* info.el (speedbar-add-expansion-list, speedbar-center-buffer-smartly)
(speedbar-change-expand-button-char)
(speedbar-change-initial-expansion-list, speedbar-delete-subblock)
(speedbar-make-specialized-keymap, speedbar-make-tag-line):
* printing.el (easy-menu-add-item, easy-menu-remove-item)
(widget-field-action, widget-value-set):
* speedbar.el (imenu--make-index-alist):
* term.el (ring-empty-p, ring-ref, ring-insert-at-beginning)
(ring-length, ring-insert):
* vcursor.el (compare-windows-skip-whitespace):
* woman.el (dired-get-filename):
Declare functions.

* term/w32-win.el (cygwin-convert-path-from-windows): Fix declaration.
2012-11-17 22:52:12 +01:00
Jay Belanger
3dc7dad23a * calc/calc-forms.el (calc-gregorian-switch): Declare. 2012-11-17 15:34:09 -06:00
Jay Belanger
c9f618db44 * calc/calc.el (calc-gregorian-switch): New variable.
* calc/calc-forms.el (math-day-in-year, math-dt-before-p)
(math-absolute-from-gregorian-dt, math-absolute-from-julian-dt)
(math-date-to-julian-dt, math-date-to-gregorian-dt): New functions.
(math-leap-year-p): Add option to distinguish between Julian 
and Gregorian calendars. 
(math-day-number): Use `math-day-in-year' to do the computations.
(math-absolute-from-dt): Rename from `math-absolute-from-date'.
Use `math-absolute-from-gregorian' and `math-absolute-from-julian' 
to do the computations.
(math-date-to-dt): Use `math-date-to-julian-dt' and `math-date-to-gregorian-dt' 
to do the computations.
(calcFunc-weekday, math-format-date-part): Use the new version of the DATE to
determine the weekday.
(calcFunc-newmonth, calcFunc-newyear): Use `calc-gregorian-switch' when necessary.
2012-11-17 15:30:43 -06:00
Eli Zaretskii
3804f7bc78 Fix bug #12914 with drag-n-drop in native MS-Windows build.
lisp/term/w32-win.el (w32-handle-dropped-file): Use 'file://' only on
 Cygwin; otherwise use 'file:'.
 (cygwin-convert-path-from-windows): Declare, to avoid
 byte-compiler warnings.
2012-11-17 22:41:21 +02:00
Glenn Morris
5248293f30 Relocate NEWS entry to correct section 2012-11-17 11:01:09 -08:00
Eli Zaretskii
d8715cdf90 Fix bug #12878 with compilation failure with Visual C++ 11.0.
src/w32select.c: Include w32common.h before w32term.h, so that
 windows.h gets included before w32term.h uses some of its
 features, see below.
 src/w32term.h (LOCALE_ENUMPROCA, LOCALE_ENUMPROCW) [_MSC_VER]: New
 typedefs.
 (EnumSystemLocalesA, EnumSystemLocalesW) [_MSC_VER]: New
 prototypes.
 (EnumSystemLocales) [_MSC_VER]: Define if undefined.
2012-11-17 20:51:06 +02:00
Paul Eggert
9fa3ccd98a Update comment to match recent change. 2012-11-17 10:30:16 -08:00
Eli Zaretskii
6ad30855c0 Fix MS-Windows emulation of 'faccessat' wrt directories.
src/w32.c (faccessat): Pretend that directories have the execute bit
 set.  Emacs expects that, e.g., in files.el:cd-absolute.
2012-11-17 18:52:48 +02:00
Eli Zaretskii
22bae83fa8 Fix bug #12829 with aborts on MS-Windows when several child processes die.
nt/inc/sys/wait.h: New file, with prototype of waitpid and
 definitions of macros it needs.
 nt/inc/ms-w32.h (wait): Don't define, 'wait' is not used anymore.
 (sys_wait): Remove prototype.
 nt/config.nt (HAVE_SYS_WAIT_H): Define to 1.

 src/w32proc.c (create_child): Don't clip the PID of the child
 process to fit into an Emacs integer, as this is no longer a
 restriction.
 (waitpid): Rename from sys_wait.  Emulate a Posix 'waitpid' by
 reaping only the process specified by PID argument, if that is
 positive.  Use PID instead of dead_child to know which process to
 reap.  Wait for the child to die only if WNOHANG is not in
 OPTIONS.
 (sys_select): Don't set dead_child.
 src/sysdep.c (wait_for_termination_1): Remove the WINDOWSNT portion,
 as it is no longer needed.
 src/process.c (waitpid, WUNTRACED) [!WNOHANG]: Remove definitions,
 no longer needed.
 (record_child_status_change): Remove the setting of
 record_at_most_one_child for the !WNOHANG case.
2012-11-17 18:46:45 +02:00