bpt/emacs.git
11 years agoMinor call-process cleanups.
Paul Eggert [Wed, 5 Dec 2012 18:29:52 +0000 (10:29 -0800)]
Minor call-process cleanups.

* callproc.c (Fcall_process): Do record-unwind-protect on MSDOS
at the same time as other platforms, to simplify analysis.
No need for fd0_volatile since we have synch_process_fd.
Avoid needless emacs_close; arg is always negative.

11 years ago* lisp/gnus/gnus.el (gnus-delete-gnus-frame): Extract from `gnus-other-frame'.
Sam Steingold [Wed, 5 Dec 2012 18:13:38 +0000 (13:13 -0500)]
* lisp/gnus/gnus.el (gnus-delete-gnus-frame): Extract from `gnus-other-frame'.
(gnus-other-frame): Add `gnus-delete-gnus-frame' to
`gnus-suspend-gnus-hook' in addition to `gnus-exit-gnus-hook'.

11 years ago* lisp/net/rcirc.el (rcirc-urls): Update documentation.
Deniz Dogan [Wed, 5 Dec 2012 16:45:37 +0000 (17:45 +0100)]
* lisp/net/rcirc.el (rcirc-urls): Update documentation.
(rcirc-condition-filter): New function.
(rcirc-browse-url, rcirc-markup-urls): Use only URLs before point
and exclude consecutive duplicate URLs.

Fixes: debbugs:6082

11 years ago* tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Check error
Michael Albinus [Wed, 5 Dec 2012 15:50:32 +0000 (16:50 +0100)]
* tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Check error
code also on MS-Windows machines.

11 years ago* net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
Michael Albinus [Wed, 5 Dec 2012 14:06:06 +0000 (15:06 +0100)]
* net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
Check return code of copy command.

11 years agolisp/gnus/ChangeLog: Fix typo
Katsumi Yamaoka [Wed, 5 Dec 2012 10:29:31 +0000 (10:29 +0000)]
lisp/gnus/ChangeLog: Fix typo

11 years agogmm-utils.el (gmm-called-interactively-p): Revert. This seems to causes Emacs to...
Katsumi Yamaoka [Wed, 5 Dec 2012 10:27:16 +0000 (10:27 +0000)]
gmm-utils.el (gmm-called-interactively-p): Revert.  This seems to causes Emacs to get stuck!

11 years ago* net/tramp-adb.el (tramp-adb-sdk-dir, tramp-adb-prompt): Use
Michael Albinus [Wed, 5 Dec 2012 10:09:54 +0000 (11:09 +0100)]
* net/tramp-adb.el (tramp-adb-sdk-dir, tramp-adb-prompt): Use
group `tramp'.  Add version.

11 years agogmm-utils.el (gmm-called-interactively-p): New function.
Katsumi Yamaoka [Wed, 5 Dec 2012 09:24:27 +0000 (09:24 +0000)]
gmm-utils.el (gmm-called-interactively-p): New function.
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.

11 years agoImprove url matching in ffap.el.
Chong Yidong [Wed, 5 Dec 2012 07:29:02 +0000 (15:29 +0800)]
Improve url matching in ffap.el.

* ffap.el (ffap-url-regexp): Don't require matching at front of string.
(ffap-url-p): If only a substring matches, return that.
(ffap-url-at-point): Use the return value of ffap-url-p.
(ffap-read-file-or-url, ffap-read-file-or-url-internal)
(find-file-at-point, dired-at-point, dired-at-point-prompter)
(ffap-guess-file-name-at-point): Likewise.
(ffap-replace-file-component): Fix typo.

Fixes: debbugs:4952

11 years agoImprove completion behavior of info-display-manual.
Chong Yidong [Wed, 5 Dec 2012 06:14:11 +0000 (14:14 +0800)]
Improve completion behavior of info-display-manual.

* lisp/info.el (info-display-manual): Add existing Info buffers, whose
files may not be in Info-directory-list, to the completion.
(info--manual-names): New helper function.

11 years agogmm-util.el: Re-introduce gmm-flet using cl-letf
Katsumi Yamaoka [Wed, 5 Dec 2012 02:26:15 +0000 (02:26 +0000)]
gmm-util.el: Re-introduce gmm-flet using cl-letf

11 years agoAdd conflict detection/resolution to vc-hg (bug#10709)
Glenn Morris [Wed, 5 Dec 2012 01:49:31 +0000 (20:49 -0500)]
Add conflict detection/resolution to vc-hg (bug#10709)

* lisp/vc/vc-hg.el (vc-hg-resolve-when-done, vc-hg-find-file-hook):
New functions, for detecting and resolving conflicts.

11 years agogmm-utils.el (gmm-labels): Doc fix
Katsumi Yamaoka [Wed, 5 Dec 2012 00:18:23 +0000 (00:18 +0000)]
gmm-utils.el (gmm-labels): Doc fix

11 years agogmm-utils.el (gmm-flet): Remove.
Katsumi Yamaoka [Wed, 5 Dec 2012 00:13:56 +0000 (00:13 +0000)]
gmm-utils.el (gmm-flet): Remove.
gnus-sync.el (gnus-sync-lesync-call)
message.el (message-read-from-minibuffer): Don't use it.

11 years agogmm-utils.el (gmm-labels): Dox fix
Katsumi Yamaoka [Tue, 4 Dec 2012 23:33:24 +0000 (23:33 +0000)]
gmm-utils.el (gmm-labels): Dox fix

11 years agogmm-utils.el (gmm-labels): Use cl-labels if available
Katsumi Yamaoka [Tue, 4 Dec 2012 23:24:24 +0000 (23:24 +0000)]
gmm-utils.el (gmm-labels): Use cl-labels if available

11 years ago* callproc.c (Fcall_process): Fix specpdl nesting for asynchronous
Andreas Schwab [Tue, 4 Dec 2012 21:18:37 +0000 (22:18 +0100)]
* callproc.c (Fcall_process): Fix specpdl nesting for asynchronous
processes.

11 years ago* leim/quail/latin-ltx.el: Avoid deprecated chars for \langle and \rangle.
Stefan Monnier [Tue, 4 Dec 2012 21:17:30 +0000 (16:17 -0500)]
* leim/quail/latin-ltx.el: Avoid deprecated chars for \langle and \rangle.
Remove \rightparengtr and \leftparengtr for lack of consensus.
Suggested by Mattias Engdegård <mattiase@bredband.net>.

Fixes: debbugs:12948

11 years ago* lisp/hi-lock.el (hi-lock-auto-select-face): New user variable.
Jambunathan K [Tue, 4 Dec 2012 21:13:47 +0000 (16:13 -0500)]
* lisp/hi-lock.el (hi-lock-auto-select-face): New user variable.
(hi-lock-auto-select-face-defaults): New buffer local variable.
(hi-lock-read-face-name): Honor `hi-lock-auto-select-face'.
(hi-lock-unface-buffer): Prompt user with useful defaults.
With prefix arg, unhighlight all hi-lock patterns in buffer.

