]> code.delx.au - gnu-emacs/log
gnu-emacs
11 years agoRelease MH-E manual version 8.4. mh-e-doc-8.4
Bill Wohler [Sun, 25 Nov 2012 18:22:04 +0000 (10:22 -0800)]
Release MH-E manual version 8.4.

* mh-e.texi: (VERSION, EDITION, UPDATED, UPDATE-MONTH, Preface):
Update for release 8.4.

11 years ago* lisp/textmodes/sgml-mode.el (sgml-tag): Fix indentation for closing tag.
Leo Liu [Sun, 25 Nov 2012 16:07:58 +0000 (00:07 +0800)]
* lisp/textmodes/sgml-mode.el (sgml-tag): Fix indentation for closing tag.

Fixes: debbugs:12979
11 years agoAuto-commit of generated files.
Glenn Morris [Sun, 25 Nov 2012 11:18:55 +0000 (06:18 -0500)]
Auto-commit of generated files.

11 years ago* sysdep.c (sys_subshell): Don't assume pid_t fits in int.
Paul Eggert [Sun, 25 Nov 2012 07:50:55 +0000 (23:50 -0800)]
* sysdep.c (sys_subshell): Don't assume pid_t fits in int.

11 years ago* textmodes/reftex-parse.el (reftex-parse-from-file): Use variable reftex-section...
Vincent Belaïche [Sun, 25 Nov 2012 05:05:34 +0000 (06:05 +0100)]
* textmodes/reftex-parse.el (reftex-parse-from-file): Use variable reftex-section-info-function in order to be compatible with Texinfo integration.

* textmodes/reftex.el (reftex-section-pre-regexp, reftex-section-post-regexp, reftex-section-info-function): New variable. (reftex-compile-variables): Use variables reftex-section-pre-regexp, reftex-section-post-regexp, and reftex-section-info-function in order to be compatible with Texinfo integration.

* textmodes/reftex-toc.el (reftex-toc-promote-action): use reftex-section-pre-regexp variable in order to be compatible with Texinfo integration.

11 years agoRevamp face-spec-set to be more analogous to setq for faces.
Chong Yidong [Sun, 25 Nov 2012 04:50:20 +0000 (12:50 +0800)]
Revamp face-spec-set to be more analogous to setq for faces.

