1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-12 09:28:24 +00:00
Commit Graph

101068 Commits

Author SHA1 Message Date
Martin Rudalics
25aef8b85b Rewrite display-buffer-alist and display-buffer-normalize-specifiers.
* window.el (display-buffer-alist): Set pop-up-window-min-height
and pop-up-window-min-width in default value.  Reported by
Thierry Volpiatto <thierry.volpiatto@gmail.com>.  New specifier
other-window-means-other-frame.
(display-buffer-macro-specifiers): Comment out entry for
other-window specifier.
(display-buffer-other-window-means-other-frame): New function.
(display-buffer-normalize-specifiers-1): New arguments
buffer-name and label.  Treat other-window case specially.
(display-buffer-normalize-specifiers-2): Treat other-window case
specially.
(display-buffer-normalize-specifiers-3): New function.
(display-buffer-normalize-specifiers): Call
display-buffer-normalize-specifiers-3.
2011-06-17 16:50:11 +02:00
Glenn Morris
ce4331ef48 Auto-commit of generated files. 2011-06-17 06:18:17 -04:00
Martin Rudalics
d1067961b1 Fix handling of old `display-buffer' options (bug#8851) (bug#8856).
* window.el (display-buffer-normalize-specifiers-1): Don't
check pop-up-frames for 'unset initialization.
(display-buffer-normalize-specifiers-2): Major rewrite using
special-display-p and same-window-p (Bug#8851) and (Bug#8856).
(pop-up-frames, display-buffer-reuse-frames)
(display-buffer-mark-dedicated): Don't initialize to 'unset.
Suggested by David Engster <deng@randomsample.de>.
(even-window-heights): Initialize to 'unset.
(display-buffer-alist-set): Handle new 'unset initializations.
2011-06-17 10:45:37 +02:00
Martin Rudalics
dbad4f694d Fix two typos in same-window-p.
* window.el (same-window-p): Fix two typos introduced when
adding with-no-warnings.
2011-06-17 08:04:44 +02:00
Paul Eggert
bf4846e712 * m4/lstat.m4: Merge from gnulib (Bug#8878). 2011-06-16 16:10:17 -07:00
Paul Eggert
dd3482fe59 * lisp.h: Include <limits.h>, for INT_MAX, LONG_MAX, LLONG_MAX.
Without this, prin1 mishandles Lisp_Misc_Save_Value printing on
hosts with pre-C99 libraries, because pD is wrongly defined to "t".
2011-06-16 15:50:46 -07:00
Paul Eggert
393d71f34c Improve buffer-overflow checking (Bug#8873). 2011-06-16 14:25:42 -07:00
Paul Eggert
4847e3f0a9 Merge from trunk. 2011-06-16 14:19:55 -07:00
Paul Eggert
1c8e352f7e Improve buffer-overflow checking.
* fileio.c (Finsert_file_contents):
* insdel.c (insert_from_buffer_1, replace_range, replace_range_2):
Remove the old (too-loose) buffer overflow checks.
They weren't needed, since make_gap checks for buffer overflow.
* insdel.c (make_gap_larger): Catch buffer overflows that were missed.
The old code merely checked for Emacs fixnum overflow, and relied
on undefined (wraparound) behavior.  The new code avoids undefined
behavior, and also checks for ptrdiff_t and/or size_t overflow.
2011-06-16 14:18:12 -07:00
Miles Bader
0cca0a78a4 configure.in: Try to determine CRT_DIR automatically when using gcc 2011-06-17 02:50:21 +09:00
Paul Eggert
21d890a4ec * editfns.c: Tune. Don't use wider integers than needed. Don't use alloca.
Use a bigger 'string' buffer.  Rewrite to avoid 'n > 0' test.
2011-06-16 10:44:43 -07:00
Paul Eggert
2e6813b0a5 * editfns.c (Finsert_char): Don't dump core with very negative counts. 2011-06-16 10:25:16 -07:00
Martin Rudalics
67222e1dff Have enlarge-/shrink-window not report errors in most cases (bug#8862).
* window.el (enlarge-window, shrink-window): Don't report an error
when the window can't be resized as requested (Bug#8862).
2011-06-16 16:01:46 +02:00
Glenn Morris
52724a05ab Auto-commit of generated files. 2011-06-16 06:18:50 -04:00
Martin Rudalics
9c2755e9b4 Never ever pop up a new frame in noninteractive mode (bug#8857).
(display-buffer): Don't check noninteractive when calling
display-buffer-pop-up-frame.
(display-buffer-pop-up-frame): Never pop up a frame in
noninteractive mode (Bug#8857).
2011-06-16 11:21:56 +02:00
Martin Rudalics
981d5c0932 Fix doc-strings of switch-to-buffer family functions (bug#8875).
(switch-to-buffer-same-frame, switch-to-buffer-other-window)
(switch-to-buffer-other-window-same-frame)
(switch-to-buffer-other-frame): Fix doc-strings.  Reported by Drew
Adams (Bug#8875).
2011-06-16 10:55:08 +02:00
Martin Rudalics
9b9c9e3acb Improve cohabitation of pop-up-frames and second argument of display-buffer (bug#8865).
* window.el (display-buffer-normalize-specifiers-1): Respect
current value of pop-up-frames for most reasonable values of
second argument of display-buffer (Bug#8865).
2011-06-16 09:31:51 +02:00
Paul Eggert
599a9e4f7c * insdel.c (replace_range): Fix buf overflow when insbytes < outgoing. 2011-06-15 23:57:02 -07:00
Paul Eggert
9956144405 * insdel.c, lisp.h (buffer_overflow): New function.
(insert_from_buffer_1, replace_range, replace_range_2):
* insdel.c (make_gap_larger):
* editfns.c (Finsert_char):
* fileio.c (Finsert_file_contents): Use it, to normalize wording.
2011-06-15 23:48:01 -07:00
Paul Eggert
28177adde9 * buffer.h (BUF_BYTES_MAX): Cast to ptrdiff_t so that it's signed. 2011-06-15 23:19:26 -07:00
Teodor Zlatanov
2b8c5660b7 Merge changes made in Gnus trunk.
auth-source.el (auth-source-save-secrets): New variable to control if secret tokens should be saved encrypted.
 (auth-source-netrc-parse, auth-source-netrc-search): Pass the file name to `auth-source-netrc-normalize'.
 (with-auth-source-epa-overrides): Add convenience macro.  Don't depend on the EPA variables being defined.
 (auth-source-epa-make-gpg-token): Convert text to a "gpg:" token.
 (auth-source-netrc-normalize): Convert "gpg:" tokens back to text in the lexical-let closure.
 (auth-source-netrc-create): Create "gpg:" tokens according to `auth-source-save-secrets'.
2011-06-16 06:18:18 +00:00
Paul Eggert
8aeb5be96a Merge from gnulib: lib/gnulib.mk, m4/*.m4. 2011-06-15 15:27:54 -07:00
Lars Magne Ingebrigtsen
4bba86e621 (open-network-stream): Add the keyword :always-query-capabilities.
This is for the case where you want to force a `plain' network
connection, but the protocol still requires the capabilitiy command
(i.e., SMTP and EHLO).
2011-06-15 22:44:45 +02:00
Paul Eggert
a7af7fdede Integer overflow and signedness fixes (Bug#8873). 2011-06-15 12:57:25 -07:00
Paul Eggert
b1c46f026d * ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
(GET_CCL_RANGE, IN_INT_RANGE): Use it.
2011-06-15 12:40:52 -07:00
Paul Eggert
096a9774c8 * fileio.c (emacs_lseek): Work around GCC bug 43772. 2011-06-15 12:29:18 -07:00
Paul Eggert
a2a0186171 * character.h, charset.h: Use verify_expr, not verify_true. 2011-06-15 11:57:45 -07:00
Paul Eggert
dfc926249a Merge from trunk. 2011-06-15 11:52:30 -07:00
Paul Eggert
8c9b210626 * lib/ftoastr.c, lib/stdio.in.h, lib/verify.h: Merge from gnulib. 2011-06-15 11:50:18 -07:00
Chong Yidong
eeafcea7ee * doc/lispref/text.texi (Special Properties): Clarify role of font-lock-face. 2011-06-15 14:45:28 -04:00
Stefan Monnier
9ffdd3baa7 * lisp/pcmpl-rpm.el (pcomplete/rpm): Minor simplification. 2011-06-15 14:40:00 -04:00
Stefan Monnier
cb581a672b * lisp/emacs-lisp/debug.el (debug): Don't leave the buffer in Debugger. 2011-06-15 14:39:04 -04:00
Stefan Monnier
0ac306045f * src/eval.c (Fdefvaralias): Also mark the target as variable-special-p. 2011-06-15 14:36:00 -04:00
Stefan Monnier
2b75be6704 * lisp/abbrev.el (define-abbrev-table): Don't add a table multiple times. 2011-06-15 14:33:33 -04:00
Alan Mackenzie
8c0e35891e progmodes/cc-fonts.el (c-font-lock-declarations): 1: Whilst checking for
declarators, disable knr checking to speed up for normal files.  2:
Refactor, replacing a sequence of nested if forms by a cond form.
2011-06-15 18:24:25 +00:00
Paul Eggert
ff672d2c87 Merge from trunk. 2011-06-15 11:07:38 -07:00
Lars Magne Ingebrigtsen
b96e6cde3e Renamed process-alive-p' to process-live-p' for consistency with other `-live-p' functions. 2011-06-15 19:30:41 +02:00
Stefan Monnier
efdcdbf823 Don't encourage the use of display-buffer-alist from Elisp code.
* lisp/window.el (same-window-buffer-names, same-window-regexps)
(special-display-frame-alist, special-display-popup-frame)
(special-display-function, special-display-buffer-names)
(special-display-regexps, pop-up-frame-alist)
(pop-up-frame-function, pop-up-frames, display-buffer-reuse-frames)
(pop-up-windows, split-window-preferred-function)
(split-height-threshold, split-width-threshold, even-window-heights)
(display-buffer-mark-dedicated): Fix obsolescence info.
2011-06-15 13:20:36 -04:00
Dan Nicolaescu
50328a1b27 * lisp/progmodes/cfengine.el (cfengine-mode): Derive from prog-mode. 2011-06-15 07:47:57 -07:00
Dan Nicolaescu
679e968891 Remove some macros that are either not used anymore or don't really
need documenting here.
2011-06-15 07:11:04 -07:00
Dan Nicolaescu
c5cde04220 Derive some programming modes from prog-mode.
* lisp/progmodes/python.el (python-mode): Derive from prog-mode.
* lisp/progmodes/ps-mode.el (ps-mode):
* lisp/progmodes/mixal-mode.el (mixal-mode):
* lisp/progmodes/ld-script.el (ld-script-mode): Likewise.
2011-06-15 07:07:48 -07:00
Glenn Morris
571e1872c0 Auto-commit of generated files. 2011-06-15 06:18:57 -04:00
Martin Rudalics
baa1c9abaa Don't let display-buffer pop up new frames by default (bug#8857).
* window.el (display-buffer-alist): Trim default value to avoid
popping up a new frame (Bug#8857) or reusing an arbitrary window
on another frame.
(display-buffer): Do not fall back on popping up a new frame in
batch mode (Bug#8857).
2011-06-15 09:09:47 +02:00
Paul Eggert
e69dafade3 * fileio.c: Don't assume EMACS_INT fits in off_t.
(emacs_lseek): New static function.
(Finsert_file_contents, Fwrite_region): Use it.
Use SEEK_SET, SEEK_CUR, SEEK_END as appropriate.
2011-06-14 18:07:35 -07:00
Paul Eggert
566684ead5 * fns.c (Fload_average): Don't assume 100 * load average fits in int. 2011-06-14 16:18:53 -07:00
Paul Eggert
de41a81069 * fns.c (Fcopy_sequence): Don't assume vector length fits in int. 2011-06-14 15:41:38 -07:00
Paul Eggert
6346d30171 * fns.c (Fnthcdr, Fsort): Don't assume list length fits in int. 2011-06-14 15:39:35 -07:00
Paul Eggert
e6966cd635 * fns.c: Don't overflow int when computing a list length.
(Fsafe_length): Return a float if the value is not representable
as a fixnum.  This shouldn't happen except in contrived situations.
Use same QUIT_COUNT_HEURISTIC as Flength now does.
2011-06-14 15:32:12 -07:00
Paul Eggert
00c604f263 * fns.c (Flength): Don't overflow int when computing a list length.
Use EMACS_INT, not int, to avoid unwanted truncation on 64-bit hosts.
Check for QUIT every 1024 entries rather than every other entry;
that's faster and is responsive enough.  Report an error instead of
overflowing an integer.
2011-06-14 15:01:32 -07:00
Paul Eggert
dd0b0efbab * alloc.c: Check that resized vectors' lengths fit in fixnums.
(header_size, word_size): New constants.
(allocate_vectorlike): Don't check size overflow here.
(allocate_vector): Check it here instead, since this is the only
caller of allocate_vectorlike that could cause overflow.
Check that the new vector's length is representable as a fixnum.
2011-06-14 14:30:16 -07:00