Fixes: debbugs:11095

11 years agoInclude <config.h> uniformly in oldXMenu sources.
Paul Eggert [Tue, 4 Dec 2012 20:42:29 +0000 (12:42 -0800)]
Include <config.h> uniformly in oldXMenu sources.

* Activate.c, AddPane.c, AddSel.c, ChgPane.c, ChgSel.c, Create.c:
* InsPane.c, InsSel.c, Internal.c, XMakeAssoc.c:
Do not include <config.h>, since XMenuInt.h does that now.
* XLookAssoc.c, XMenuInt.h: Include <config.h>.
This avoids a build failure when configuring on Fedora 17
--with-x-toolkit=no, reported by Dmitry Andropov in
<http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00078.html>.

11 years ago* NEWS: Mention new Tramp method "adb".
Michael Albinus [Tue, 4 Dec 2012 17:07:09 +0000 (18:07 +0100)]
* NEWS: Mention new Tramp method "adb".

11 years ago* lisp/obsolete/terminal.el, lisp/obsolete/longlines.el: Add obsolecence info.
Stefan Monnier [Tue, 4 Dec 2012 17:04:01 +0000 (12:04 -0500)]
* lisp/obsolete/terminal.el, lisp/obsolete/longlines.el: Add obsolecence info.

11 years ago* tramp.texi (History): Mention ADB.
Michael Albinus [Tue, 4 Dec 2012 16:59:24 +0000 (17:59 +0100)]
* tramp.texi (History): Mention ADB.
(Inline methods): Add `adb' method.

11 years ago* Makefile.in (TRAMP_SRC):
Michael Albinus [Tue, 4 Dec 2012 16:56:04 +0000 (17:56 +0100)]
* Makefile.in (TRAMP_SRC):
* makefile.w32-in (TRAMP_SRC): Add tramp-adb.el.

11 years ago* net/tramp-adb.el: New package.
Juergen Hoetzel [Tue, 4 Dec 2012 16:53:01 +0000 (17:53 +0100)]
* net/tramp-adb.el: New package.

11 years ago* lisp.h (Mouse_HLInfo): Remove set-but-unused mouse_face_image_state
Dmitry Antipov [Tue, 4 Dec 2012 15:15:30 +0000 (19:15 +0400)]
* lisp.h (Mouse_HLInfo): Remove set-but-unused mouse_face_image_state
member.  Adjust users.  Convert mouse_face_past_end, mouse_face_defer
and mouse_face_hidden members to a bitfields.
* frame.h (struct frame): Remove set-but-not-used space_width member.
(FRAME_SPACE_WIDTH): Remove.
* nsterm.m, w32term.c, xterm.c: Adjust users.
* termchar.h (struct tty_display_info): Remove set-but-unused se_is_so
member.  Adjust users.  Convert term_initted, delete_in_insert_mode,
costs_set, insert_mode, standout_mode, cursor_hidden and flow_control
members to a bitfields.

11 years agogmm-utils.el (gmm-flet, gmm-labels): New macros.
Katsumi Yamaoka [Tue, 4 Dec 2012 08:22:12 +0000 (08:22 +0000)]
gmm-utils.el (gmm-flet, gmm-labels): New macros.
gnus-sync.el (gnus-sync-lesync-call)
message.el (message-read-from-minibuffer): Use gmm-flet.
gnus-score.el (gnus-score-decode-text-parts): Use gmm-labels.
gnus-util.el (gnus-macroexpand-all): Remove.

11 years agoObsolete terminal.el.
Chong Yidong [Tue, 4 Dec 2012 03:04:31 +0000 (11:04 +0800)]
Obsolete terminal.el.

* terminal.el: Move to obsolete/.

11 years agoObsolete longlines.el.
Chong Yidong [Tue, 4 Dec 2012 02:47:43 +0000 (10:47 +0800)]
Obsolete longlines.el.

* longlines.el: Move to obsolete/.

* lisp/org/org-bibtex.el (org-bibtex-ask): Use visual-line-mode instead of
longlines-mode.

* lisp/vc/ediff-diff.el (ediff-extract-diffs, ediff-extract-diffs3):
Remove code referring to longlines mode.

11 years ago* lisp/sort.el (delete-duplicate-lines): New command.
Juri Linkov [Mon, 3 Dec 2012 23:49:08 +0000 (01:49 +0200)]
* lisp/sort.el (delete-duplicate-lines): New command.

Fixes: debbugs:13032

11 years agognus-sync.el (gnus-sync-newsrc-offsets): Add :version
Katsumi Yamaoka [Mon, 3 Dec 2012 22:08:37 +0000 (22:08 +0000)]
gnus-sync.el (gnus-sync-newsrc-offsets): Add :version

11 years agoDon't let call-process be a zombie factory.
Paul Eggert [Mon, 3 Dec 2012 21:42:12 +0000 (13:42 -0800)]
Don't let call-process be a zombie factory.

Fixing this bug required some cleanup of the signal-handling code.
As a side effect, this change also fixes a longstanding rare race
condition whereby Emacs could mistakenly kill unrelated processes,
and it fixes a bug where a second C-g does not kill a recalcitrant
synchronous process in GNU/Linux and similar platforms.
The patch should also fix the last vestiges of Bug#9488,
a bug which has mostly been fixed on the trunk by other changes.
* callproc.c, process.h (synch_process_alive, synch_process_death)
(synch_process_termsig, sync_process_retcode):
Remove.  All uses removed, to simplify analysis and so that
less consing is done inside critical sections.
* callproc.c (call_process_exited): Remove.  All uses replaced
with !synch_process_pid.
* callproc.c (synch_process_pid, synch_process_fd): New static vars.
These take the role of what used to be in unwind-protect arg.
All uses changed.
(block_child_signal, unblock_child_signal):
New functions, to avoid races that could kill innocent-victim processes.
(call_process_kill, call_process_cleanup, Fcall_process): Use them.
(call_process_kill): Record killed processes as deleted, so that
zombies do not clutter up the system.  Do this inside a critical
section, to avoid a race that would allow the clutter.
(call_process_cleanup): Fix code so that the second C-g works again
on common platforms such as GNU/Linux.
(Fcall_process): Create the child process in a critical section,
to fix a race condition.  If creating an asynchronous process,
record it as deleted so that zombies do not clutter up the system.
Do unwind-protect for WINDOWSNT too, as that's simpler in the
light of these changes.  Omit unnecessary call to emacs_close
before failure, as the unwind-protect code does that.
* callproc.c (call_process_cleanup):
* w32proc.c (waitpid): Simplify now that synch_process_alive is gone.
* process.c (record_deleted_pid): New function, containing
code refactored out of Fdelete_process.
(Fdelete_process): Use it.
(process_status_retrieved): Remove.  All callers changed to use
child_status_change.
(record_child_status_change): Remove, folding its contents into ...
(handle_child_signal): ... this signal handler.  Now, this
function is purely a handler for SIGCHLD, and is not called after
a synchronous waitpid returns; the synchronous code is moved to
wait_for_termination.  There is no need to worry about reaping
more than one child now.
* sysdep.c (get_child_status, child_status_changed): New functions.
(wait_for_termination): Now takes int * status and bool
interruptible arguments, too.  Do not record child status change;
that's now the caller's responsibility.  All callers changed.
Reimplement in terms of get_child_status.
(wait_for_termination_1, interruptible_wait_for_termination):
Remove.  All callers changed to use wait_for_termination.
* syswait.h: Include <stdbool.h>, for bool.
(record_child_status_change, interruptible_wait_for_termination):
Remove decls.
(record_deleted_pid, child_status_changed): New decls.
(wait_for_termination): Adjust to API changes noted above.

Fixes: debbugs:12980

11 years ago* bytecode.c, lisp.h (Qbytecode): Remove.
Paul Eggert [Mon, 3 Dec 2012 21:07:47 +0000 (13:07 -0800)]
* bytecode.c, lisp.h (Qbytecode): Remove.

No longer needed after 2012-11-20 interactive-p changes.

11 years agoFix bug #13055 with cursor positioning inside scroll-margin.
Eli Zaretskii [Mon, 3 Dec 2012 20:48:12 +0000 (22:48 +0200)]
Fix bug #13055 with cursor positioning inside scroll-margin.

 src/xdisp.c (redisplay_window): If the cursor is visible, but inside
 the scroll margin, move point outside the margin.

11 years ago* gtkutil.c (my_log_handler): New function.
Jan Djärv [Mon, 3 Dec 2012 19:16:17 +0000 (20:16 +0100)]
* gtkutil.c (my_log_handler): New function.
(xg_set_geometry): Set log handler to my_log_handler.

Fixes: debbugs:11177

11 years agoFix my last Changelog entry.
Agustín Martín [Mon, 3 Dec 2012 17:23:42 +0000 (18:23 +0100)]
Fix my last Changelog entry.

11 years agoispell.el: Use expanded values of personal dictionary for process restart checks.
Agustín Martín [Mon, 3 Dec 2012 17:15:32 +0000 (18:15 +0100)]
ispell.el: Use expanded values of personal dictionary for process restart checks.

(ispell-internal-change-dictionary):
 Improve ispell process restart checks by using expanded values for ispell
  personal dictionary and for related restart check.

(ispell-start-process):
 * Remove apparently redundant code that seems better handled from
  (ispell-internal-change-dictionary)
 * No longer need to expand ispell personal dictionary, it is already
   expanded.

Fixes: debbugs:13019

11 years agoispell.el: Fix ispell personal dictionary name expansion.
Agustín Martín [Mon, 3 Dec 2012 16:08:23 +0000 (17:08 +0100)]
ispell.el: Fix ispell personal dictionary name expansion.

textmodes/ispell.el (ispell-init-process, ispell-start-process):
Make sure ispell personal dictionary name is expanded after initial
`default-directory' value (Bug#13019).