* lisp/faces.el (face-spec-set): Change the third arg to specify
whether this function is being called via defface, customize, or a
third party.  Set the appropriate symbol properties.  Clear the
override spec if setting via Custom.  Initialize face if necessary.
(face-spec-recalc): Allow theme faces to completely replace the
defface spec, in the same way as custom faces (Bug#8454).

* lisp/cus-edit.el (custom-face-set, custom-face-mark-to-save)
(custom-face-reset-saved, custom-face-mark-to-reset-standard):
Simplify by using the new arg to face-spec-set.

* lisp/cus-face.el (custom-declare-face): Move face initialization to
face-spec-set.
(custom-theme-set-faces): Don't initialize the face name here, as
that is now done in face-spec-set.

* lisp/emacs-lisp/lisp-mode.el (eval-defun-1): When evaluating defface,
reset face-override-spec too, and use custom-declare-face.

Fixes: debbugs:4988
11 years ago* mh-e.texi (Procmail): Fix two @ typos.
Paul Eggert [Sun, 25 Nov 2012 00:05:54 +0000 (16:05 -0800)]
* mh-e.texi (Procmail): Fix two @ typos.

11 years ago* doclicense.texi, gpl.texi: Update to latest version from FSF.
Paul Eggert [Sat, 24 Nov 2012 21:37:18 +0000 (13:37 -0800)]
* doclicense.texi, gpl.texi: Update to latest version from FSF.

These are just minor editorial changes.

11 years ago* term/ns-win.el (ns-initialize-window-system): Move creation of
Jan Djärv [Sat, 24 Nov 2012 17:55:48 +0000 (18:55 +0100)]
* term/ns-win.el (ns-initialize-window-system): Move creation of
fontsets here.

Fixes: debbugs:11964
11 years ago* ses.el (ses-rename-cell): Correct bug on mode-line update after cell renaming.
Vincent Belaïche [Sat, 24 Nov 2012 17:44:29 +0000 (18:44 +0100)]
* ses.el (ses-rename-cell): Correct bug on mode-line update after cell renaming.

11 years agoRemove HAVE_MOUSE; see https://lists.gnu.org/archive/html/emacs-devel/2012-10/msg0040...
Ken Brown [Sat, 24 Nov 2012 17:20:49 +0000 (12:20 -0500)]
Remove HAVE_MOUSE; see https://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00403.html.

* configure.ac (HAVE_MOUSE): Remove.
* admin/CPP-DEFINES (HAVE_MOUSE): Remove.
* msdos/sed2v2.inp (HAVE_MOUSE): Remove.
* nt/config.nt (HAVE_MOUSE): Remove.
* src/keyboard.c (HAVE_MOUSE):
* src/frame.c (HAVE_MOUSE): Remove, and rewrite code as if HAVE_MOUSE
were always defined.

11 years ago* lisp/woman.el (woman-default-faces, woman-monochrome-faces): Mark as obsolete.
Chong Yidong [Sat, 24 Nov 2012 16:58:43 +0000 (00:58 +0800)]
* lisp/woman.el (woman-default-faces, woman-monochrome-faces): Mark as obsolete.

11 years agoUse ~ instead of /home/user.
Bill Wohler [Sat, 24 Nov 2012 07:13:44 +0000 (23:13 -0800)]
Use ~ instead of /home/user.
Use mformat instead of obsolete vfolder_format.

11 years ago* loading.texi (Named Features): @ -> @@ to fix typo.
Paul Eggert [Sat, 24 Nov 2012 06:50:44 +0000 (22:50 -0800)]
* loading.texi (Named Features): @ -> @@ to fix typo.

11 years agoFix dependency sorting in custom-theme-set-variables.
Chong Yidong [Sat, 24 Nov 2012 03:46:29 +0000 (11:46 +0800)]
Fix dependency sorting in custom-theme-set-variables.

* lisp/custom.el (custom-theme-set-variables): Use a topological sort
for ordering by custom dependencies.
(custom--sort-vars, custom--sort-vars-1): New functions.

Fixes: debbugs:12952
11 years agoMerge from emacs-24; up to 2012-11-19T11:36:02Z!yamaoka@jpl.org
Glenn Morris [Sat, 24 Nov 2012 01:57:09 +0000 (17:57 -0800)]
Merge from emacs-24; up to 2012-11-19T11:36:02Z!yamaoka@jpl.org

11 years agoFix a race condition with glib (Bug#8855).
Paul Eggert [Fri, 23 Nov 2012 22:20:31 +0000 (14:20 -0800)]
Fix a race condition with glib (Bug#8855).
This is a backport from the trunk, consisting of:

2012-11-17  Eli Zaretskii  <eliz@gnu.org>

* 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-03  Paul Eggert  <eggert@cs.ucla.edu>

Fix a race condition that causes Emacs to mess up glib (Bug#8855).
This is a backport from the trunk.
The symptom is a diagnostic "GLib-WARNING **: In call to
g_spawn_sync(), exit status of a child process was requested but
SIGCHLD action was set to SIG_IGN and ECHILD was received by
waitpid(), so exit status can't be returned."  The diagnostic
is partly wrong, as the SIGCHLD action is not set to SIG_IGN.
The real bug is a race condition between Emacs and glib: Emacs
does a waitpid (-1, ...) and reaps glib's subprocess by mistake,
so that glib can't find it.  Work around the bug by invoking
waitpid only on subprocesses that Emacs itself creates.
* src/process.c (create_process, record_child_status_change):
Don't use special value -1 in pid field, as the caller now must
know the pid rather than having the callee infer it.  The
inference was sometimes incorrect anyway, due to another race.
(create_process): Set new 'alive' member if child is created.
(process_status_retrieved): New function.
(record_child_status_change): Use it.
Accept negative 1st argument, which means to wait for the
processes that Emacs already knows about.  Move special-case code
for DOS_NT (which lacks WNOHANG) here, from caller.  Keep track of
processes that have already been waited for, by testing and
clearing new 'alive' member.
(CAN_HANDLE_MULTIPLE_CHILDREN): Remove, as record_child_status_change
now does this internally.
(handle_child_signal): Let record_child_status_change do all
the work, since we do not want to reap all exited child processes,
only the child processes that Emacs itself created.
* src/process.h (Lisp_Process): New boolean member 'alive'.

11 years ago* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Setup default value for
Stefan Monnier [Fri, 23 Nov 2012 21:49:13 +0000 (16:49 -0500)]
* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Setup default value for
lexical-binding.

Fixes: debbugs:12938
11 years ago* doc/misc/calc.texi (Date Formatting Codes): Mention the new
Jay Belanger [Fri, 23 Nov 2012 18:43:29 +0000 (12:43 -0600)]
* doc/misc/calc.texi (Date Formatting Codes): Mention the new
  beginning of the date numbering system.

11 years agolisp/image-mode.el (image-transform-check-size): Use assertions only
Wolfgang Jenkner [Fri, 23 Nov 2012 17:41:01 +0000 (18:41 +0100)]
lisp/image-mode.el (image-transform-check-size): Use assertions only
for images of type imagemagick.

Otherwise no error, image-transform-fit-to-{width,height} is
silently ignored, as before.  Doc fix.

11 years ago* lisp/erc/erc-backend.el: Fix last change that missed calls to `second'.
Stefan Monnier [Fri, 23 Nov 2012 16:00:57 +0000 (11:00 -0500)]
* lisp/erc/erc-backend.el: Fix last change that missed calls to `second'.

Fixes: debbugs:12970
11 years agont/config.nt: Sync with autogen/config.in.
Juanma Barranquero [Fri, 23 Nov 2012 15:42:40 +0000 (16:42 +0100)]
nt/config.nt: Sync with autogen/config.in.
(BROKEN_GETWD, HAVE_CLOSEDIR, HAVE_DIRENT_H, HAVE_FCNTL_H, HAVE_GETWD): Remove.

11 years ago* frame.h (struct frame): Remove display_preempted member
Dmitry Antipov [Fri, 23 Nov 2012 15:39:48 +0000 (19:39 +0400)]
* frame.h (struct frame): Remove display_preempted member
since all users are dead long ago.
* nsterm.h (struct x_output): Use the only dummy member.
* w32menu.c (pending_menu_activation): Remove since not
really used.
(set_frame_menubar): Adjust user.
* w32term.h (struct x_output): Drop outdated #if 0 code.
(struct w32_output): Use bitfields for explicit_parent,
asked_for_visible and menubar_active members.  Drop
unused pending_menu_activation member.
* xterm.h (struct x_output): Drop outdated #if 0 code.
Use bitfields for explicit_parent, asked_for_visible,
has_been_visible and net_wm_state_hidden_seen members.

11 years agoCorrect and reword recent changes to window.texi.
Martin Rudalics [Fri, 23 Nov 2012 14:39:07 +0000 (15:39 +0100)]
Correct and reword recent changes to window.texi.

* windows.texi (Basic Windows): Fix typo.
(Windows and Frames): Fix example.  Move description of
window-in-direction here.
(Recombining Windows): Fix example.
(Buffers and Windows): Fix description of
replace-buffer-in-windows.
(Switching Buffers): Reword.
(Display Action Functions): Minor adjustments.
(Choosing Window Options): Minor fixes.
(Window History): Minor rewording.
(Dedicated Windows): Correct and reword part describing how
dedicatedness affects functions removing buffers or windows.
* buffers.texi (The Buffer List): Fix description of
bury-buffer.

11 years agoAuto-commit of generated files.
Glenn Morris [Fri, 23 Nov 2012 11:17:42 +0000 (06:17 -0500)]
Auto-commit of generated files.

11 years agoFix bug #12955 with building under MSYS Bash.
Eli Zaretskii [Fri, 23 Nov 2012 08:47:34 +0000 (10:47 +0200)]
Fix bug #12955 with building under MSYS Bash.

 src/makefile.w32-in (globals.h, gl-stamp): Use $(SWITCHCHAR) instead
 of a literal "/".
 (gl-stamp): Invoke fc.exe directly, not through cmd.

11 years agoAdd some missing find options to find-cmd.el.
Chong Yidong [Fri, 23 Nov 2012 08:33:20 +0000 (16:33 +0800)]
Add some missing find options to find-cmd.el.

* find-cmd.el (find-constituents): Add executable, ipath,
readable, samefile, writable, daystart, regextype.

Fixes: debbugs:12856
11 years ago* modes.texi (%-Constructs): Fix statement about mode construct padding.
Chong Yidong [Fri, 23 Nov 2012 08:32:43 +0000 (16:32 +0800)]
* modes.texi (%-Constructs): Fix statement about mode construct padding.

Fixes: debbugs:12866
11 years agomovemail: treat EACCES etc. failures as permanent
Paul Eggert [Fri, 23 Nov 2012 08:28:06 +0000 (00:28 -0800)]
movemail: treat EACCES etc. failures as permanent

* movemail.c (main): Treat any link failure other than EEXIST as a
permanent failure, not just EPERM.  EACCES, for example.

11 years agoFix cursor display when several display strings follow each other.
Eli Zaretskii [Fri, 23 Nov 2012 08:27:05 +0000 (10:27 +0200)]
Fix cursor display when several display strings follow each other.

 src/xdisp.c (set_cursor_from_row): Skip step 2 only if point is not
 between bpos_covered and bpos_max.  This fixes cursor display when
 several display strings follow each other.

11 years ago* lisp/dired.el (dired-mark): Add optional arg `interactive'.
Juri Linkov [Fri, 23 Nov 2012 07:59:43 +0000 (09:59 +0200)]
* lisp/dired.el (dired-mark): Add optional arg `interactive'.
Check for `use-region-p' if `interactive' is non-nil.
(dired-unmark, dired-flag-file-deletion): Add optional arg
`interactive'.  Call `dired-mark' with the arg `interactive'.

Fixes: debbugs:10624
11 years ago* faces.el (color-defined-p): Doc fix.
Chong Yidong [Fri, 23 Nov 2012 07:56:27 +0000 (15:56 +0800)]
* faces.el (color-defined-p): Doc fix.

Fixes: debbugs:12853
11 years agoFix pgx in .gdbinit when CHECK_LISP_OBJECT_TYPE is defined.
Eli Zaretskii [Fri, 23 Nov 2012 07:54:33 +0000 (09:54 +0200)]
Fix pgx in .gdbinit when CHECK_LISP_OBJECT_TYPE is defined.

 src/.gdbinit (pgx): If the glyph's object is a string, display the
 pointer to string data, rather than the value of the string object
 itself (which barfs under CHECK_LISP_OBJECT_TYPE).

11 years agoAssume POSIX 1003.1-1988 or later for dirent.h.
Paul Eggert [Fri, 23 Nov 2012 07:48:43 +0000 (23:48 -0800)]
Assume POSIX 1003.1-1988 or later for dirent.h.

* admin/CPP-DEFINES (HAVE_CLOSEDIR, HAVE_DIRENT_H): Remove.
* admin/notes/copyright: Adjust to src/ndir.h -> nt/inc/dirent.h renaming.
* configure.ac: Do not check for dirent.h or closdir.
* nt/inc/dirent.h: Rename from ../src/ndir.h, with these changes:
(struct dirent): Rename from struct direct.  All uses changed.
* nt/inc/sys/dir.h: Remove.
* src/dired.c: Assume HAVE_DIRENT_H.
(NAMLEN): Remove, replacing with ...
(dirent_namelen): New function.  All uses changed.  Use the GNU macro
_D_EXACT_NAMELEN if available, as it's faster than strlen.
(DIRENTRY): Remove, replacing all uses with 'struct dirent'.
(DIRENTRY_NONEMPTY): Remove.  All callers now assume it's nonzero.
* src/makefile.w32-in (DIR_H): Remove.  All uses replaced with
$(NT_INC)/dirent.h.
($(BLD)/w32.$(O)): Do not depend on $(SRC)/ndir.h.
* src/ndir.h: Rename to ../nt/inc/dirent.h.
* src/sysdep.h (closedir) [!HAVE_CLOSEDIR]: Remove.
Do not include <dirent.h>; no longer needed.
* src/w32.c: Include <dirent.h> rather than "ndir.h".

Fixes: debbugs:12958
11 years agoAdd Bug# to Nov 17 ChangeLog entries.
Paul Eggert [Fri, 23 Nov 2012 07:31:58 +0000 (23:31 -0800)]
Add Bug# to Nov 17 ChangeLog entries.

11 years ago* lisp/wdired.el: Revert 2012-10-17 change partly and replace it with
Juri Linkov [Fri, 23 Nov 2012 07:28:37 +0000 (09:28 +0200)]
* lisp/wdired.el: Revert 2012-10-17 change partly and replace it with
Patch by Christopher Schmidt <christopher@ch.ristopher.com>.
(wdired-finish-edit): Add marks for new file names to
`wdired-old-marks'.  Restore marks using `dired-mark-remembered'
after `revert-buffer'.
(wdired-do-renames): Remove calls to `dired-remove-file',
`dired-add-file', `dired-add-entry'.

Fixes: debbugs:11795
11 years ago* xftfont.c (xftfont_open): Remove duplicate assignment.
Chong Yidong [Fri, 23 Nov 2012 06:23:28 +0000 (14:23 +0800)]
* xftfont.c (xftfont_open): Remove duplicate assignment.

11 years ago* emacs-lisp/ert.el, emacs-lisp/ert-x.el: Use cl-lib and lexical-binding.
Stefan Monnier [Fri, 23 Nov 2012 03:26:09 +0000 (22:26 -0500)]
* emacs-lisp/ert.el, emacs-lisp/ert-x.el: Use cl-lib and lexical-binding.

11 years agoAuto-commit of generated files.
Glenn Morris [Thu, 22 Nov 2012 11:17:34 +0000 (06:17 -0500)]
Auto-commit of generated files.

11 years ago* alloc.c (Fgarbage_collect): Unblock input after clearing
Dmitry Antipov [Thu, 22 Nov 2012 09:32:32 +0000 (13:32 +0400)]
* alloc.c (Fgarbage_collect): Unblock input after clearing
gc_in_progress to avoid note_mouse_highlight glitch with GC.
* frame.h (FRAME_MOUSE_UPDATE): New macro.
* msdos.c (IT_frame_up_to_date): Use it here...
* w32term.c (w32_frame_up_to_date): ...here...
* xterm.c (XTframe_up_to_date): ...and here...
* nsterm.m (ns_frame_up_to_date): ...but not here.
* lisp.h (Mouse_HLInfo): Remove mouse_face_deferred_gc member.
Adjust users.
* xdisp.c (message2_nolog, message3_nolog, note_mouse_highlight):
Do not check whether GC is in progress.

11 years agoDocument Calc Gregorian in NEWS; fix manual a bit.
Paul Eggert [Thu, 22 Nov 2012 08:39:27 +0000 (00:39 -0800)]
Document Calc Gregorian in NEWS; fix manual a bit.

11 years ago* calc/calc.el (calc-gregorian-switch): In menu, put dates before regions.
Paul Eggert [Thu, 22 Nov 2012 08:09:03 +0000 (00:09 -0800)]
* calc/calc.el (calc-gregorian-switch): In menu, put dates before regions.

This is easier to follow, lines up better in the menu, and lets us
coalesce regions that switch at the same time.  Give country
names, not "Vatican", as that's better for non-expert users.  Use
names that are stable between the date of switch and now, e.g.,
Bohemia and Moravia (which existed then and now) and not
Czechoslovakia (which didn't exist then and doesn't exist now).
What is now the U.S. mostly did not switch at the same time as
Britain, so omit the U.S.  Correct spelling of "Britain".
Catholic Switzerland was too much of a mess, so omit it.

11 years ago* calc/calc.el (calc-gregorian-switch): Move to after calc-refresh
Paul Eggert [Thu, 22 Nov 2012 07:31:45 +0000 (23:31 -0800)]
* calc/calc.el (calc-gregorian-switch): Move to after calc-refresh

definition.  This fixes a bootstrap failure.

11 years ago* xdisp.c (window_buffer_changed): New function.
Dmitry Antipov [Thu, 22 Nov 2012 06:52:30 +0000 (10:52 +0400)]
* xdisp.c (window_buffer_changed): New function.
(update_menu_bar, update_tool_bar): Use it to
simplify large 'if' statements.
(redisplay_internal): Generalize commonly used
'tail' and 'frame' local variables.

11 years agoFix MS-Windows build following 2012-11-21T21:06:52Z!eggert@cs.ucla.edu.
Eli Zaretskii [Thu, 22 Nov 2012 03:56:38 +0000 (05:56 +0200)]
Fix MS-Windows build following 2012-11-21T21:06:52Z!eggert@cs.ucla.edu.

 src/w32.c (getcwd): Fix the 2nd argument type, to prevent conflicts
 with Windows system header.

Fixes: debbugs:12945
11 years ago* doc/misc/calc.texi (Date Forms): Mention the customizable
Jay Belanger [Thu, 22 Nov 2012 01:47:04 +0000 (19:47 -0600)]
* doc/misc/calc.texi (Date Forms): Mention the customizable
Gregorian-Julian switch.
(Customizing Calc): Mention the variable `calc-gregorian-switch'.

* calc/calc.el (calc-gregorian-switch): Refresh the Calc buffer
after the variable is changed.

11 years agoTeach sql-mode's imenu about IF NOT EXISTS
Daniel Colascione [Wed, 21 Nov 2012 21:47:10 +0000 (13:47 -0800)]
Teach sql-mode's imenu about IF NOT EXISTS

11 years agoSupport IF NOT EXISTS in SQL declarations
Daniel Colascione [Wed, 21 Nov 2012 21:38:56 +0000 (13:38 -0800)]
Support IF NOT EXISTS in SQL declarations

11 years agoAssume POSIX 1003.1-1988 or later for unistd.h.
Paul Eggert [Wed, 21 Nov 2012 21:06:52 +0000 (13:06 -0800)]
Assume POSIX 1003.1-1988 or later for unistd.h.

* admin/CPP-DEFINES (BROKEN_GETWD, HAVE_GETCWD, HAVE_GETWD, HAVE_SIZE_T)
(HAVE_UNISTD_H): Remove.
* configure.ac: Do not check for getcwd or getwd.
* lib-src/emacsclient.c (getcwd): Remove decl.
(get_current_dir_name): Assume getcwd exists.
* lib-src/etags.c (HAVE_GETCWD): Remove.
(getcwd): Remove decl.
(NO_LONG_OPTIONS): Remove this.  All uses removed.
Emacs always has GNU getopt.
(etags_getcwd): Assume getcwd exists.
* lib-src/movemail.c (F_OK, X_OK, W_OK, R_OK): Remove.
* nt/config.nt (HAVE_GETCWD): Remove.
* src/alloc.c: Assume unistd.h exists.
* src/fileio.c (Fexpand_file_name) [DOS_NT]: Use getcwd, not getwd.
* src/sysdep.c (get_current_dir_name): Assume getcwd exists.
(getwd) [USG]: Remove; no longer needed.
(sys_subshell) [DOS_NT]: Use getcwd, not getwd.
* src/w32.c (getcwd): Rename from getwd, and switch to getcwd's API.
* src/w32.h (getcwd): Remove decl.

Fixes: debbugs:12945
11 years agoBump CC Mode's version number to 5.32.4.
Alan Mackenzie [Wed, 21 Nov 2012 20:47:09 +0000 (20:47 +0000)]
Bump CC Mode's version number to 5.32.4.

11 years agoFix bugs in the CC Mode state cache. Enhance a debugging mechanism.
Alan Mackenzie [Wed, 21 Nov 2012 20:41:03 +0000 (20:41 +0000)]
Fix bugs in the CC Mode state cache.  Enhance a debugging mechanism.

11 years agoFix bug #12930 with vertical-motion through a display string.
Eli Zaretskii [Wed, 21 Nov 2012 19:28:14 +0000 (21:28 +0200)]
Fix bug #12930 with vertical-motion through a display string.

 src/indent.c (Fvertical_motion): If the starting position is covered
 by a display string, return to one position before that, to avoid
 overshooting it inside move_it_to.

11 years ago* src/xdisp.c (fast_set_selected_frame): Rename from update_tool_bar_unwind.
Stefan Monnier [Wed, 21 Nov 2012 16:34:35 +0000 (11:34 -0500)]
* src/xdisp.c (fast_set_selected_frame): Rename from update_tool_bar_unwind.
Make it set selected_window as well.
(update_tool_bar): Use it.

11 years ago* doc/lispref/debugging.texi (Profiling): Make it more clear
Stefan Monnier [Wed, 21 Nov 2012 14:14:42 +0000 (09:14 -0500)]
* doc/lispref/debugging.texi (Profiling): Make it more clear
that --enable-profiling is about profiling the C code.

11 years agoAuto-commit of generated files.
Glenn Morris [Wed, 21 Nov 2012 12:17:28 +0000 (07:17 -0500)]
Auto-commit of generated files.

11 years agoAuto-commit of generated files.
Glenn Morris [Wed, 21 Nov 2012 11:17:40 +0000 (06:17 -0500)]
Auto-commit of generated files.

11 years agoAdd optional "inherit" argument for face-bold-p and related functions
Glenn Morris [Wed, 21 Nov 2012 08:39:08 +0000 (00:39 -0800)]
Add optional "inherit" argument for face-bold-p and related functions

* lisp/faces.el (face-underline-p, face-inverse-video-p, face-bold-p)
(face-italic-p): Add optional argument "inherit".

* doc/lispref/display.texi (Attribute Functions):
Add new "inherit" argument for face-bold-p etc.
Move description of this argument to a common section, like "frame".

11 years agoRemove -p suffix from set-face-* functions
Glenn Morris [Wed, 21 Nov 2012 08:27:13 +0000 (00:27 -0800)]
Remove -p suffix from set-face-* functions

* lisp/faces.el (set-face-inverse-video, set-face-bold, set-face-italic):
Remove -p suffix from names, for consistency with other set-face-*.
(set-face-inverse-video): Fix interactive spec.
* lisp/play/gamegrid.el (gamegrid-make-mono-tty-face):
* lisp/textmodes/table.el (table--update-cell-face):
Use set-face-inverse-video rather than now obsolete alias.

* doc/lispref/display.texi (Attribute Functions):
Update for set-face-* name changes.

11 years agoMerge from emacs-24; up to 2012-11-17T22:12:47Z!eggert@cs.ucla.edu
Glenn Morris [Wed, 21 Nov 2012 04:47:55 +0000 (20:47 -0800)]
Merge from emacs-24; up to 2012-11-17T22:12:47Z!eggert@cs.ucla.edu

11 years agoAdd a bit more about profiling to the lispref
Glenn Morris [Wed, 21 Nov 2012 01:52:03 +0000 (20:52 -0500)]
Add a bit more about profiling to the lispref

* doc/lispref/debugging.texi (Profiling):
Add some basic information about the profile report buffer.
(Debugging): Mention profiling in the introduction.

11 years ago* doc/lispref/debugging.texi (Profiling) [!tex]: Mention --enable-profiling.
Glenn Morris [Wed, 21 Nov 2012 01:32:09 +0000 (20:32 -0500)]
* doc/lispref/debugging.texi (Profiling) [!tex]: Mention --enable-profiling.

11 years ago* configure.ac (--enable-profiling): Doc fix.
Glenn Morris [Wed, 21 Nov 2012 01:22:09 +0000 (20:22 -0500)]
* configure.ac (--enable-profiling): Doc fix.

11 years agoConflate Qnil and Qunbound for `symbol-function'.
Stefan Monnier [Tue, 20 Nov 2012 20:06:17 +0000 (15:06 -0500)]
Conflate Qnil and Qunbound for `symbol-function'.
* src/alloc.c (Fmake_symbol): Initialize `function' to Qnil.
* src/lread.c (init_obarray): Set `function' fields to Qnil.
* src/eval.c (Fcommandp): Ignore Qunbound.
(Fautoload, eval_sub, Fapply, Ffuncall, Fmacroexpand):
* src/data.c (Ffset, Ffboundp, indirect_function, Findirect_function):
Test NILP rather than Qunbound.
(Ffmakunbound): Set to Qnil.
(Fsymbol_function): Never signal an error.
(Finteractive_form): Ignore Qunbound.

11 years ago* lisp/uniquify.el (uniquify-managed): Use defvar-local.
Stefan Monnier [Tue, 20 Nov 2012 19:32:20 +0000 (14:32 -0500)]
* lisp/uniquify.el (uniquify-managed): Use defvar-local.
(rename-buffer, create-file-buffer): Advise with advice-add.
(uniquify-unload-function): Unadvise accordingly.

11 years ago* lisp/emacs-lisp/trace.el: Rewrite, use nadvice and lexical-binding.
Stefan Monnier [Tue, 20 Nov 2012 19:30:37 +0000 (14:30 -0500)]
* lisp/emacs-lisp/trace.el: Rewrite, use nadvice and lexical-binding.
(trace-buffer): Don't purecopy.
(trace-entry-message, trace-exit-message): Add `context' arg.
(trace--timer): New var.
(trace-make-advice): Adjust for use in nadvice.
Add `context' argument.  Delay `display-buffer' via a timer.
(trace-function-internal): Use advice-add.
(trace--read-args): New function.
(trace-function-foreground, trace-function-background): Use it.
(trace-function): Rename to trace-function-foreground and redefine as
an alias to that new name.
(untrace-function, untrace-all): Adjust to the use of nadvice.

11 years agoBackport: Rename cygwin_convert_path* to cygwin_convert_file_name*
Daniel Colascione [Tue, 20 Nov 2012 19:28:53 +0000 (11:28 -0800)]
Backport: Rename cygwin_convert_path* to cygwin_convert_file_name*

11 years ago* lisp/emacs-lisp/bytecomp.el (byte-compile): Fix handling of closures.
Stefan Monnier [Tue, 20 Nov 2012 19:05:20 +0000 (14:05 -0500)]
* lisp/emacs-lisp/bytecomp.el (byte-compile): Fix handling of closures.

11 years ago* lisp/emacs-lisp/byte-run.el (defun-declarations-alist): Fix last change.
Stefan Monnier [Tue, 20 Nov 2012 17:54:00 +0000 (12:54 -0500)]
* lisp/emacs-lisp/byte-run.el (defun-declarations-alist): Fix last change.

11 years agoFix bug #12927 with scrolling under hl-line-mode and scroll-conservatively.
Eli Zaretskii [Tue, 20 Nov 2012 17:44:04 +0000 (19:44 +0200)]
Fix bug #12927 with scrolling under hl-line-mode and scroll-conservatively.

 lisp/simple.el (line-move): Don't call line-move-partial if
 scroll-conservatively is in effect.

11 years agoFix !ifdef in nmake.defs.
Eli Zaretskii [Tue, 20 Nov 2012 17:13:10 +0000 (19:13 +0200)]
Fix !ifdef in nmake.defs.

 nt/nmake.defs: Use !if, not !ifdef.  See
 http://lists.gnu.org/archive/html/help-emacs-windows/2012-11/msg00027.html
 for the details.

11 years agoYet more fixes for bug #12878 with MSVC build.
Eli Zaretskii [Tue, 20 Nov 2012 17:07:55 +0000 (19:07 +0200)]
Yet more fixes for bug #12878 with MSVC build.

 nt/inc/stdint.h (INTPTR_MIN): Define for MSVC.

11 years agoFix non-GTK builds on Cygwin
Ken Brown [Tue, 20 Nov 2012 13:26:40 +0000 (08:26 -0500)]
Fix non-GTK builds on Cygwin

* src/emacs.c (main): Set the G_SLICE environment variable for all
  Cygwin builds, not just GTK builds.  See
  https://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00368.html.

11 years agoTiny adjustment around the previous redisplay change.
Dmitry Antipov [Tue, 20 Nov 2012 11:41:57 +0000 (15:41 +0400)]
Tiny adjustment around the previous redisplay change.
* xdisp.c (window_outdated): New function.
(text_outside_line_unchanged_p, redisplay_window): Use it.
(redisplay_internal): Likewise.  Fix indentation.

11 years agoAuto-commit of generated files.
Glenn Morris [Tue, 20 Nov 2012 11:17:33 +0000 (06:17 -0500)]
Auto-commit of generated files.

11 years ago* trampver.el:
Michael Albinus [Tue, 20 Nov 2012 09:29:47 +0000 (10:29 +0100)]
* trampver.el:
* trampver.texi: Downgrade version to 2.2.6-24.3, in order to
distinguish from trunk.

Don't merge with trunk, please.

11 years agoFix typos in previous
Glenn Morris [Tue, 20 Nov 2012 08:47:57 +0000 (00:47 -0800)]
Fix typos in previous

11 years agoNEWS fix
Glenn Morris [Tue, 20 Nov 2012 08:39:41 +0000 (00:39 -0800)]
NEWS fix
Ref: http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00377.html

11 years ago* eval.c (interactive_p): Remove no-longer-used decl.
Paul Eggert [Tue, 20 Nov 2012 08:32:19 +0000 (00:32 -0800)]
* eval.c (interactive_p): Remove no-longer-used decl.

11 years ago* emacsclient.c (handle_sigcont, handle_sigtstp): Use raise (sig)
Paul Eggert [Tue, 20 Nov 2012 08:31:19 +0000 (00:31 -0800)]
* emacsclient.c (handle_sigcont, handle_sigtstp): Use raise (sig)

rather than kill (getpid (), sig), as it's simpler and safer.

11 years agoOmit -Wstrict-overflow as it does not play well with --enable-checking.
Paul Eggert [Tue, 20 Nov 2012 08:29:04 +0000 (00:29 -0800)]
Omit -Wstrict-overflow as it does not play well with --enable-checking.

11 years agoMake a start on a Profiling section in the lispref
Glenn Morris [Tue, 20 Nov 2012 08:02:54 +0000 (00:02 -0800)]
Make a start on a Profiling section in the lispref

* doc/lispref/debugging.texi (Profiling): New section, in progress.
* doc/lispref/tips.texi (Compilation Tips): Move profiling to separate section.
* doc/lispref/elisp.texi: Add Profiling to detailed menu.

11 years ago* xdisp.c (buffer_shared): Adjust comment.
Dmitry Antipov [Tue, 20 Nov 2012 07:53:04 +0000 (11:53 +0400)]
* xdisp.c (buffer_shared): Adjust comment.
(buffer_shared_and_changed): New function.
(prepare_menu_bars, redisplay_internal): Use it to
decide whether all windows or frames should be updated.

11 years agoMake called-interactively-p work for edebug or advised code.
Stefan Monnier [Tue, 20 Nov 2012 04:24:09 +0000 (23:24 -0500)]
Make called-interactively-p work for edebug or advised code.
* lisp/subr.el (called-interactively-p-functions): New var.
(internal--called-interactively-p--get-frame): New macro.
(called-interactively-p, interactive-p): Rewrite in Lisp.
* lisp/emacs-lisp/nadvice.el (advice--called-interactively-skip): New fun.
(called-interactively-p-functions): Use it.
* lisp/emacs-lisp/edebug.el (edebug--called-interactively-skip): New fun.
(called-interactively-p-functions): Use it.
* lisp/allout.el (allout-called-interactively-p): Don't assume
called-interactively-p is a subr.
* src/eval.c (Finteractive_p, Fcalled_interactively_p, interactive_p): Remove.
(syms_of_eval): Remove corresponding defsubr.
* src/bytecode.c (exec_byte_code): `interactive-p' is now a Lisp function.
* test/automated/advice-tests.el (advice-tests--data): Remove.
(advice-tests): Move the tests directly here instead.
Add called-interactively-p tests.

11 years agoAdd a menu for profiler report mode
Glenn Morris [Tue, 20 Nov 2012 00:57:23 +0000 (19:57 -0500)]
Add a menu for profiler report mode

* lisp/profiler.el (profiler-report-mode-map): Add a menu.
No need to bind `q' because we derive from special-mode.
(profiler-report-find-entry): Handle calls from the menu-bar.

11 years agoImprove static checking of integer overflow and stack smashing.
Paul Eggert [Mon, 19 Nov 2012 23:39:28 +0000 (15:39 -0800)]
Improve static checking of integer overflow and stack smashing.

* configure.ac (WARN_CFLAGS): Add -Wstack-protector and
-Wstrict-overflow if using GCC 4.7.2 or later on a platform with
at least 64-bit long int.  This improves static checking on these
platforms, when configured with --enable-gcc-warnings.

11 years ago* lisp/emacs-lisp/byte-run.el (defun-declarations-alist):
Stefan Monnier [Mon, 19 Nov 2012 21:30:55 +0000 (16:30 -0500)]
* lisp/emacs-lisp/byte-run.el (defun-declarations-alist):
Allow compiler-macros to be lambda expressions.
* lisp/progmodes/python.el: Use cl-lib.  Move var declarations outside of
eval-when-compile.
(python-syntax-context): Add compiler-macro.
(python-font-lock-keywords): Simplify with De Morgan.

11 years ago* lisp/emacs-lisp/byte-run.el (defun-declarations-alist): Don't accept
Stefan Monnier [Mon, 19 Nov 2012 20:57:36 +0000 (15:57 -0500)]
* lisp/emacs-lisp/byte-run.el (defun-declarations-alist): Don't accept
non-symbols for compiler macros (yet).

11 years ago* lisp/eshell/em-cmpl.el (eshell-pcomplete): Refine fix for bug#12838:
Stefan Monnier [Mon, 19 Nov 2012 19:22:07 +0000 (14:22 -0500)]
* 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.

11 years ago* lisp/vc/diff-mode.el (diff-hunk): Don't make useless timers.
Stefan Monnier [Mon, 19 Nov 2012 18:40:18 +0000 (13:40 -0500)]
* lisp/vc/diff-mode.el (diff-hunk): Don't make useless timers.

11 years ago* lisp/files.el (load-file): Require match in minibuffer selection, as was
Stefan Monnier [Mon, 19 Nov 2012 18:27:25 +0000 (13:27 -0500)]
* 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
11 years agoMore fixes for bug #12878 with MS-Windows MSVC build.
Eli Zaretskii [Mon, 19 Nov 2012 17:34:21 +0000 (19:34 +0200)]
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.

11 years agoUse cl-lib instead of cl, and interactive-p => called-interactively-p.
Stefan Monnier [Mon, 19 Nov 2012 17:24:12 +0000 (12:24 -0500)]
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.

11 years ago* lisp/emacs-lisp/ert.el (ert--expand-should-1): Adapt to cl-lib.
Stefan Monnier [Mon, 19 Nov 2012 17:02:20 +0000 (12:02 -0500)]
* lisp/emacs-lisp/ert.el (ert--expand-should-1): Adapt to cl-lib.

11 years ago* lisp/calendar/time-date.el (time-to-seconds): De-obsolete.
Stefan Monnier [Mon, 19 Nov 2012 16:17:49 +0000 (11:17 -0500)]
* lisp/calendar/time-date.el (time-to-seconds): De-obsolete.

11 years ago* lisp/cedet/semantic/fw.el (semantic-make-local-hook)
Stefan Monnier [Mon, 19 Nov 2012 16:16:07 +0000 (11:16 -0500)]
* lisp/cedet/semantic/fw.el (semantic-make-local-hook)
(semantic-mode-line-update): Simplify via CSE.

11 years ago* net/tramp-sh.el (tramp-do-copy-or-rename-file): If both files
Michael Albinus [Mon, 19 Nov 2012 15:25:10 +0000 (16:25 +0100)]
* net/tramp-sh.el (tramp-do-copy-or-rename-file): If both files
are remote, check out-of-band property for both.

11 years agomessage.el (message-get-reply-headers): Fix typo in comment
Katsumi Yamaoka [Mon, 19 Nov 2012 11:36:02 +0000 (11:36 +0000)]
message.el (message-get-reply-headers): Fix typo in comment

11 years agomessage.el (message-get-reply-headers): Make sure the reply goes to the author if...
Katsumi Yamaoka [Mon, 19 Nov 2012 06:24:14 +0000 (06:24 +0000)]
message.el (message-get-reply-headers): Make sure the reply goes to the author if it is a wide reply

11 years ago* calc/calc-forms.el (math-leap-year-p): Fix formula for negative
Jay Belanger [Mon, 19 Nov 2012 05:03:08 +0000 (23:03 -0600)]
* 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.

11 years ago* lisp/window.el (switch-to-buffer): Re-add the warning that was lost in the
Stefan Monnier [Mon, 19 Nov 2012 03:16:03 +0000 (22:16 -0500)]
* lisp/window.el (switch-to-buffer): Re-add the warning that was lost in the
code rewrite.