1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-02 10:11:05 -08:00
Commit graph

109744 commits

Author SHA1 Message Date
Paul Eggert
b41b8a7eff * fileio.c (Finsert_file_contents): Simplify.
Remove unnecessary assignments and tests.
2013-01-21 22:10:20 -08:00
Lars Magne Ingebrigtsen
bb677ef744 gnus-sum.el (gnus-summary-read-group-1): Debbugs group entry fixups 2013-01-21 22:07:34 +00:00
Eli Zaretskii
84e5ed96b0 Another minor fix in acl_set_file on Windows.
src/w32.c (acl_set_file): Don't test for errors unless
 set_file_security returns FALSE.  Avoids spurious errors when
 saving files.
2013-01-21 20:00:19 +02:00
Dmitry Antipov
2ef88fd45c * fileio.c (Finsert_file_contents): Revert code introduced at
2013-01-18 in favor of the simpler and generally better fix.
Save stack space by removing 'buffer' and reusing 'read_buf'
where appropriate.
2013-01-21 21:01:09 +04:00
Agustín Martín
7fd5a8435f ispell.el: Make sure hunspell specific dict names are used for standard dicts when using hunspell.
(ispell-hunspell-dictionary-equivs-alist):
  New variable to map standard dict names to hunspell ones.

(ispell-set-spellchecker-params):
  Make sure specific dict names are used for standard dicts with hunspell.

  If a mapping is missing, skip that dictionary.

Fixes: debbugs:13460
2013-01-21 17:05:30 +01:00
Tassilo Horn
e6aff855ce * textmodes/reftex-cite.el (reftex-format-citation): Add format
chars for note (%N) and url (%U).
* textmodes/reftex-vars.el (reftex-cite-format): Document them.
2013-01-21 13:14:56 +01:00
Juri Linkov
c84b08818d * lisp/frame.el: Bind f10' in esc-map' to `toggle-frame-maximized'
in addition to existing separate binding `meta f10' in `global-map'.

Fixes: debbugs:13484
2013-01-21 12:45:20 +02:00
Michael Albinus
a36e2d260d Improve XEmacs compatibility.
* net/tramp.el (tramp-replace-environment-variables): Make it a defun.

* net/tramp-adb.el (top): Require `time-date'.
(tramp-adb-ls-output-time-less-p): Use `tramp-time-less-p'.
(tramp-adb-handle-copy-file, tramp-adb-handle-rename-file): Use
`tramp-file-name-handler'.
(tramp-adb-maybe-open-connection): Use
`tramp-compat-set-process-query-on-exit-flag'.