11 years ago* lisp.h (modify_region): Rename to...
Dmitry Antipov [Mon, 3 Dec 2012 14:13:06 +0000 (18:13 +0400)]
* lisp.h (modify_region): Rename to...
(modify_region_1): ...new prototype.
* textprop.c (modify_region): Now static.  Adjust users.
* insdel.c (modify_region): Rename to...
(modify_region_1): ...new function to work with current buffer.
Adjust comment and users.  Use true and false for boolean arg.

11 years ago* alloc.c (free_save_value): New function.
Dmitry Antipov [Mon, 3 Dec 2012 08:06:02 +0000 (12:06 +0400)]
* alloc.c (free_save_value): New function.
(safe_alloca_unwind): Use it.
* lisp.h (free_save_value): New prototype.
* editfns.c (save_excursion_save): Use Lisp_Misc_Save_Value.
Add comment.
(save_excursion_restore): Adjust to match saved data structure.
Use free_save_value to offload some work from GC.  Drop obsolete
#if 0 code.

11 years ago* lisp/url/url-misc.el (url-do-terminal-emulator): Use make-term
Chong Yidong [Mon, 3 Dec 2012 06:23:06 +0000 (14:23 +0800)]
* lisp/url/url-misc.el (url-do-terminal-emulator): Use make-term
instead of terminal-emulator.

