1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00
Commit Graph

109105 Commits

Author SHA1 Message Date
Andreas Schwab
75d7aa242d * configure.ac: Fix source command in .gdbinit.
Don't quote $MAKEINFO.
2012-12-09 09:37:01 +01:00
Chong Yidong
5dea55d2fa * simple.el (set-mark-default-inactive): Delete accidentally-introduced option.
(set-mark-command, exchange-point-and-mark): Remove calls.
2012-12-09 11:40:09 +08:00
Paul Eggert
3cc53d6024 Allow spaces in some configuration vars (Bug#13078).
* configure.ac (srcdir): Don't assume $PWD lacks spaces.
(srcdir, MAKEINFO, PKG_CONFIG, PKG_CONFIG_MIN_VERSION):
All uses quoted, to allow spaces in these vars.
2012-12-08 18:22:39 -08:00
Glenn Morris
c6c08d3f8f Make eval-defun on a pre-defined defcustom call any :set function
* lisp/emacs-lisp/lisp-mode.el (eval-defun-1): Doc fix.
Respect a defcustom's :set function, if appropriate. 
(eval-defun): Doc fix.

* doc/lispref/customize.texi (Variable Definitions): Mention eval-defun
on a defcustom calls the :set function when appropriate.

* etc/NEWS: Mention this.

Fixes: debbugs:109
2012-12-08 17:04:43 -08:00
Juri Linkov
858aab4c02 * lisp/info.el (Info-copy-current-node-name, Info-breadcrumbs)
(Info-fontify-node, Info-bookmark-make-record): Remove the
file extension from Info-current-file.

Fixes: debbugs:13016
2012-12-09 01:12:08 +02:00
Eli Zaretskii
a16e75cd3c Fix putenv and unsetenv on MS-Windows.
src/w32.c (unsetenv): Return 0 if the input string is too long.

 nt/inc/ms-w32.h (sys_putenv): Add prototype.

Fixes: debbugs:13070
2012-12-08 20:27:37 +02:00
Paul Eggert
5745a7df2b Use putenv+unsetenv instead of modifying environ directly.
* admin/merge-gnulib (GNULIB_MODULES): Add putenv, unsetenv.
* lib/putenv.c, lib/unsetenv.c, m4/putenv.m4, m4/setenv.m4:
New files, copied automatically from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* src/alloc.c (xputenv): New function.
* src/dbusbind.c (Fdbus_init_bus):
* src/emacs.c (main):
* src/xterm.c (x_term_init):
Use xputenv instead of setenv or putenv, to detect memory exhaustion.
* src/editfns.c (initial_tz): Move static var decl up.
(tzvalbuf_in_environ): New static var.
(init_editfns):	Initialize these two static vars.
(Fencode_time): Don't assume arbitrary limit on EMACS_INT width.
Save old TZ value on stack, if it's small.
(Fencode_time, set_time_zone_rule): Don't modify 'environ' directly;
instead, use xputenv+unsetenv to set and restore TZ.
(environbuf): Remove static var.  All uses removed.
(Fset_time_zone_rule): Do not save TZ and environ;
no longer needed here.
(set_time_zone_rule_tz1, set_time_zone_rule_tz2) [LOCALTIME_CACHE]:
Move to inside set_time_zone_rule; they don't need file scope any more.
(set_time_zone_rule): Maintain the TZ=value string separately.
(syms_of_editfns): Don't initialize initial_tz;
init_editfns now does it.
* src/emacs.c (dump_tz) [HAVE_TZSET]: Now const.
* src/lisp.h (xputenv): New decl.

Fixes: debbugs:13070
2012-12-08 09:19:51 -08:00
Fabrice Popineau
c56efa4074 w32fns.c (emacs_abort): Don't do arithmetics on void pointers. 2012-12-08 14:11:29 +02:00
Eli Zaretskii
75ceee0567 Provide unsetenv for MS-Windows and make putenv Posix-compatible.
src/w32.c (unsetenv, sys_putenv): New functions.

 nt/inc/ms-w32.h (putenv): Redirect to sys_putenv.
 nt/config.nt (HAVE_UNSETENV): Define to 1.

Fixes: debbugs:13070
2012-12-08 13:32:10 +02:00
Glenn Morris
e4184a20f6 Auto-commit of generated files. 2012-12-08 06:17:32 -05:00
Chong Yidong
1b6dbfeb19 * src/editfns.c (Finsert_char): Make the error message more informative.
Fixes: debbugs:12992
2012-12-08 19:05:39 +08:00
Eli Zaretskii
63999a7dbe Windows followup to 2012-12-08T02:30:51Z!eggert@cs.ucla.edu.
lib/makefile.w32-in ($(BLD)/sig2str.$(O)): New dependency.
 Remove a stray character at the beginning of the file.

Fixes: debbugs:13026
2012-12-08 11:57:43 +02:00
Paul Eggert
7be78020e3 Simplify get_lim_data.
* admin/CPP-DEFINES (ULIMIT_BREAK_VALUE): Remove.
* configure.ac (ULIMIT_BREAK_VALUE): Remove.
* src/vm-limit.c (get_lim_data): Combine RLIMIT_AS and RLIMIT_DATA methods.
Remove USG and vlimit methods; no longer used these days.
Add #error catchall just in case.
2012-12-07 22:56:26 -08:00
Paul Eggert
d983a10b9a Assume POSIX 1003.1-1988 or later for signal.h.
Exceptions: do not assume SIGCONT, SIGSTOP, SIGTSTP, SIGTTIN,
SIGTTOU, SIGUSR1, SIGUSR2, as Microsoft platforms lack these.
* admin/CPP-DEFINES (SIGALRM, SIGCHLD, SIGHUP, SIGKILL, SIGPIPE, SIGQUIT):
Remove.
(SIGTRAP): Remove this one too, as config.h no longer defines it.
* admin/merge-gnulib (GNULIB_MODULES): Add sig2str.
* configure.ac (PTY_OPEN, PTY_TTY_NAME_SPRINTF):
Use SIGCHLD rather than SIGCLD.
* lib/sig2str.c, lib/sig2str.h, m4/sig2str.m4: New files, from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/makefile.w32-in (GNULIBOBJS): Add $(BUILD)/sig2str.$(O).
* src/process.c [subprocesses]: Include <c-ctype.h>, <sig2str.h>.
(deleted_pid_list, Fdelete_process, create_process)
(record_child_status_change, handle_child_signal, deliver_child_signal)
(init_process_emacs, syms_of_process):
Assume SIGCHLD is defined.
(parse_signal): Remove.  All uses removed.
(abbr_to_signal): New static function.
(Fsignal_process): Use it to convert signal names to ints.
* src/sysdep.c (sys_suspend) [!DOS_NT]: Use kill (0, ...) rather than
kill (getpgrp (), ...).
(emacs_sigaction_init): Assume SIGCHLD is defined.
(init_signals): Assume SIGALRM, SIGCHLD, SIGHUP, SIGKILL,
SIGPIPE, and SIGQUIT are defined.  Do not worry about SIGCLD any more.
* src/syssignal.h (EMACS_KILLPG): Remove.
All uses replaced by 'kill' with a negative pid.
(SIGCHLD): Remove definition, as we now assume SIGCHLD.
* src/w32proc.c (sys_kill): Support negative pids compatibly with POSIX.

Fixes: debbugs:13026
2012-12-07 18:30:51 -08:00
Paul Eggert
9cdde1e2df * sysdep.c (get_child_status): Abort on internal error (Bug#13086).
This will cause a production Emacs to dump core instead of
infinite-looping.
2012-12-07 09:53:17 -08:00
Stefan Monnier
2e4ad7e5a4 * lisp/hi-lock.el (hi-lock-unface-buffer): If there's no matching regexp at
point, still provide some default.
(hi-lock--regexps-at-point): Don't enforce a "hi-lock-" prefix on face
names, since we don't use it right now.  Actually return the list.
(hi-lock-file-patterns, hi-lock-interactive-patterns): Use defvar-local.
2012-12-07 11:48:42 -05:00
Chong Yidong
ffe7ba8f15 * novice.el (disabled-command-function): Remove a spurious help xref.
Suggested by Kelly Dean.

Fixes: debbugs:13043
2012-12-08 00:34:01 +08:00
Chong Yidong
454eb09524 * subr.el (text-clone-maintain): Fix clone overlay deletion
when a syntax is specified.

Fixes: debbugs:13025
2012-12-08 00:25:28 +08:00
Chong Yidong
75498db059 * info.el (Info-set-mode-line): Remove file extension from Info-current-file
if there is one.

Fixes: debbugs:13016
2012-12-07 23:31:43 +08:00
Glenn Morris
3f1071c747 Auto-commit of loaddefs files. 2012-12-07 06:19:45 -05:00
Glenn Morris
54c8b5baf1 rmail-cease-edit fixes related to "^From " escaping
* mail/rmail.el (rmail-mime-decoded): New permanent local.
(rmail-show-message-1): Set rmail-mime-decoded when appropriate.
* mail/rmailedit.el (rmail-cease-edit): Respect rmail-mbox-format
and rmail-mime-decoded.

Fixes: debbugs:9841
2012-12-07 00:59:14 -08:00
Dmitry Antipov
822995f8b9 * frame.c (make_frame): Do not set window's buffer to t.
* window.c (Fsplit_window_internal): Likewise.  Previously it was
used to indicate that the window is being set up.  Now we use
set_window_buffer for all new windows, so the condition in ...
(Fset_window_buffer): ... is always true and can be removed.
2012-12-07 12:13:49 +04:00
Dmitry Antipov
ed08365b9e Convenient macro to check whether the buffer is hidden.
* buffer.h (BUFFER_HIDDEN_P): New macro.
* frame.c (make_frame): Use it.  Adjust comment.
* buffer.c (candidate_buffer): New function.
(Fother_buffer, other_buffer_safely): Use it.
2012-12-07 11:16:32 +04:00
Glenn Morris
8e0762cade Fix :type in previous (un)rmail change, use a better :group 2012-12-06 20:57:43 -08:00
Glenn Morris
13a40633cf Default to mboxrd in Rmail, allow mboxo as an option
* lisp/mail/unrmail.el (unrmail-mbox-format): New option. 
(batch-unrmail, unrmail): Doc fixes.
(unrmail): Respect unrmail-mbox-format.
* lisp/mail/rmail.el (rmail-mbox-format): New option.
(rmail-show-message-1): Respect rmail-mbox-format.

* etc/NEWS: Related edits.

Fixes: debbugs:6574
2012-12-06 20:37:14 -08:00
Stefan Monnier
4611a3cce7 * lisp/emacs-lisp/cl-macs.el (cl-tagbody): New macro. 2012-12-06 22:56:57 -05:00
Paul Eggert
f24f2e22aa Spelling fixes. 2012-12-06 18:37:20 -08:00
Paul Eggert
39670ef467 * doc/lispref/internals.texi: Fix minor whitespace problems.
Fixes: debbugs:12973
2012-12-06 17:47:14 -08:00
Andreas Schwab
558fefa01d * themes/leuven-theme.el: Convert to Unix format. 2012-12-06 23:44:05 +01:00
Stefan Monnier
338bfefacb Further cleanup of the "cl-" namespace. Fit CL in 80 columns.
* lisp/emacs-lisp/cl-macs.el (cl--pop2, cl--optimize-safety)
(cl--optimize-speed, cl--not-toplevel, cl--parse-loop-clause)
(cl--expand-do-loop, cl--proclaim-history, cl--declare-stack)
(cl--do-proclaim, cl--proclaims-deferred): Rename from the "cl-" prefix.
(cl-progv): Don't rely on dynamic scoping to find the body.
* lisp/emacs-lisp/cl-lib.el (cl--optimize-speed, cl--optimize-safety)
(cl--proclaims-deferred): Rename from the "cl-" prefix.
(cl-declaim): Use backquotes.
* lisp/emacs-lisp/cl-extra.el (cl-make-random-state, cl-random-state-p):
Use "cl--" prefix for the object's tag.
2012-12-06 16:29:29 -05:00
Stefan Monnier
1812c7246e * lisp/ses.el: Use advice-add/remove.
(ses--advice-copy-region-as-kill, ses--advice-yank): New functions.
(copy-region-as-kill, yank): Use advice-add.
(ses-unload-function): Use advice-remove.
2012-12-06 15:16:38 -05:00
Jonas Bernoulli
24fc948039 * lisp/button.el: Make them work in header-lines.
(button-map): Add bindings for header-line and mode-line use.
(button-get, button-put, button-label): `button' may now be a string.
(button-activate): Don't make it a defsubst.
(button--area-button-p, button--area-button-string): New functions.
(make-text-button): Fix the return value when `beg' was a string.
(push-button): Handle the mode-line case.

Fixes: debbugs:12817
2012-12-06 15:10:36 -05:00
Eli Zaretskii
e86f51344b Avoid busy-waiting for child processes on Windows. (Bug#13086)
src/w32proc.c (waitpid): Avoid busy-waiting when called with WNOHANG
 if the child process is still running.  Instead, exit the wait
 loop and return zero.
2012-12-06 20:36:22 +02:00
Sam Steingold
5b4d7e523f * lisp/gnus/gnus-start.el (gnus-before-resume-hook): Add.
(gnus-1): Run it when Gnus is alive.
2012-12-06 13:30:38 -05:00
Stefan Monnier
93852cb0cf * lisp/progmodes/sql.el: Use cl-lib and lexical-binding; various cleanup.
(sql-signum): Remove.  Use `cl-signum' instead.
(sql-read-passwd): Remove; use read-passwd instread.
(sql-get-login-ext): Use read-string.
(sql-get-login): Use dolist and pcase.
(sql--completion-table): Rename from sql-try-completion.
Use complete-with-action.
(sql-mode): Don't change abbrev-all-caps globally.
(sql-connect): Don't rely on dynamic scoping for `new-name'.
(sql-postgres-completion-object): Initialize vars in their `let'.
(sql-comint-sybase, sql-comint-sqlite, sql-comint-mysql)
(sql-comint-solid, sql-comint-ms, sql-comint-postgres)
(sql-comint-interbase): Use a single append, without setq.
(sql-comint-linter): Same, and unwind-protect the LINTER_MBX var.
2012-12-06 12:29:30 -05:00
Stefan Monnier
853c1ffc03 * lisp/hi-lock.el: Rework the default face and the serialize regexp code.
(hi-lock--auto-select-face-defaults): Remove.
(hi-lock-string-serialize-serial): Remove.
(hi-lock--hashcons-hash): Rename from hi-lock-string-serialize-hash;
make weak.
(hi-lock--hashcons): Rename from hi-lock-string-serialize, return an
equal string.
(hi-lock-set-pattern): Adjust accordingly.
(hi-lock--regexps-at-point): Simplify accordingly.
(hi-lock--auto-select-face-defaults): Remove.
(hi-lock--last-face): New var to replace it.
(hi-lock-read-face-name): Rewrite.
(hi-lock-unface-buffer): Arrange for the face to be the next default.

Fixes: debbugs:11095
2012-12-06 11:17:11 -05:00
Dmitry Antipov
1700db3c71 * frame.h (x_char_width, x_char_height): Remove prototypes.
* w32term.h (x_char_width, x_char_height): Likewise.
* xfns.c (x_char_width, x_char_height): Remove.
* w32fns.c (x_char_width, x_char_height): Likewise.
* nsfns.c (x_char_width, x_char_height): Likewise.
* frame.c (Fframe_char_width): Use FRAME_COLUMN_WIDTH for
all window frames.
(Fframe_char_height): Likewise with FRAME_LINE_HEIGHT.
* keyboard.c (command_loop_1): Remove prototype.
(command_loop_2, top_level_1): Add static to match prototype.
2012-12-06 17:48:11 +04:00
Glenn Morris
347966bf30 Auto-commit of loaddefs files. 2012-12-06 06:21:08 -05:00
Glenn Morris
71ca0998cc Auto-commit of generated files. 2012-12-06 06:17:45 -05:00
Michael Albinus
5504e2c7ec * net/tramp.el (tramp-replace-environment-variables): Hide
compiler warning.
(tramp-file-name-for-operation): Remove `executable-find',
`start-process', `call-process' and `call-process-region'.

* net/tramp-compat.el (top): Don't require 'tramp-util and 'tramp-vc.

* net/tramp-gvfs.el (tramp-gvfs-dbus-event-error): Ensure backward
compatibility.

* net/tramp-sh.el (top): Remove `tramp-sh-handle-call-process-region'.
2012-12-06 10:15:27 +01:00
Paul Eggert
4288142b39 Update licenses to latest version from FSF.
These are just minor editorial changes.
2012-12-06 00:33:32 -08:00
Glenn Morris
7fc5e83f7f Convert consecutive copyright years to range 2012-12-05 23:33:20 -08:00
Paul Eggert
35fb805045 Fix a recently-introduced delete-process race condition.
* callproc.c, process.h (record_kill_process):
New function, containing part of the old call_process_kill.
(call_process_kill): Use it.
This does not change call_process_kill's behavior.
* process.c (Fdelete_process): Use record_kill_process to fix a
race condition that could cause Emacs to lose track of a child.
2012-12-05 23:31:58 -08:00
Dmitry Antipov
565212e598 Avoid code duplication between prev_frame and next_frame.
* frame.c (candidate_frame): New function.  Add comment.
(prev_frame, next_frame): Use it.  Adjust comment.
2012-12-06 10:23:51 +04:00
Glenn Morris
d8ad4d3ff9 Merge from emacs-24; up to 2012-11-24T16:58:43Z!cyd@gnu.org 2012-12-05 22:17:10 -08:00
Katsumi Yamaoka
b7f3003fdd spam.el: Fix last change 2012-12-06 04:37:54 +00:00
Katsumi Yamaoka
da9462398a gmm-utils.el (gmm-called-interactively-p): Restore as a macro.
gnus-art.el (article-unsplit-urls)
gnus-bookmark.el (gnus-bookmark-bmenu-list)
gnus-registry.el (gnus-registry-get-article-marks)
message.el (message-goto-body): Use it.
  (message-called-interactively-p): Remove.

spam-stat.el (spam-stat-called-interactively-p): New macro.
  (spam-stat-score-buffer): Use it.

spam.el: Silence the warnings against BBDB functions when compiling.

gnus-score.el (gnus-score-decode-text-parts):
  Use append+mapcar instead of the cl function mapcan.
2012-12-06 04:28:00 +00:00
Katsumi Yamaoka
9ad948e2fd Avoid letf macro use from Gnus
gnus/gmm-utils.el (gmm-flet): Remove.
gnus/gnus-sync.el (gnus-sync-lesync-call): Avoid overriding json-alist-p.
gnus/message.el (message-read-from-minibuffer): Avoid overriding mail-abbrev-in-expansion-header-p.
mail/mailabbrev.el (mail-abbrev-expand-wrapper): Work in minibuffer so as to enable message-read-from-minibuffer to expand mail aliases.
2012-12-06 03:30:23 +00:00
Chong Yidong
e1d51545ce * ffap.el (ffap-replace-file-component): Fix typo. 2012-12-06 11:04:21 +08:00
Chong Yidong
9a81a97f17 Fix copyright header in last commit.
Note that Fabrice Niessen is listed in the copyright.list file under a
pseudonym (Sébastien Vauban).
2012-12-06 10:57:59 +08:00