* net/tramp-sh.el (tramp-sh-handle-file-acl): Use
`tramp-compat-funcall'.

* net/tramp-smb.el (tramp-smb-handle-file-acl): Use `looking-at' and
`tramp-compat-funcall'.
2013-01-21 10:49:43 +01:00
Jürgen Hötzel
88c7dfa370 * net/tramp-adb.el (tramp-adb-handle-start-file-process): Complete
reimplementation using "adb shell command ..." instead of running
remote shell interactively.
2013-01-21 10:40:51 +01:00
Eli Zaretskii
a219080bfb Mention in NEWS that scroll-bar-adjust-thumb-portion is for X only. Bug#13503. 2013-01-20 20:06:54 +02:00
Paul Eggert
ea6e730c56 * src/doprnt.c: Fix comment. 2013-01-20 09:45:53 -08:00
Glenn Morris
a576cc76c8 * lisp-mode.el (emacs-lisp-mode-map): Add native profiler menu entries. 2013-01-19 18:40:49 -08:00
Glenn Morris
15df6fa4f1 profiler.el tweaks
* profiler.el (profiler-running-p): New function.
(profiler-cpu-profile): Use profiler-running-p.
(profiler-report-mode-map): Add some more menu entries.
2013-01-19 18:39:59 -08:00
Paul Eggert
ee271528bf Improve addr2line suggestion.
Fixes: debbugs:13445
2013-01-19 14:48:47 -08:00
Paul Eggert
d7a0a7c9bd * lisp.h (eabs): Define unconditionally.
The old "#if !defined (eabs)" was an unnecessary revenant of back
when this macro was called "abs".  Document 'eabs' better.

Fixes: debbugs:13419
2013-01-19 14:33:29 -08:00
Paul Eggert
dd4d3d3a52 Fix typo: addrline -> binutils. 2013-01-19 14:15:03 -08:00
Paul Eggert
7f10227256 * trouble.texi (Crashing): Suggest -p for recent addrline.
Without it, I don't see function names.  Older addrlines will die
out sooner or later, so tailor the suggestion to recent addrline
and put in a comment about older ones.

Fixes: debbugs:13445
2013-01-19 14:12:27 -08:00
Glenn Morris
e4b2330590 Tweak previous change 2013-01-19 12:58:00 -08:00
Glenn Morris
c4d1e0c39c * lisp/mail/unrmail.el (unrmail): Do not mangle the mbox From line
fixes 2012-12-07 change.

Fixes: debbugs:13499
2013-01-19 12:54:56 -08:00
Glenn Morris
795e7a5b32 Merge from emacs-24; up to 2012-12-11T09:51:12Z!dmantipov@yandex.ru 2013-01-19 12:38:13 -08:00
Eli Zaretskii
59ac2d1316 Fix crashes with lots of overlays.
src/editfns.c (get_pos_property): Use SAFE_ALLOCA_LISP, to avoid
 segfault when there are lots of overlays.
 src/buffer.c (sort_overlays): Use SAFE_NALLOCA, to avoid segfault
 when there are lots of overlays.  See
 http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00421.html
 for the details and a way to reproduce.
2013-01-19 22:04:33 +02:00
Paul Eggert
3a955a1f86 * fileio.c: Use O_APPEND to append.
This corresponds better to the natural interpretation of "append",
and avoids the need to open the output file twice, or to invoke
lseek when APPEND is neither nil nor a number.
This relies on POSIX 1003.1-1988 or later, which is OK nowadays.
(Fwrite_region): Simplify.  Use O_APPEND instead of opening the
file possibly twice, and lseeking to its end; this avoids the
need to lseek on non-regular files.  Do not use O_EXCL and O_TRUNC
at the same time: the combination is never needed and apparently
it doesn't work with DOS_NT.
2013-01-19 10:58:40 -08:00
Christian Wittern
20de6ab6a5 * image-mode.el (image-next-file, image-previous-file): New commands.
(image-mode-map): Bind them to n and p.
(image-mode--images-in-directory): New helper function.

Fixes: debbugs:8453
2013-01-19 23:22:38 +08:00
Paul Eggert
21cd50b803 Fix size bug on DOS_NT introduced by CIFS workaround.
* fileio.c (Fwrite_region): Use O_BINARY in checking code, too.

Fixes: debbugs:13149
2013-01-19 04:29:10 -08:00
Paul Eggert
3908c57608 * fileio.c (Fwrite_region): Sync diagnostic to previous change. 2013-01-19 04:17:20 -08:00
Chong Yidong
2a43515aaa * image-mode.el (image-mode-fit-frame): Add a frame argument.
Suggested by Drew Adams.  Handle window decorations;
save and restore the old window configuration.

Fixes: debbugs:7730
2013-01-19 18:34:07 +08:00
Paul Eggert
b3fbb3956c Allow floating-point file offsets.
Problem reported by Vitalie Spinu in
<http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00411.html>.
* doc/lispref/files.texi (Reading from Files, Writing to Files):
Say that file offsets can be numbers, not just integers.
* src/fileio.c (emacs_lseek): Remove.
(file_offset): New function.
(Finsert_file_contents, Fwrite_region): Use it.
2013-01-19 01:59:51 -08:00
Chong Yidong
73c1421878 * emacs.c (Fkill_emacs): Set waiting_for_input to 0 to avoid aborting on Fsignal.
Fixes: debbugs:13289
2013-01-19 16:49:17 +08:00
Eli Zaretskii
76e9f7b9a1 Make 'fstat' on MS-Windows behave more like 'stat' and 'lstat'.
src/w32.c (fstat): Return owner and group like 'stat' and 'lstat' do.
2013-01-19 09:32:36 +02:00
Eli Zaretskii
6a9465f387 Minor fix in acl_set_file.
src/w32.c (acl_set_file): Treat ERROR_ACCESS_DENIED from
 set_file_security as failure due to insufficient privileges.
 Reported by Fabrice Popineau <fabrice.popineau@supelec.fr>.
2013-01-19 09:13:19 +02:00
Paul Eggert
9fe43ff672 Work around bug in CIFS and vboxsf file systems.
The bug was observed on Ubuntu operating inside a virtual machine,
editing files mounted via CIFS or vboxsf from the MS Windows 7 host.
The workaround introduces a race condition on non-buggy hosts,
but it's an unlikely race and anyway there's a nearly identical
nearby race that can't be fixed.
* fileio.c (valid_timestamp_file_system, timestamp_file_system):
New static vars.
(Fwrite_region): Test for file system time stamp bug.
(init_fileio): New function.
* lisp.h (init_fileio): Declare it.
* emacs.c (main): Call it.

Fixes: debbugs:13149
2013-01-18 20:44:34 -08:00
Paul Eggert
fa705c9927 * fileio.c (Finsert_file_contents): Simplify new diagnostic
and make it more consistent with other stat-failure diagnostics.
2013-01-18 16:40:07 -08:00
Leo Liu
2fc71e3c45 Prune erroneous values in dired-get-marked-files
Fixes: debbugs:13152
2013-01-19 02:35:44 +08:00
Leo Liu
b117094709 * lisp/progmodes/js.el: Tweak autoload cookie for alias. 2013-01-19 02:22:18 +08:00
Dmitry Antipov
e07469fa51 Fix crash when inserting data from non-regular files. See
http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00406.html
for the error description produced by valgrind.
* fileio.c (read_non_regular): Rename to read_contents.
Free Lisp_Save_Value object used to pass parameters.
(read_non_regular_quit): Rename to read_contents_quit.
(Finsert_file_contents): Redesign internal file reading loop to adjust
gap and end positions after each read and so help make_gap to work
properly.  Do not signal an I/O error too early and so do not leave
not yet decoded characters in a buffer, which was the reason of
redisplay crash.  Use list2 to build return value.  Adjust comments.
2013-01-18 10:32:12 +04:00
Paul Eggert
6772211202 Close a race when statting and reading files.
* fileio.c (Finsert_file_contents): Use open+fstat, not stat+open.
This avoids a race if the file is renamed between stat and open.
This race is not the problem originally noted in Bug#13149;
see <http://bugs.gnu.org/13149#73> and later messages in the thread.
2013-01-17 21:12:08 -08:00
Glenn Morris
e17b97778d * doc/emacs/custom.texi (Directory Variables): Fix paren typo. 2013-01-17 20:53:34 -05:00
Michael Albinus
0eb8768885 * autorevert.el (auto-revert-notify-watch-descriptor): Make it
buffer local, again.  This was lost with the fix on 2013-01-12.
2013-01-17 20:12:40 +01:00
Glenn Morris
858c7150f6 Auto-commit of generated files. 2013-01-17 06:17:35 -05:00
Jürgen Hötzel
99d36ea8f6 * eshell/esh-util.el (eshell-path-env): Make it buffer local, in
order to support several eshell buffers in parallel.
2013-01-17 11:01:33 +01:00
Michael Albinus
68a08a32e3 * autorevert.el (auto-revert-use-notify): In the :set function, do
not modify `kill-buffer-hook'.
(auto-revert-notify-rm-watch): Remove
`auto-revert-notify-rm-watch' from `kill-buffer-hook'.
(auto-revert-notify-add-watch): Do not call
`auto-revert-notify-rm-watch', but add it to a buffer local
`kill-buffer-hook'.
2013-01-17 10:06:47 +01:00
Dmitry Antipov
468afbacea * lisp.h (toplevel): Add comment about using Lisp_Save_Value
objects, related functions and macros.
(make_save_value): Adjust prototype.
(make_save_pointer): New prototype.
(SAFE_NALLOCA): Fix indentation.  Use make_save_pointer.
(SAFE_ALLOCA_LISP): Adjust make_save_value usage.
* alloc.c (format_save_value): Rename to make_save_value.
(make_save_pointer): New function.
(record_xmalloc): Use make_save_pointer.
* dired.c, editfns.c, fileio.c, font.c, gtkutil.c, lread.c:
* nsmenu.m, nsterm.m, xfns.c, xmenu.c, xselect.c, keymap.c:
Change users of make_save_value to make_save_pointer.
Likewise for format_save_value and make_save_value.
2013-01-17 10:29:40 +04:00
Dmitry Antipov
0e70695aa4 * buffer.h (NARROWED, BUF_NARROWED): Drop unused macros.
(DECODE_POSITION, BUFFER_CHECK_INDIRECTION): Fix indentation.
* buffer.c (toplevel, syms_of_buffer): Drop old commented-out
debugging stubs.
2013-01-17 09:52:13 +04:00
Glenn Morris
19503d5abf etags.el fix for bug#13412
* lisp/progmodes/etags.el (tags-table-check-computed-list):
Preserve point in tags buffer.
2013-01-16 21:07:25 -05:00
Glenn Morris
085d34c46a * src/fns.c (Frandom): Doc fix. 2013-01-16 21:05:16 -05:00
Stefan Monnier
e59eee439c * lisp/emacs-lisp/trace.el (trace--read-args): Use a closure and an honest
call to `eval' rather than a backquoted lambda.
2013-01-16 14:06:15 -05:00
Paul Eggert
ffe04adc88 Merge from gnulib. 2013-01-16 09:45:39 -08:00
Glenn Morris
5dfac85d20 Auto-commit of loaddefs files. 2013-01-16 07:21:01 -05:00
Glenn Morris
f1488a0bb0 Auto-commit of generated files. 2013-01-16 07:17:36 -05:00
Glenn Morris
ac924f35e4 Auto-commit of generated files. 2013-01-16 06:17:35 -05:00