11 years ago* lisp/calc/calc-forms.el (math-date-to-iso-dt): Fix weekday number.
Jay Belanger [Mon, 3 Dec 2012 04:46:49 +0000 (22:46 -0600)]
* lisp/calc/calc-forms.el (math-date-to-iso-dt): Fix weekday number.

11 years agoMerge from emacs-24; up to 2012-11-23T06:23:28Z!cyd@gnu.org
Glenn Morris [Mon, 3 Dec 2012 01:08:31 +0000 (17:08 -0800)]
Merge from emacs-24; up to 2012-11-23T06:23:28Z!cyd@gnu.org

11 years ago* lisp/calc/calc-forms.el (math-date-to-iso-dt): Fix typo.
Jay Belanger [Mon, 3 Dec 2012 01:05:08 +0000 (19:05 -0600)]
* lisp/calc/calc-forms.el (math-date-to-iso-dt): Fix typo.

11 years ago* lisp/calc/calc-forms.el (math-absolute-from-iso-dt)
Jay Belanger [Mon, 3 Dec 2012 00:54:11 +0000 (18:54 -0600)]
* lisp/calc/calc-forms.el (math-absolute-from-iso-dt)
(math-date-to-iso-dt, math-parse-iso-date-validate)
(math-iso-dt-to-date): New functions.
(math-fd-iso-dt, math-fd-isoyear, math-fd-isoweek)
(math-fd-isoweekday): New variables.
(calc-date-notation, math-parse-standard-date, math-format-date)
(math-format-date-part): Add support for more formatting codes.

11 years agoFix xpalloc confusion after memory is exhausted.
Paul Eggert [Sun, 2 Dec 2012 23:11:42 +0000 (15:11 -0800)]
Fix xpalloc confusion after memory is exhausted.

* alloc.c (xpalloc): Comment fix.
* charset.c (Fdefine_charset_internal): If xpalloc exhausts memory
and signals an error, do not clear charset_table_size, as
charset_table is still valid.
* doprnt.c (evxprintf): Clear *BUF after freeing it.

11 years ago* lisp/vc/vc.el (vc-delete-file, vc-rename-file): Default to the
Dmitry Gutov [Sun, 2 Dec 2012 21:12:31 +0000 (01:12 +0400)]
* lisp/vc/vc.el (vc-delete-file, vc-rename-file): Default to the
current buffer's file name when called interactively.

Fixes: debbugs:12488

11 years agoUse execve to avoid need to munge environ.
Paul Eggert [Sun, 2 Dec 2012 19:16:45 +0000 (11:16 -0800)]
Use execve to avoid need to munge environ.

* callproc.c (Fcall_process):
* process.c (create_process):
Don't save and restore environ; no longer needed.
* callproc.c (child_setup):
Use execve, not execvp, to preserve environ.

Fixes: debbugs:13054

11 years ago* tramp.texi (Top, Obtaining Tramp): Replace CVS by Git.
Michael Albinus [Sun, 2 Dec 2012 15:33:17 +0000 (16:33 +0100)]
* tramp.texi (Top, Obtaining Tramp): Replace CVS by Git.
(External methods): Fix typo.

11 years ago* gnus-sum.el (gnus-summary-mode-map): Bind gnus-summary-widget-forward
Andreas Schwab [Sun, 2 Dec 2012 11:45:36 +0000 (12:45 +0100)]
* gnus-sum.el (gnus-summary-mode-map): Bind gnus-summary-widget-forward
to TAB, not [tab].
(gnus-summary-article-map): Likewise.

