Xue Fuqiao [Wed, 24 Jul 2013 22:32:48 +0000 (06:32 +0800)]
* doc/misc/ido.texi: New file.
Eli Zaretskii [Wed, 24 Jul 2013 17:36:42 +0000 (20:36 +0300)]
Fix bug #14780 with unreachable lines near end of buffer.
src/xdisp.c (redisplay_window): Instead of moving point out of
scroll margin, reject the force_start method, and try scrolling.
Juanma Barranquero [Wed, 24 Jul 2013 16:21:44 +0000 (18:21 +0200)]
lisp/desktop.el (desktop-restoring-frames-p): Return a true boolean.
(desktop-restore-frames): Warn when deleting an existing frame failed.
Glenn Morris [Wed, 24 Jul 2013 15:56:24 +0000 (08:56 -0700)]
* lisp/ffap.el (ffap-machine-p): Handle "not known" response.
Fixes: debbugs:14929
Ken Brown [Wed, 24 Jul 2013 15:11:30 +0000 (11:11 -0400)]
* src/alloc.c (make_save_ptr): Define if HAVE_NTGUI is defined (Bug#14944).
Michael Albinus [Wed, 24 Jul 2013 13:56:19 +0000 (15:56 +0200)]
* automated/file-notify-tests.el
(file-notify--test-local-enabled): New defconst. Replaces all
`file-notify-support' occurences.
(file-notify--test-remote-enabled): New defun.
(file-notify--deftest-remote): Use it.
(file-notify-test00-availability): Rewrite.
(file-notify-test00-availability-remote): New defun.
(file-notify-test01-add-watch): Rewrite first erroneous check.
Michael Albinus [Wed, 24 Jul 2013 13:29:15 +0000 (15:29 +0200)]
* filenotify.el (file-notify-supported-p):
* net/tramp-sh.el (tramp-sh-handle-file-notify-supported-p):
Remove functions.
* autorevert.el (auto-revert-use-notify):
(auto-revert-notify-add-watch):
* net/tramp.el (tramp-file-name-for-operation):
* net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* net/tramp-sh.el (tramp-sh-file-name-handler-alist):
* net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Remove `file-notify-supported-p' entry.
Michael Albinus [Wed, 24 Jul 2013 13:10:38 +0000 (15:10 +0200)]
* errors.texi (Standard Errors): Fix typo.
* files.texi (Magic File Names):
* os.texi (File Notifications): Remove file-notify-supported-p.
Glenn Morris [Wed, 24 Jul 2013 11:17:32 +0000 (07:17 -0400)]
Auto-commit of loaddefs files.
Glenn Morris [Wed, 24 Jul 2013 10:17:36 +0000 (06:17 -0400)]
Auto-commit of generated files.
Xue Fuqiao [Wed, 24 Jul 2013 08:04:39 +0000 (16:04 +0800)]
Merge from mainline.
Xue Fuqiao [Wed, 24 Jul 2013 08:00:36 +0000 (16:00 +0800)]
* lisp/ido.el: Doc fix.
* lisp/ido.el (ido-fractionp):
(ido-cache-ftp-work-directory-time, ido-max-prospects, ido-mode)
(ido-max-file-prompt-width, ido-unc-hosts-cache)
(ido-max-directory-size, ido-max-dir-file-cache)
(ido-decorations): Doc fix.
Glenn Morris [Wed, 24 Jul 2013 07:32:49 +0000 (00:32 -0700)]
* lisp/dired-x.el (dired-mark-extension): Convert comment to doc string.
Glenn Morris [Wed, 24 Jul 2013 07:16:25 +0000 (00:16 -0700)]
* printing.el: Replace all uses of deleted ps-flatten-list with lpr- version.
Glenn Morris [Wed, 24 Jul 2013 07:06:24 +0000 (00:06 -0700)]
* printing.el: Replace all uses of deleted ps-windows-system, ps-lp-system
with lpr- versions.
Paul Eggert [Wed, 24 Jul 2013 06:21:07 +0000 (07:21 +0100)]
* src/eval.c (Fprogn): Do not check that BODY is a proper list.
This undoes the previous change. The check slows down the
interpreter, and is not needed to prevent a crash. See
<http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00693.html>.
* doc/lispref/eval.texi (Special Forms): Mention 'lambda'. Also, say that
non-well-formed expressions result in unspecified behavior, though
Emacs will not crash.
Stefan Monnier [Wed, 24 Jul 2013 05:13:24 +0000 (01:13 -0400)]
* lisp/emacs-lisp/pcase.el (pcase--u1): Verify if self-quoting values can be
checked with memq.
Fixes: debbugs:14935
Stefan Monnier [Wed, 24 Jul 2013 04:56:12 +0000 (00:56 -0400)]
* lisp/files.el (revert-buffer-function): Use a non-nil default.
(revert-buffer-preserve-modes): Declare var to
provide access to the `preserve-modes' argument.
(revert-buffer): Let-bind it.
(revert-buffer--default): New function, extracted from revert-buffer.
Stefan Monnier [Wed, 24 Jul 2013 04:37:11 +0000 (00:37 -0400)]
* lisp/lpr.el: Signal print errors more prominently.
(print-region-function): Don't default to nil.
(lpr-print-region): New function, extracted from print-region-1.
Check lpr's return value and signal an error in case of problem.
(print-region-1): Use it.
* lisp/ps-print.el (ps-windows-system, ps-lp-system): Remove. Use the lpr-*
versions instead.
(ps-printer-name): Default to nil.
(ps-printer-name-option): Default to lpr-printer-switch.
(ps-print-region-function): Don't default to nil.
(ps-postscript-code-directory): Simplify default.
(ps-do-despool): Use lpr-print-region to properly check the outcome.
(ps-string-list, ps-eval-switch, ps-flatten-list)
(ps-flatten-list-1): Remove.
(ps-multibyte-buffer): Avoid setq.
* lisp/dos-w32.el (direct-print-region-helper): Use proper regexp operators.
(print-region-function, ps-print-region-function): Don't set them here.
Xue Fuqiao [Wed, 24 Jul 2013 03:49:24 +0000 (11:49 +0800)]
* lisp/ansi-color.el: Fix old URL.
Glenn Morris [Wed, 24 Jul 2013 01:03:56 +0000 (21:03 -0400)]
* configure.ac: Use self-descriptive tags for AC_CONFIG_COMMANDS.
Michael Mauger [Wed, 24 Jul 2013 00:25:53 +0000 (20:25 -0400)]
* progmodes/sql.el Version 3.3
(sql-product-alist): Improve oracle :prompt-cont-regexp.
(sql-starts-with-prompt-re, sql-ends-with-prompt-re): New functions.
(sql-interactive-remove-continuation-prompt): Rewrite, use
functions above. Fix continuation prompt and complete output line
handling.
(sql-redirect-one, sql-execute): Use `read-only-mode' on
redirected output buffer.
(sql-mode): Restore deleted code (Bug#13591).
Juanma Barranquero [Tue, 23 Jul 2013 23:10:58 +0000 (01:10 +0200)]
lisp/desktop.el (desktop-clear): Fix previous change.
Glenn Morris [Tue, 23 Jul 2013 23:00:43 +0000 (19:00 -0400)]
No need for configure to create etc/ and lisp/ any more
* configure.ac (etc, lisp): No need to create specially.
Configure already creates lisp when generating lisp/Makefile;
src/Makefile now creates etc when needed.
* src/Makefile.in ($(etc)/DOC, temacs$(EXEEXT)): Ensure etc/ exists.
Glenn Morris [Tue, 23 Jul 2013 22:57:17 +0000 (18:57 -0400)]
Use a @configure_input@ comment at the start of generated Makefiles
Glenn Morris [Tue, 23 Jul 2013 19:54:01 +0000 (15:54 -0400)]
* inotify-test.el (inotify-file-watch-simple): Delete temp-file when done.
Glenn Morris [Tue, 23 Jul 2013 16:08:47 +0000 (09:08 -0700)]
* test/automated/subword-tests.el: Require subword.
Michael Albinus [Tue, 23 Jul 2013 14:06:02 +0000 (16:06 +0200)]
* net/tramp.el (tramp-handle-file-notify-add-watch): New defun.
* net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* net/tramp-smb.el (tramp-smb-file-name-handler-alist): Use it.
Juanma Barranquero [Tue, 23 Jul 2013 11:29:30 +0000 (13:29 +0200)]
lisp/desktop.el (desktop-list*): Fix previous change.
Glenn Morris [Tue, 23 Jul 2013 10:17:48 +0000 (06:17 -0400)]
Auto-commit of generated files.
Paul Eggert [Tue, 23 Jul 2013 09:06:46 +0000 (10:06 +0100)]
Fix ChangeLog typo.
Paul Eggert [Tue, 23 Jul 2013 08:08:57 +0000 (09:08 +0100)]
Port to GNU/Linux systems with tinfo but not ncurses.
* configure.ac (USE_NCURSES): New symbol.
* src/dispnew.c (init_display): Depend on USE_NCURSES, not GNU_LINUX,
to decide whether ncurses is being used. Without this change,
GCC complains about tgetent not being declared, on a system
that has tinfo installed but ncurses not installed.
Paul Eggert [Tue, 23 Jul 2013 07:22:16 +0000 (08:22 +0100)]
* eval.c (Fprogn): Check that BODY is a proper list.
Katsumi Yamaoka [Tue, 23 Jul 2013 07:04:24 +0000 (07:04 +0000)]
[Gnus] Fix previous commit
* gnus.el (gnus-continuum-version):
* gnus-msg.el (gnus-extended-version): Simplify.
* gnus.el (gnus-continuum-version-1): Remove.
* gnus-msg.el (gnus-bug): Revert.
Paul Eggert [Tue, 23 Jul 2013 06:48:34 +0000 (07:48 +0100)]
Tune UNEVALLED functions by using XCAR instead of Fcar, etc.
* data.c (Fsetq_default):
* eval.c (Fif, Fcond, Fprog1, Fsetq, Fquote, Ffunction, Fdefvar)
(Fdefconst, FletX, Flet, Fwhile, Fcatch, Funwind_protect)
(Fcondition_case):
Tune by taking advantage of the fact that ARGS is always a list
when a function is declared to have UNEVALLED args.
Paul Eggert [Tue, 23 Jul 2013 06:38:51 +0000 (07:38 +0100)]
* emacsgtkfixed.c: Port to GCC 4.6.
GCC 4.6 complains about -Wunused-local-typedefs, introduced in 4.7.
Katsumi Yamaoka [Tue, 23 Jul 2013 05:22:20 +0000 (05:22 +0000)]
Calculate gnus-version correctly on Cygwin
* gnus.el (gnus-continuum-version): Do main calculations in integers.
(gnus-continuum-version-1): New function, return a string.
* gnus-msg.el (gnus-extended-version, gnus-bug):
Use gnus-continuum-version-1 instead of gnus-continuum-version.
Juanma Barranquero [Tue, 23 Jul 2013 01:11:40 +0000 (03:11 +0200)]
src/callproc.c (child_setup): Silence compiler warnings.
Juanma Barranquero [Tue, 23 Jul 2013 01:10:54 +0000 (03:10 +0200)]
lisp/desktop.el: Simplify.
(desktop-clear): Simplify; remove useless checks against invalid buffer names.
(desktop-list*): Use cl-list*.
(desktop-buffer-info, desktop-create-buffer): Simplify.
Leo Liu [Tue, 23 Jul 2013 00:58:28 +0000 (08:58 +0800)]
* bookmark.el (bookmark-make-record): Restore NAME as a default
value.
Fixes: debbugs:14933
Stefan Monnier [Mon, 22 Jul 2013 23:21:14 +0000 (19:21 -0400)]
* lisp/emacs-lisp/autoload.el (autoload--setup-output): New function,
extracted from autoload--insert-text.
(autoload--insert-text): Remove.
(autoload--print-cookie-text): New function, extracted from
autoload--insert-cookie-text.
(autoload--insert-cookie-text): Remove.
(autoload-generate-file-autoloads): Adjust calls accordingly.
Stefan Monnier [Mon, 22 Jul 2013 22:51:29 +0000 (18:51 -0400)]
* lisp/winner.el (winner-hook-installed-p): Remove.
(winner-mode): Simplify accordingly.
Stefan Monnier [Mon, 22 Jul 2013 17:24:31 +0000 (13:24 -0400)]
* lisp/subr.el (add-to-list): Fix compiler-macro when `append' is
not constant. Don't use `cl-member' for the base case.
Stefan Monnier [Mon, 22 Jul 2013 16:25:32 +0000 (12:25 -0400)]
* lisp/progmodes/subword.el: Fix boundary case.
(subword-forward-regexp): Make it a constant. Wrap optional \\W in its
own group.
(subword-backward-regexp): Make it a constant.
(subword-forward-internal): Don't treat a trailing capital as the
beginning of a word.
* test/automated/subword-tests.el: New file.
Fixes: debbugs:13758
Paul Eggert [Mon, 22 Jul 2013 15:30:54 +0000 (16:30 +0100)]
* sysdep.c (frame) [__FreeBSD__]: #define to freebsd_frame
when including <sys/user.h>, to prevent Sparc/ARM machine/frame.h
from messing up Emacs's 'struct frame'.
Fixes: debbugs:14923
Ari Roponen [Mon, 22 Jul 2013 11:39:32 +0000 (13:39 +0200)]
lisp/emacs-lisp/package.el (package-menu-mode): Fix bug#14930.
Don't modify the global value of tabulated-list-revert-hook.
Glenn Morris [Mon, 22 Jul 2013 10:21:02 +0000 (06:21 -0400)]
Auto-commit of loaddefs files.
Michael Albinus [Mon, 22 Jul 2013 09:19:00 +0000 (11:19 +0200)]
* files.texi (Magic File Names): Add file-notify-add-watch,
file-notify-rm-watch and file-notify-supported-p. Move
file-remote-p down.
* errors.texi (Standard Errors): Add file-notify-error.
* os.texi (Desktop Notifications): Rename from Notifications.
(File Notifications): New node.
* elisp.texi (Top): Update menu for these changes.
Michael Albinus [Mon, 22 Jul 2013 09:17:21 +0000 (11:17 +0200)]
Fix typo.
Stefan Monnier [Mon, 22 Jul 2013 04:06:21 +0000 (00:06 -0400)]
* lisp/url/url-http.el (status): Remove, unused.
(success): Remove var.
(url-http-handle-authentication): Return the value that `success'
should take instead of setting `success' directly. Don't set `status'
since it's not used.
(url-http-parse-headers): Avoid unneeded setq.
Move the `setq success'.
(url-http): Use pcase.
(url-http-file-exists-p): Simplify.
Juanma Barranquero [Mon, 22 Jul 2013 01:25:47 +0000 (03:25 +0200)]
lisp/desktop.el: Require 'cl-lib.
(desktop-before-saving-frames-functions): New hook.
(desktop--process-minibuffer-frames): Set desktop-mini parameter only
for frames being saved. Rename from desktop--save-minibuffer-frames.
(desktop-save-frames): Run hook desktop-before-saving-frames-functions.
Do not save frames with non-nil `desktop-dont-save' parameter. Filter
out deleted frames.
(desktop--find-frame): Use cl-find-if.
(desktop--select-frame): Use cl-(first|second|third) to access values
of desktop-mini.
(desktop--make-frame): Use cl-delete-if.
(desktop--sort-states): Fix sorting of minibuffer-owning frames.
(desktop-restore-frames): Use cl-(first|second|third) to access values
of desktop-mini. Look for visible frame at the end, not while
restoring frames.
Juanma Barranquero [Mon, 22 Jul 2013 01:04:10 +0000 (03:04 +0200)]
lisp/dired-x.el: Fix bug#14927.
(dired-mark-unmarked-files, dired-virtual, dired-guess-default)
(dired-mark-sexp, dired-filename-at-point): Use string-match-p, looking-at-p.
Juanma Barranquero [Sun, 21 Jul 2013 17:45:12 +0000 (19:45 +0200)]
lisp/desktop.el: Make some frame-restoring functions public.
(desktop-saved-frame-states): Rename from desktop--saved-states;
all users changed.
(desktop-save-frames): Rename from desktop--save-frames.
Do not save state to desktop file.
(desktop-save): Save desktop-saved-frame-states to desktop file
and reset to nil.
(desktop-restoring-frames-p): New function.
(desktop-restore-frames): Use it. Rename from desktop--restore-frames.
(desktop-read): Use desktop-restoring-frames-p. Do not try to fix
buffer-lists when restoring frames. Suggested by Martin Rudalics.
Paul Eggert [Sun, 21 Jul 2013 15:56:55 +0000 (08:56 -0700)]
* alloc.c (make_save_ptr_ptr): Define this function.
It was inadvertently omitted. It's needed only if
HAVE_MENUS && ! (USE_X_TOOLKIT || USE_GTK).
Jan Djärv [Sun, 21 Jul 2013 11:47:07 +0000 (13:47 +0200)]
* nsterm.m (sendEvent:): Skip mouse moved if no dialog and no Emacs
frame have focus.
Fixes: debbugs:14895
Glenn Morris [Sun, 21 Jul 2013 10:19:07 +0000 (06:19 -0400)]
Auto-commit of generated files.
Paul Eggert [Sun, 21 Jul 2013 06:53:47 +0000 (23:53 -0700)]
Avoid vfork-related deadlock more cleanly.
* callproc.c (child_setup): When the child's exec fails, output
the program name, as that's more useful. Use O_NONBLOCK to avoid
deadlock.
* process.c (create_process_1): Remove; no longer needed.
(create_process): Remove timer hack; no longer needed, now that
the child avoids deadlock.
Paul Eggert [Sun, 21 Jul 2013 04:22:33 +0000 (21:22 -0700)]
Spelling fixes.
Juanma Barranquero [Sun, 21 Jul 2013 02:53:19 +0000 (04:53 +0200)]
lisp/ChangeLog, src/ChangeLog: Fix typos.
Juanma Barranquero [Sun, 21 Jul 2013 02:42:11 +0000 (04:42 +0200)]
lisp/desktop.el: Correctly restore iconified frames.
(desktop--filter-iconified-position): New function.
(desktop-filter-parameters-alist): Add entries for `top' and `left'.
Glenn Morris [Sat, 20 Jul 2013 19:29:02 +0000 (12:29 -0700)]
image-dired.el: use with-current-buffer
* lisp/image-dired.el (image-dired-track-original-file):
Use with-current-buffer.
(image-dired-track-thumbnail): Use with-current-buffer.
Avoid changing point of wrong window.
Glenn Morris [Sat, 20 Jul 2013 19:25:05 +0000 (12:25 -0700)]
Tweak some message calls in gdb-mi.el
* lisp/progmodes/gdb-mi.el (gdb-delete-handler, gdb-stopped):
Let `message' do the formatting.
(def-gdb-preempt-display-buffer): Add explicit format.
Glenn Morris [Sat, 20 Jul 2013 19:20:33 +0000 (12:20 -0700)]
Merge from emacs-24; up to 2012-12-31T11:35:13Z!rudalics@gmx.at
Glenn Morris [Sat, 20 Jul 2013 19:17:32 +0000 (12:17 -0700)]
* lisp/image-dired.el (image-dired-track-original-file):
Avoid changing point of wrong window.
Fixes: debbugs:14909
Andreas Schwab [Sat, 20 Jul 2013 15:41:38 +0000 (17:41 +0200)]
* international/mule.el (coding-system-iso-2022-flags): Fix last
change.
Paul Eggert [Sat, 20 Jul 2013 15:33:00 +0000 (08:33 -0700)]
Fix array bounds violation when pty allocation fails.
* configure.ac (PTY_TTY_NAME_SPRINTF): Use PTY_NAME_SIZE,
not sizeof pty_name, since pty_name is now a pointer to the array.
* src/process.c (PTY_NAME_SIZE): New constant.
(pty_name): Remove static variable; it's now auto.
(allocate_pty): Define even if !HAVE_PTYS; that's simpler.
Take pty_name as an arg rather than using a static variable.
All callers changed.
(create_process): Recover pty_flag from process, not from volatile local.
(create_pty): Stay inside array even when pty allocation fails.
(Fmake_serial_process): Omit unnecessary initializaiton of pty_flag.
Paul Eggert [Sat, 20 Jul 2013 14:21:25 +0000 (07:21 -0700)]
* lread.c (Fload): Avoid initialization only when lint checking.
Mention that it's needed only for older GCCs.
Kenichi Handa [Sat, 20 Jul 2013 11:51:53 +0000 (20:51 +0900)]
merge trunk
Kenichi Handa [Sat, 20 Jul 2013 11:45:50 +0000 (20:45 +0900)]
coding.c (decode_coding_iso_2022): Fix previous change.
Kenichi Handa [Sat, 20 Jul 2013 11:22:56 +0000 (20:22 +0900)]
mule.el (coding-system-iso-2022-flags): Change 8-bit-level-4'
Andreas Schwab [Sat, 20 Jul 2013 08:25:46 +0000 (10:25 +0200)]
* lread.c (Fload): Avoid uninitialized warning.
Kenichi Handa [Sat, 20 Jul 2013 04:19:05 +0000 (13:19 +0900)]
* coding.c (CODING_ISO_FLAG_LEVEL_4): New macro.
(decode_coding_iso_2022): Check the single-shift area. (Bug#8522)
Kenichi Handa [Sat, 20 Jul 2013 04:15:37 +0000 (13:15 +0900)]
* mule.el (coding-system-iso-2022-flags): Add `level-4'. (Bug#8522)
Paul Eggert [Fri, 19 Jul 2013 18:09:23 +0000 (11:09 -0700)]
Fix some minor file descriptor leaks and related glitches.
* filelock.c (create_lock_file) [!O_CLOEXEC]: Use fcntl with FD_CLOEXEC.
(create_lock_file): Use write, not emacs_write.
* image.c (slurp_file, png_load_body):
* process.c (Fnetwork_interface_list, Fnetwork_interface_info)
(server_accept_connection):
Don't leak an fd on memory allocation failure.
* image.c (slurp_file): Add a cheap heuristic for growing files.
* xfaces.c (Fx_load_color_file): Block input around the fopen too,
as that's what the other routines do. Maybe input need not be
blocked at all, but it's better to be consistent.
Avoid undefined behavior when strlen is zero.
Paul Eggert [Fri, 19 Jul 2013 17:54:26 +0000 (10:54 -0700)]
* alloc.c (staticpro): Avoid buffer overrun on repeated calls.
(NSTATICS): Now a constant; doesn't need to be a macro.
Richard M. Stallman [Fri, 19 Jul 2013 16:15:51 +0000 (12:15 -0400)]
(decode_coding_utf_8): Add simple loop for fast processing of ASCII characters.
Lars Magne Ingebrigtsen [Fri, 19 Jul 2013 14:57:28 +0000 (16:57 +0200)]
* net/shr.el (shr-mouse-browse-url): New command and keystroke.
Fixes: debbugs:14815
Gnus developers [Fri, 19 Jul 2013 14:50:21 +0000 (14:50 +0000)]
Merge Changes made in Gnus master
2013-07-19 Geoff Kuenning <geoff@cs.hmc.edu> (tiny change)
* gnus.texi (Customizing Articles): Document function predicates.
2013-07-19 Geoff Kuenning <geoff@cs.hmc.edu> (tiny change)
* gnus-art.el (gnus-treat-predicate): Allow functions as predicates (bug#13384).
2013-07-18 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-start.el (gnus-clean-old-newsrc): Remove the newsrc cleanups
that were only relevant in a development version a long time ago.
Lars Magne Ingebrigtsen [Fri, 19 Jul 2013 14:44:16 +0000 (16:44 +0200)]
eww textarea input fixup
* net/eww.el (eww-process-text-input): Allow inputting when the
point is at the start of the line, as the properties aren't
front-sticky.
Paul Eggert [Fri, 19 Jul 2013 14:34:56 +0000 (07:34 -0700)]
* conf_post.h (RE_TRANSLATE_P) [emacs]: Remove obsolete optimization.
Lars Magne Ingebrigtsen [Fri, 19 Jul 2013 14:07:43 +0000 (16:07 +0200)]
(shr-make-table-1): Ensure that we don't infloop on degenerate widths.
Richard M. Stallman [Fri, 19 Jul 2013 13:30:58 +0000 (09:30 -0400)]
* epa.el (epa-popup-info-window): Doc fix.
Richard M. Stallman [Fri, 19 Jul 2013 13:09:03 +0000 (09:09 -0400)]
Add a comment.
Richard M. Stallman [Fri, 19 Jul 2013 12:18:16 +0000 (08:18 -0400)]
split-string takes a new arg TRIM that's a regexp
saying what to trim from the start and end of each substring.
* subr.el (split-string): New arg TRIM.
Eli Zaretskii [Fri, 19 Jul 2013 10:55:36 +0000 (13:55 +0300)]
Fix the fix for bug #14901.
src/keyboard.c (kbd_buffer_get_event): Use Display_Info instead of
unportable 'struct x_display_info'.
(DISPLAY_LIST_INFO): Delete macro: not needed, since Display_Info
is a portable type.
Xue Fuqiao [Fri, 19 Jul 2013 06:31:17 +0000 (14:31 +0800)]
* doc/lispref/windows.texi (Display Action Functions): Mention next-window.
Paul Eggert [Fri, 19 Jul 2013 05:36:50 +0000 (22:36 -0700)]
* sysdep.c [GNU_LINUX]: Fix fd and memory leaks and similar issues.
(procfs_ttyname): Don't use uninitialized storage if emacs_fopen
or fscanf fails.
(system_process_attributes): Prefer plain char to unsigned char
when either will do. Clean up properly if interrupted or if
memory allocations fail. Don't assume sscanf succeeds. Remove
no-longer-needed workaround to stop GCC from whining. Read
command-line once, instead of multiple times. Check read status a
bit more carefully.
Paul Eggert [Fri, 19 Jul 2013 01:24:35 +0000 (18:24 -0700)]
Fix obscure porting bug with varargs functions.
The code assumed that int is treated like ptrdiff_t in a vararg
function, which is not a portable assumption. There was a similar
-- though these days less likely -- porting problem with various
assumptions that pointers of different types all smell the same as
far as vararg functions is conserved. To make this problem less
likely in the future, redo the API to use varargs functions.
* alloc.c (make_save_value): Remove this vararg function.
All uses changed to ...
(make_save_int_int_int, make_save_obj_obj_obj_obj)
(make_save_ptr_int, make_save_funcptr_ptr_obj, make_save_memory):
New functions.
(make_save_ptr): Rename from make_save_pointer, for consistency with
the above. Define only on platforms that need it. All uses changed.
Juanma Barranquero [Fri, 19 Jul 2013 00:38:19 +0000 (02:38 +0200)]
lisp/ChangeLog, src/ChangeLog: Fix typos.
Paul Eggert [Thu, 18 Jul 2013 21:16:33 +0000 (14:16 -0700)]
* keyboard.c: Try to fix typos in previous change.
(DISPLAY_LIST_INFO): New macro.
(kbd_buffer_get_event): Do not access members that are not present
in X11. Revert nadvertent change of "!=" to "=".
Richard Copley [Thu, 18 Jul 2013 16:56:08 +0000 (12:56 -0400)]
* gdb-mi.el (gdb-done-or-error): Guard against "%" in gdb output (tiny change)
Fixes: debbugs:14127
Juanma Barranquero [Thu, 18 Jul 2013 16:50:05 +0000 (18:50 +0200)]
Followup to 2013-07-16T11:41:06Z!jan.h.d@swipnet.se.
* lisp/frame.el (blink-cursor-timer-function, blink-cursor-suspend):
Add check for W32.
* src/keyboard.c (kbd_buffer_get_event):
* src/w32term.c (x_focus_changed): Port FOCUS_(IN|OUT)_EVENT changes to W32.
Katsumi Yamaoka [Thu, 18 Jul 2013 11:26:04 +0000 (11:26 +0000)]
gnus-art.el (gnus-shr-put-image): Make it work as well for shr.el's that the old Emacs 24s bundle
Paul Eggert [Thu, 18 Jul 2013 10:24:26 +0000 (03:24 -0700)]
* filelock.c: Fix unlikely file descriptor leaks.
(get_boot_time_1): Rework to avoid using emacs_open.
This doesn't actually fix a leak, but is better anyway.
(read_lock_data): Use read, not emacs_read.
Michael Albinus [Thu, 18 Jul 2013 10:03:49 +0000 (12:03 +0200)]
* filenotify.el (file-notify--library): Renamed from
`file-notify-support'. Do not autoload. Adapt all uses.
(file-notify-supported-p): New defun.
* autorevert.el (auto-revert-use-notify): Use
`file-notify-supported-p' instead of `file-notify-support'. Adapt
docstring.
(auto-revert-notify-add-watch): Use `file-notify-supported-p'.
* net/tramp.el (tramp-file-name-for-operation):
Add `file-notify-supported-p'.
* net/tramp-sh.el (tramp-sh-handle-file-notify-supported-p):
New defun.
(tramp-sh-file-name-handler-alist): Add it as handler for
`file-notify-supported-p '.
* net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Add `ignore' as handler for `file-notify-*' functions.
Paul Eggert [Thu, 18 Jul 2013 09:55:00 +0000 (02:55 -0700)]
* doc.c: Fix minor memory and file descriptor leaks.
* doc.c (get_doc_string): Fix memory leak when doc file absent.
(get_doc_string, Fsnarf_documentation):
Fix file descriptor leak on error.
Paul Eggert [Thu, 18 Jul 2013 08:35:27 +0000 (01:35 -0700)]
* term.c: Fix minor fdopen-related file descriptor leaks.
* term.c (Fresume_tty) [!MSDOS]: Close fd if fdopen (fd) fails.
(init_tty) [!DOS_NT]: Likewise. Also close fd if isatty (fd) fails.
Paul Eggert [Thu, 18 Jul 2013 02:12:59 +0000 (19:12 -0700)]
* charset.c: Fix file descriptor leaks and errno issues.
Include <errno.h>.
(load_charset_map_from_file): Don't leak file descriptor on error.
Use plain record_xmalloc since the allocation is larger than
MAX_ALLOCA; that's simpler here. Simplify test for exhaustion
of entries.
* eval.c (record_unwind_protect_nothing):
* fileio.c (fclose_unwind):
New functions.
* lread.c (load_unwind): Remove. All uses replaced by fclose_unwind.
The replacement doesn't block input, but that no longer seems
necessary.
Paul Eggert [Wed, 17 Jul 2013 17:24:54 +0000 (10:24 -0700)]
* lread.c: Fix file descriptor leaks and errno issues.
(Fload): Close some races that leaked fds or streams when 'load'
was interrupted.
(Fload, openp): Report error number of last nontrivial failure to open.
ENOENT counts as trivial.
* eval.c (do_nothing, clear_unwind_protect, set_unwind_protect_ptr):
New functions.
* fileio.c (close_file_unwind): No need to test whether FD is nonnegative,
now that the function is always called with a nonnegative arg.
* lisp.h (set_unwind_protect_ptr, set_unwind_protect_int): Remove.
All uses replaced with ...
(clear_unwind_protect, set_unwind_protect_ptr): New decls.
Eli Zaretskii [Wed, 17 Jul 2013 16:47:49 +0000 (19:47 +0300)]
Fix bug #14881 with scrolling images smaller than the window height.
lisp/simple.el (line-move-partial, line-move): Don't start vscroll or
scroll-up if the current line is not taller than the window.