11 years ago* gnus-sync.el (gnus-sync-newsrc-offsets): Restore definition.
Andreas Schwab [Sun, 2 Dec 2012 10:55:08 +0000 (11:55 +0100)]
* gnus-sync.el (gnus-sync-newsrc-offsets): Restore definition.
(gnus-sync-save): Use correct format for gnus-sync-newsrc-loader.

11 years agoLisp manual improvements for plists and symbol plists.
Chong Yidong [Sun, 2 Dec 2012 09:14:16 +0000 (17:14 +0800)]
Lisp manual improvements for plists and symbol plists.

* doc/lispref/commands.texi (Using Interactive): Fix index entry.

* doc/lispref/customize.texi (Variable Definitions):
* doc/lispref/display.texi (Defining Faces):
* doc/lispref/sequences.texi (Char-Tables): Fix xref.

* doc/lispref/lists.texi (Property Lists): Move here from symbols.texi.
(Plist Access): Rename from Other Plists.

* doc/lispref/symbols.texi (Symbol Properties): New node.
(Symbol Plists): Make it a subsection under Symbol Properties.
(Standard Properties): New node.

11 years agoDocument the conversion of kbd into a function.
Chong Yidong [Sun, 2 Dec 2012 07:13:44 +0000 (15:13 +0800)]
Document the conversion of kbd into a function.

* doc/emacs/custom.texi (Init Rebinding): kbd is now a function.

* doc/lispref/keymaps.texi (Key Sequences): kbd is now a function.

Fixes: debbugs:13052

11 years ago* info.el (info-display-manual): Add completion.
Juri Linkov [Sun, 2 Dec 2012 06:41:22 +0000 (14:41 +0800)]
* info.el (info-display-manual): Add completion.

Fixes: debbugs:10771

11 years ago* info.el (info-display-manual): Don't clobber an existing Info buffer.
Juri Linkov [Sun, 2 Dec 2012 06:22:32 +0000 (14:22 +0800)]
* info.el (info-display-manual): Don't clobber an existing Info buffer.

Fixes: debbugs:10770

11 years agoFix for bad test in ruby-mode-tests.el.
Chong Yidong [Sun, 2 Dec 2012 06:06:32 +0000 (14:06 +0800)]
Fix for bad test in ruby-mode-tests.el.

* automated/ruby-mode-tests.el (ruby-add-log-current-method-examples):
Don't use loop macro, to allow automated testing to work.

11 years ago* lib-src/etags.c (Lisp_functions): Skip (defvar foo) declarations
Kevin Ryde [Sun, 2 Dec 2012 01:47:56 +0000 (09:47 +0800)]
* lib-src/etags.c (Lisp_functions): Skip (defvar foo) declarations
unless the --declarations flag is enabled.
(Lisp_help): Update.
(skip_name): New function.

* doc/emacs/maintaining.texi (Tag Syntax): Mention (defvar foo) handling.

* doc/man/etags.1: Mention effect of --declarations in Lisp.

Fixes: debbugs:5600

11 years ago* xterm.c (x_draw_image_relief): Remove unused locals.
Paul Eggert [Sat, 1 Dec 2012 23:06:14 +0000 (17:06 -0600)]
* xterm.c (x_draw_image_relief): Remove unused locals.

Fixes: debbugs:10500

11 years agont/config.nt: Sync with autogen/config.in.
Juanma Barranquero [Sat, 1 Dec 2012 20:09:30 +0000 (21:09 +0100)]
nt/config.nt: Sync with autogen/config.in.

11 years ago* lisp/files.el (dir-locals-read-from-file): Check file non-empty
Leo Liu [Sat, 1 Dec 2012 15:45:38 +0000 (23:45 +0800)]
* lisp/files.el (dir-locals-read-from-file): Check file non-empty
before reading.

Fixes: debbugs:13038

11 years agoFix use of buffer-file-truename in vc-find-file-hook (tiny change).
Yuya Nishihara [Sat, 1 Dec 2012 13:25:13 +0000 (21:25 +0800)]
Fix use of buffer-file-truename in vc-find-file-hook (tiny change).

* lisp/vc/vc-hooks.el (vc-find-file-hook): Expand buffer-file-truename
before using it for comparison.

Fixes: debbugs:5297

11 years agoAuto-commit of loaddefs files.
Glenn Morris [Sat, 1 Dec 2012 12:17:48 +0000 (07:17 -0500)]
Auto-commit of loaddefs files.

11 years agoFix the MSDOS build.
Eli Zaretskii [Sat, 1 Dec 2012 11:50:05 +0000 (13:50 +0200)]
Fix the MSDOS build.

 msdos/sed1v2.inp: Dump emacs.exe and copy to b-emacs.exe before
 generating leim-list.el.

11 years agoAuto-commit of loaddefs files.
Glenn Morris [Sat, 1 Dec 2012 11:20:45 +0000 (06:20 -0500)]
Auto-commit of loaddefs files.

11 years agoAuto-commit of generated files.
Glenn Morris [Sat, 1 Dec 2012 11:17:32 +0000 (06:17 -0500)]
Auto-commit of generated files.

11 years agoAdd `add-log-current-defun-function's for CSS and HTML mode.
Jari Aalto [Sat, 1 Dec 2012 05:51:33 +0000 (13:51 +0800)]
Add `add-log-current-defun-function's for CSS and HTML mode.

* textmodes/css-mode.el (css-current-defun-name): New function.
(css-mode): Use it.

* textmodes/sgml-mode.el (html-current-defun-name): New function.
(html-mode): Use it.

11 years agoFix last change.
Chong Yidong [Sat, 1 Dec 2012 05:09:12 +0000 (13:09 +0800)]
Fix last change.

* emacs-lisp/lisp-mode.el (lisp-current-defun-name):
* progmodes/m4-mode.el (m4-current-defun-name):
* progmodes/perl-mode.el (perl-current-defun-name):
* textmodes/tex-mode.el (tex-current-defun-name):
* textmodes/texinfo.el (texinfo-current-defun-name): Use save-excursion.

11 years agoModularize add-log-current-defun.
Chong Yidong [Sat, 1 Dec 2012 04:57:07 +0000 (12:57 +0800)]
Modularize add-log-current-defun.
Suggested by Jari Aalto.

* lisp/emacs-lisp/lisp-mode.el (lisp-current-defun-name): New.
(lisp-mode-variables): Use it.

* lisp/progmodes/cc-mode.el (c-common-init):
* lisp/progmodes/cperl-mode.el (cperl-mode): Set a value for
add-log-current-defun-function.

* lisp/progmodes/m4-mode.el (m4-current-defun-name): New function.
(m4-mode): Use it.

* lisp/progmodes/perl-mode.el (perl-current-defun-name): New.
(perl-mode): Use it.

* lisp/progmodes/scheme.el (scheme-mode-variables, dsssl-mode): Use
lisp-current-defun-name.

* lisp/textmodes/tex-mode.el (tex-current-defun-name): New.
(tex-common-initialization): Use it.

* lisp/textmodes/texinfo.el (texinfo-current-defun-name): New.
(texinfo-mode): Use it.

* lisp/vc/add-log.el (add-log-current-defun-function): Doc fix.
(add-log-current-defun): Move mode-specific code to other files.
(add-log-lisp-like-modes, add-log-c-like-modes)
(add-log-tex-like-modes): Variables deleted.

Fixes: debbugs:2224

11 years agoConvert several major modes to setq-local.
Chong Yidong [Sat, 1 Dec 2012 04:09:55 +0000 (12:09 +0800)]
Convert several major modes to setq-local.

* emacs-lisp/lisp-mode.el (lisp-mode-variables, lisp-mode):
* progmodes/autoconf.el (autoconf-mode):
* progmodes/js.el (js-mode):
* progmodes/make-mode.el (makefile-mode, makefile-makepp-mode)
(makefile-bsdmake-mode, makefile-imake-mode, makefile-browse):
* progmodes/perl-mode.el (perl-mode):
* progmodes/sh-script.el (sh-mode, sh-set-shell):
* textmodes/css-mode.el (css-mode):
* textmodes/sgml-mode.el (html-mode, sgml-mode)
(sgml-tags-invisible, sgml-guess-indent):
* textmodes/tex-mode.el (tex-common-initialization)
(latex-complete-bibtex-keys, tex-shell, tex-main-file)
(doctex-mode, plain-tex-mode, latex-mode):
* textmodes/texinfo.el (texinfo-mode): Use setq-local.

11 years agoFix drawing of relief rects on X and W32.
YAMAMOTO Mitsuharu [Sat, 1 Dec 2012 02:38:11 +0000 (10:38 +0800)]
Fix drawing of relief rects on X and W32.

* xterm.c (x_draw_relief_rect, x_draw_image_relief): Fix relief
display for sliced images.

* w32term.c (w32_draw_relief_rect, x_draw_image_relief): Likewise.

Fixes: debbugs:10500

11 years ago* vc-hg.el (vc-hg-next-revision): Ensure use of default "tip" output format
Kirk Kelsey [Sat, 1 Dec 2012 02:10:53 +0000 (21:10 -0500)]
* vc-hg.el (vc-hg-next-revision): Ensure use of default "tip" output format

Fixes: debbugs:6968

11 years agoImprove the descriptive message in `recover-session'.
Chong Yidong [Sat, 1 Dec 2012 02:09:45 +0000 (10:09 +0800)]
Improve the descriptive message in `recover-session'.

* lisp/files.el (recover-session): Improve the descriptive message,
and use substitute-command-keys.

11 years ago* startup.el (fancy-startup-tail): Add a clickable link.
Kim F. Storm [Sat, 1 Dec 2012 02:08:30 +0000 (10:08 +0800)]
* startup.el (fancy-startup-tail): Add a clickable link.

11 years ago* fileio.c (Vauto_save_list_file_name): Minor doc fix.
Chong Yidong [Sat, 1 Dec 2012 01:49:48 +0000 (09:49 +0800)]
* fileio.c (Vauto_save_list_file_name): Minor doc fix.

11 years ago* startup.el (fancy-startup-tail): Improve the message about auto-save files.
Chong Yidong [Sat, 1 Dec 2012 01:49:29 +0000 (09:49 +0800)]
* startup.el (fancy-startup-tail): Improve the message about auto-save files.

Fixes: debbugs:2176

11 years agoido.el fix for bug#13036
Glenn Morris [Sat, 1 Dec 2012 01:27:56 +0000 (20:27 -0500)]
ido.el fix for bug#13036

* lisp/ido.el (ido-file-internal): Handle other-window, other-frame for dired.

11 years ago* lib-src/etags.c (Perl_functions): Support "use constant".
Kevin Ryde [Sat, 1 Dec 2012 01:22:28 +0000 (09:22 +0800)]
* lib-src/etags.c (Perl_functions): Support "use constant".

* doc/emacs/maintaining.texi (Tag Syntax): Mention Perl's "use constant".

Fixes: debbugs:5055

11 years ago* doc/misc/rcirc.texi (Notices): Fix typo.
Glenn Morris [Fri, 30 Nov 2012 23:50:49 +0000 (18:50 -0500)]
* doc/misc/rcirc.texi (Notices): Fix typo.

11 years agoMerge from gnulib for 'inline'.
Paul Eggert [Fri, 30 Nov 2012 18:25:59 +0000 (10:25 -0800)]
Merge from gnulib for 'inline'.

2012-11-29 snippet/warn-on-use: no 'static inline'
2012-11-29 ftruncate, fts, lstat, openat, raise: no 'static inline'
2012-11-29 arctwo, md4, md5, sha1, sha256, sha512: no 'static inline'
2012-11-29 fflush, stat: no 'static inline'
2012-11-29 stdio: better 'inline'
2012-11-29 sys_stat: no 'static inline'
2012-11-29 unistd: better 'inline'
2012-11-29 c-strtod, memcoll, readutmp: no 'static inline'
2012-11-29 extern-inline: no 'static inline'
2012-11-29 sys_socket: better 'inline'
* lib/stdio.c, lib/unistd.c: New files, from gnulib.
* build-aux/snippet/warn-on-use.h, lib/gnulib.mk, lib/lstat.c:
* lib/md5.c, lib/sha1.c, lib/sha256.c, lib/sha512.c, lib/stat.c:
* lib/stdio.in.h, lib/sys_stat.in.h, lib/unistd.in.h, m4/c-strtod.m4:
* m4/extern-inline.m4, m4/gnulib-comp.m4, m4/lstat.m4, m4/md5.m4:
* m4/sha1.m4, m4/sha256.m4, m4/sha512.m4, m4/stat.m4, m4/stdio_h.m4:
* m4/sys_socket_h.m4, m4/sys_stat_h.m4, m4/unistd_h.m4:
Update from gnulib.

Fixes: debbugs:13040

11 years agosrc/doc.c: Fix bug#13034.
Juanma Barranquero [Fri, 30 Nov 2012 17:27:41 +0000 (18:27 +0100)]
src/doc.c: Fix bug#13034.
(Fdocumentation): Re-add handling of function-documentation,
accidentally removed in 2012-11-09T04:10:16Z!monnier@iro.umontreal.ca.

11 years agoDefcustom :version fixes
Glenn Morris [Fri, 30 Nov 2012 17:09:55 +0000 (09:09 -0800)]
Defcustom :version fixes

* lisp/icomplete.el (icomplete-separator): Fix :version.

* lisp/erc/erc.el (erc-accidental-paste-threshold-seconds): Add :version.

11 years agoFix compilation problems with 64-bit MSVC compiler.
Fabrice Popineau [Fri, 30 Nov 2012 15:14:22 +0000 (17:14 +0200)]
Fix compilation problems with 64-bit MSVC compiler.

 src/w32fns.c: Remove prototype of atof.
 (syspage_mask): Declared DWORD_PTR, for compatibility with 64-bit
 builds.
 (file_dialog_callback): Declared UINT_PTR.
 src/w32common.h (syspage_mask): Declare DWORD_PTR, for compatibility
 with 64-bit builds.
 src/w32.c (FILE_DEVICE_FILE_SYSTEM, METHOD_BUFFERED)
 (FILE_ANY_ACCESS, CTL_CODE) [_MSC_VER]: Define only if not already
 defined.

11 years agoFix commentary to buffer_shared_and_changed.
Eli Zaretskii [Fri, 30 Nov 2012 09:23:15 +0000 (11:23 +0200)]
Fix commentary to buffer_shared_and_changed.

11 years agoIn Shell mode, reapply ansi colorization if the mode is re-enabled.
Chong Yidong [Fri, 30 Nov 2012 08:24:53 +0000 (16:24 +0800)]
In Shell mode, reapply ansi colorization if the mode is re-enabled.

* shell.el (shell-apply-ansi-color, shell-reapply-ansi-color): New functions.
(shell-mode): Use them to reapply ansi colorization if Shell mode is re-enabled.

11 years agoImprove buffer name default for C-u M-x shell.
Chong Yidong [Fri, 30 Nov 2012 08:06:04 +0000 (16:06 +0800)]
Improve buffer name default for C-u M-x shell.

* shell.el (shell): For C-u M-x shell, use an inactive shell
buffer as the default.

Fixes: debbugs:1975

11 years ago* vc/vc-git.el (vc-git-command): Disable the pager.
Chong Yidong [Fri, 30 Nov 2012 07:43:05 +0000 (15:43 +0800)]
* vc/vc-git.el (vc-git-command): Disable the pager.

Fixes: debbugs:6137

11 years ago* progmodes/grep.el (grep-compute-defaults): Do not pass the -e flag to xargs
Samuel Bronson [Fri, 30 Nov 2012 07:37:23 +0000 (15:37 +0800)]
* progmodes/grep.el (grep-compute-defaults): Do not pass the -e flag to xargs
for compatibility with BSD xargs.

Fixes: debbugs:11703

11 years ago* textmodes/fill.el (fill-region-as-paragraph): Handle overshoot by move-to-column.
Toru TSUNEYOSHI [Fri, 30 Nov 2012 07:10:30 +0000 (15:10 +0800)]
* textmodes/fill.el (fill-region-as-paragraph): Handle overshoot by move-to-column.

Fixes: debbugs:3234

11 years ago* longlines.el (longlines-wrap-line, longlines-encode-region): Preserve text properties.
Chong Yidong [Fri, 30 Nov 2012 06:56:51 +0000 (14:56 +0800)]
* longlines.el (longlines-wrap-line, longlines-encode-region): Preserve text properties.

Fixes: debbugs:1425

11 years agoRelax existing-registration check in vc-register (tiny change).
OKAZAKI Tetsurou [Fri, 30 Nov 2012 04:44:52 +0000 (12:44 +0800)]
Relax existing-registration check in vc-register (tiny change).

* vc/vc.el (vc-register): Allow registering a file which is already
registered with a different backend.

Fixes: debbugs:10589

11 years agoNew ERC option to avoid sending accidentally-pasted text to the server.
Eric Hanchrow [Fri, 30 Nov 2012 04:18:22 +0000 (12:18 +0800)]
New ERC option to avoid sending accidentally-pasted text to the server.

* erc.el (erc-last-input-time): New variable.
(erc-accidental-paste-threshold-seconds): New option to avoid
sending accidentally-pasted text to the server.
(erc-send-current-line): Use it.

Also,

* erc.el (erc-lurker-cleanup, erc-lurker-p): Use float-time.

Fixes: debbugs:11592

11 years ago* lisp/icomplete.el: Change separator; add ido-style commands.
Jambunathan K [Thu, 29 Nov 2012 21:32:24 +0000 (16:32 -0500)]
* lisp/icomplete.el: Change separator; add ido-style commands.
(icomplete-show-key-bindings): Remove custom var.
(icomplete-get-keys): Remove function.
(icomplete-forward-completions, icomplete-backward-completions):
New commands.
(icomplete-minibuffer-map): New var.
(icomplete-minibuffer-setup): Use it.
(icomplete-exhibit): Don't delay if the list of completions is known.
(icomplete-separator): New custom.
(icomplete-completions): Use it.
* lisp/minibuffer.el (completion-all-sorted-completions): Delete duplicates.
(minibuffer-force-complete-and-exit): New command.
(minibuffer--complete-and-exit): New function extracted from
minibuffer-complete-and-exit.
(minibuffer-complete-and-exit): Use it.

11 years ago* lisp/progmodes/etags.el (visit-tags-table-buffer): Give a more precise
Stefan Monnier [Thu, 29 Nov 2012 20:19:11 +0000 (15:19 -0500)]
* lisp/progmodes/etags.el (visit-tags-table-buffer): Give a more precise
error message when the file doesn't exist.

Fixes: debbugs:12974

11 years ago* lisp/simple.el (activate-mark): Run activate-mark-hook.
Kelly Dean [Thu, 29 Nov 2012 20:09:37 +0000 (15:09 -0500)]
* lisp/simple.el (activate-mark): Run activate-mark-hook.

Fixes: debbugs:13027

11 years agoWarn if try to set coding in dir-locals (bug#7169)
Glenn Morris [Thu, 29 Nov 2012 19:28:39 +0000 (14:28 -0500)]
Warn if try to set coding in dir-locals (bug#7169)

* lisp/files.el (hack-dir-local-variables):
Warn if try to set coding via dir-locals, since it doesn't work.

11 years agoFix wording of commentary to 'struct face' in dispextern.h.
Eli Zaretskii [Thu, 29 Nov 2012 16:26:25 +0000 (18:26 +0200)]
Fix wording of commentary to 'struct face' in dispextern.h.

11 years ago* xdisp.c (window_outdated): Remove eassert since it hits
Dmitry Antipov [Thu, 29 Nov 2012 06:00:21 +0000 (10:00 +0400)]
* xdisp.c (window_outdated): Remove eassert since it hits
some suspicious corner cases (see Bug#13007 and Bug#13012).
(mode_line_update_needed): New function.
(redisplay_internal, redisplay_window): Use it.
(ensure_selected_frame): New function.
(redisplay_internal, unwind_redisplay): Use it.
(redisplay_internal): Move comment about buffer_shared...
(buffer_shared_and_changed): ...near to its real use.

11 years agoAdd desktop support for restoring vc-dir buffers (bug#10606)
Glenn Morris [Thu, 29 Nov 2012 01:16:51 +0000 (20:16 -0500)]
Add desktop support for restoring vc-dir buffers (bug#10606)

* lisp/vc/vc-dir.el (vc-dir-mode): Autoload it (for desktop restore).
Set buffer-local value of desktop-save-buffer.
(vc-dir-desktop-buffer-misc-data, vc-dir-restore-desktop-buffer):
New functions.
(desktop-buffer-mode-handlers): Add vc-dir-mode entry.

* lisp/desktop.el (desktop-save-buffer-p): Treat vc-dir like dired.

11 years agoBy default, ignore case when testing inhibit-local-variables (bug#10610)
Glenn Morris [Thu, 29 Nov 2012 01:13:33 +0000 (20:13 -0500)]
By default, ignore case when testing inhibit-local-variables (bug#10610)

* lisp/files.el (inhibit-local-variables-ignore-case): New.
(inhibit-local-variables-p): Use inhibit-local-variables-ignore-case.
Doc fix.
(inhibit-local-variables-regexps, inhibit-local-variables-suffixes):
Doc fixes.