Juri Linkov [Wed, 19 Sep 2012 20:09:55 +0000 (23:09 +0300)]
* lisp/dired-aux.el (dired-diff): Add (require 'diff) because
`diff-latest-backup-file' is not autoloaded.
(dired-do-chxxx, dired-do-chmod): Set `no-error-if-not-filep' arg
of `dired-get-filename' to t to not report error when there is
no default file on the current line.
Stefan Monnier [Wed, 19 Sep 2012 19:59:52 +0000 (15:59 -0400)]
* lisp/emacs-lisp/macroexp.el (macroexp--funcall-if-compiled): Rename from
macroexp--eval-if-compile.
(macroexp--funcall-and-return, macroexp--warn-and-return): New funs.
(macroexp--expand-all): Use them.
New feature: set optimal slice from BoundingBox information.
* doc-view.el (doc-view-mode-map): Add keybinding.
(doc-view-menu): Add menu entry.
(doc-view-set-slice): Adapt docstring.
(doc-view-get-bounding-box, doc-view-guess-paper-size)
(doc-view-scale-bounding-box)
(doc-view-set-slice-from-bounding-box): New functions.
(doc-view-paper-sizes): New defvar.
* doc/emacs/misc.texi (DocView Slicing): Document new slice from
BoundingBox feature.
Jan Djärv [Wed, 19 Sep 2012 06:47:01 +0000 (08:47 +0200)]
* lisp/startup.el (command-line-ns-option-alist): Add -g and --geometry.
* src/frame.c (read_integer, XParseGeometry): Moved from w32xfns.c.
(Fx_parse_geometry): If there is a space in string, call
Qns_parse_geometry, otherwise do as on other terms.
* src/w32xfns.c (read_integer, XParseGeometry): Move to frame.c.
* src/nsfns.m (XParseGeometry): Remove.
(Fx_create_frame): Call x_set_offset to correctly interpret
top_pos in geometry.
Juri Linkov [Tue, 18 Sep 2012 23:40:39 +0000 (02:40 +0300)]
* lisp/dired-aux.el (dired-diff): Restore original functionality of
getting the default value, but keep new feature of using the
latest existing backup file (`diff-latest-backup-file').
Juri Linkov [Tue, 18 Sep 2012 23:18:06 +0000 (02:18 +0300)]
* lisp/dired.el (dired-mark): If the region is active in Transient Mark
mode, mark all files in the active region. Doc fix.
(dired-unmark, dired-flag-file-deletion, dired-unmark-backward):
Doc fix.
Juri Linkov [Tue, 18 Sep 2012 22:57:45 +0000 (01:57 +0300)]
* lisp/dired-aux.el (dired-do-chxxx, dired-do-chmod): Default file
attributes for M-n are pulled from the file at point.
(dired-do-chgrp, dired-do-chown, dired-do-touch): Doc fix.
Suggested by Drew Adams.
* lisp/progmodes/ruby-mode.el (ruby-brace-to-do-end): Don't add extra
whitespace after "end".
(ruby-do-end-to-brace): Collapse block to one line if it fits
within fill-column.
* doc/lispref/customize.texi (Customization): Define customization more
carefully.
(Common Keywords): Add xref to Constant Variables.
* doc/lispref/display.texi (Faces): Discuss anonymous faces.
(Face Attributes): Tweak intro.
(Defining Faces): Move after the Face Attributes node. Copyedits.
(Displaying Faces): Describe role of inheritance.
* doc/lispref/variables.texi (Defining Variables): Link to defcustom's node
instead of the higher-level Customization chapter.
Andreas Schwab [Mon, 17 Sep 2012 22:43:12 +0000 (00:43 +0200)]
* Makefile.in (bootstrap): Revert last change. Run config.status
after config.status --recheck, run configure from $(srcdir).
(config.status): Run configure from $(srcdir).
Paul Eggert [Mon, 17 Sep 2012 22:35:28 +0000 (15:35 -0700)]
* Makefile.in: Run autogen/copy_autogen if autogen.sh fails,
to create 'configure'; problem reported by Andreas Schwab in
<http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00438.html>.
* autogen.sh: Exit with status 1 when failing due to missing tools,
reverting the 2012-09-10 change to this file.
* autogen/copy_autogen: Fail if one of the subsidiary actions fail.
Use 'cp -f' for the build-aux files, since the destinations are
typically read-only.
Paul Eggert [Mon, 17 Sep 2012 21:33:14 +0000 (14:33 -0700)]
* Makefile.in: Fix build error on FreeBSD.
($(MAKEFILE_NAME)): Pass MAKE='$(MAKE)' to config.status's env.
Suggested by Wolfgang Jenker in
<http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00430.html>.
(MAKE_CONFIG_STATUS): Remove. Remaining use expanded.
This undoes part of the 2012-09-10 patch.
(bootstrap): Run ./configure, rather than trying to run config.status
if it exists. That builds src/epaths.h more reliably.
Eli Zaretskii [Mon, 17 Sep 2012 07:54:32 +0000 (10:54 +0300)]
Fix the value of __malloc_extra_blocks.
src/ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize
__malloc_extra_blocks to 32 instead of 64, like alloc.c did in
emacs_blocked_malloc, now deleted.
* etc/refcards/emacsver.tex: New file.
* etc/refcards/calccard.tex, etc/refcards/cs-dired-ref.tex:
* etc/refcards/cs-refcard.tex, etc/refcards/cs-survival.tex:
* etc/refcards/de-refcard.tex, etc/refcards/dired-ref.tex:
* refcards/emacsver.tex, etc/refcards/fr-dired-ref.tex:
* etc/refcards/fr-refcard.tex, etc/refcards/fr-survival.tex:
* etc/refcards/orgcard.tex, etc/refcards/pl-refcard.tex:
* etc/refcards/pt-br-refcard.tex, etc/refcards/refcard.tex:
* etc/refcards/sk-dired-ref.tex, etc/refcards/sk-refcard.tex:
* etc/refcards/sk-survival.tex, etc/refcards/survival.tex:
* etc/refcards/vipcard.tex, etc/refcards/viperCard.tex: Include emacsver.tex.
* refcards/calccard.tex (\emacsversionnumber):
Rename to \versionemacs, same as all the other refcards.
* etc/refcards/Makefile (ENVADD): New variable.
(sk-dired-ref.pdf, sk-survival.pdf, pl-refcard.pdf)
(%.pdf, %,dvi, sk-dired-ref.dvi, sk-survival.dvi, pl-refcard.dvi):
Depend on emacsver.tex. Add "." to TEXINPUTS for TeX commands.
* admin/admin.el (set-version): Set major version in
etc/refcards/ru-refcard.tex and etc/refcards/emacsver.tex.
(set-copyright): In etc/refcards, only change ru-refcard.tex
and emacsver.tex.
* admin.el (cusver-scan, cusver-check): Bind local variables.
Paul Eggert [Mon, 17 Sep 2012 01:02:11 +0000 (18:02 -0700)]
Remove no-longer-needed Solaris 2.4 vfork bug workaround.
The workaround was for improving performance on Solaris 2.4, but
is getting in the way now. Emacs will still work if someone is
still running Solaris 2.4 in a museum somewhere; Sun dropped
support for Solaris 2.4 in 2003.
* configure.ac (ac_cv_func_vfork_works): Default to 'no' on
Solaris 2.4, so that AC_FUNC_VFORK doesn't think vfork works.
* src/callproc.c (Fcall_process) [HAVE_WORKING_VFORK]:
* src/process.c (create_process) [HAVE_WORKING_VFORK]:
Omit now-unnecessary workaround for the Solaris 2.4 vfork bug,
since Emacs no longer uses vfork on that platform.
Reduce the number of versioned files storing the short copyright string
* configure.ac (copyright): New output variable.
(COPYRIGHT): New AC_DEFINE.
* admin/admin.el (set-copyright): No more need to set copyrights for
nextstep, or .c files. Add configure.ac and config.nt.
* lib-src/ebrowse.c (version):
* lib-src/etags.c (print_version): Use COPYRIGHT.
* nextstep/templates/Info-gnustep.plist.in:
* nextstep/templates/InfoPlist.strings.in:
* nextstep/templates/Info.plist.in: Let configure set copyright.
Paul Eggert [Sun, 16 Sep 2012 21:43:55 +0000 (14:43 -0700)]
Remove configure's --without-sync-input option.
When auditing signal-handling in preparation for cleaning it up,
I found that SYNC_INPUT has race conditions and would be a real
pain to fix. Since it's an undocumented and deprecated
configure-time option, now seems like a good time to remove it.
Also see <http://bugs.gnu.org/11080#16>.
* configure.ac (SYNC_INPUT, BROKEN_SA_RESTART): Remove.
* admin/CPP-DEFINES (BROKEN_SA_RESTART, SA_RESTART): Remove.
* etc/TODO (Make SYNC_INPUT the default): Remove, as the code now
behaves as if SYNC_INPUT is always true.
* src/alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal)
(_free_internal) [!DOUG_LEA_MALLOC]: Remove decls.
(alloc_mutex) [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
(malloc_hysteresis):
(check_depth) [XMALLOC_OVERRUN_CHECK]:
(MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT):
(__malloc_hook, __realloc_hook, __free_hook, BYTES_USED)
(dont_register_blocks, bytes_used_when_reconsidered)
(bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc)
(emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc):
[!SYSTEM_MALLOC && !SYNC_INPUT]:
Remove. All uses removed.
(MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different
implementation, one that depends on whether the new macro
XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT
is defined.
* src/atimer.c (run_timers, handle_alarm_signal):
* src/keyboard.c (pending_signal, poll_for_input_1, poll_for_input)
(handle_async_input, process_pending_signals)
(handle_input_available_signal, init_keyboard):
* src/nsterm.m (ns_read_socket):
* src/process.c (wait_reading_process_output):
* src/regex.c (immediate_quit, IMMEDIATE_QUIT_CHECK):
* src/sysdep.c (emacs_sigaction_init) [SA_RESTART]:
(emacs_write):
* src/xterm.c (XTread_socket):
Assume SYNC_INPUT.
* src/conf_post.h (SA_RESTART) [IRIX6_5]: Do not #undef.
* src/eval.c (handling_signal): Remove. All uses removed.
* src/lisp.h (ELSE_PENDING_SIGNALS): Remove.
All uses replaced with the SYNC_INPUT version.
(reset_malloc_hooks, uninterrupt_malloc, handling_signal):
Remove decls.
* src/sysdep.c, src/syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
Now static.
* admin/admin.el (set-version): No more need to set nextstep versions.
(set-copyright): Update for moved nextstep files.
* nextstep/Makefile.in: New file.
* nextstep/templates: New directory.
* nextstep/templates/Emacs.desktop.in, nextstep/templates/Info-gnustep.plist.in:
* nextstep/templates/Info.plist.in, nextstep/templates/InfoPlist.strings.in:
Move here from various Cocoa/, GNUstep/ locations.
Let configure set the version number.
* nextstep/Cocoa/Emacs.base/Contents/Info.plist:
* nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:
* nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:
* nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop: Move to templates/.
* nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj: Remove directory.
* src/Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables.
(ns_frag): Remove.
(ns-app): Move here from ns.mk, and simplify.
(clean): Simplify nextstep entry.
* src/ns.mk: Remove file.
Jan Djärv [Sun, 16 Sep 2012 09:11:50 +0000 (11:11 +0200)]
Try to fix crashes introduced by 2012-09-10T21:01:45Z!jan.h.d@swipnet.se.
* nsfns.m (Fx_open_connection): Move initialization of ns_*_types
to ns_term_init to avoid memory leak.
* nsterm.m (ns_update_begin): Initialize bp after lcokFocus, use
explicit retain/release.
(ns_term_init): Only allow one display. Initialize outerpool and
ns_*_types.
* lisp/progmodes/compile.el (compilation-parse-errors): Accept list
values similar to font-lock-keywords. Suggested by
Oleksandr Manzyuk.
(compilation-error-regexp-alist): Doc fix.
Paul Eggert [Sat, 15 Sep 2012 08:45:27 +0000 (01:45 -0700)]
Port _setjmp fix to POSIXish hosts as well as Microsoft.
* nt/config.nt: Attempt to sync with autogen/config.in.
(HAVE_SIGSETJMP, HAVE__SETJMP): New macros.
(_longjmp, _setjmp): Remove.
* src/image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as
it's needed on POSIXish hosts that lack _setjmp. Attempt to solve
the Microsoft problem in a different way, by altering nt/config.nt.
Eli Zaretskii [Sat, 15 Sep 2012 08:03:11 +0000 (11:03 +0300)]
Fix MS-Windows build broken by 2012-09-15T07:06:56Z!eggert@cs.ucla.edu, completing fix for bug #12446.
src/w32xfns.c:
src/w32uniscribe.c:
src/w32term.c:
src/w32select.c:
src/w32reg.c:
src/w32proc.c:
src/w32menu.c:
src/w32inevt.c:
src/w32heap.c:
src/w32font.c:
src/w32fns.c:
src/w32console.c:
src/w32.c:
src/w16select.c: Remove inclusion of setjmp.h, as it is now included
by lisp.h. This completes removal of setjmp.h inclusion
erroneously announced in the previous commit.
src/lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary
more accurate.
src/image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is
not defined as a macro. The latter happens on MS-Windows.
Paul Eggert [Sat, 15 Sep 2012 07:06:56 +0000 (00:06 -0700)]
Port better to POSIX hosts lacking _setjmp.
* configure.ac (HAVE__SETJMP, HAVE_SIGSETJMP): New symbols.
(_setjmp, _longjmp): Remove.
* src/lisp.h: Include <setjmp.h> here, since we use its symbols here.
All instances of '#include <setjmp.h>' removed, if the
only reason for the instance was because "lisp.h" was included.
(sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
and _longjmp with the new symbols. Emacs already uses _setjmp if
available, so this change affects only POSIXish hosts that have
sigsetjmp but not _setjmp, such as some versions of Solaris and
Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.)
* src/image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
(png_load_body) [HAVE_PNG]:
(PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
(PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
since PNG requires jmp_buf. This is the only exception to the
general rule that we now use sys_setjmp and sys_longjmp.
This exception is OK since this code does not change the signal
mask or longjmp out of a signal handler.
Improve vc-bzr-working-revision for lightweight checkouts
* lisp/vc/vc-bzr.el (vc-bzr-working-revision): For lightweight local
checkouts, check the parent dirstate matches the branch.
Add "--tree" to "bzr revno" arguments. Don't try to shorten the
empty string.
Improve emacs-bzr-version for lightweight checkouts (bug#12441)
* lisp/version.el (emacs-bzr-version): Doc fix.
(emacs-bzr-version-dirstate): New function.
(emacs-bzr-get-version): For lightweight checkouts, if the parent
is local try and check that it matches the branch. If not, just
use dirstate information.
Paul Eggert [Fri, 14 Sep 2012 18:56:19 +0000 (11:56 -0700)]
* configure.ac: Port to hosts lacking gtk.
(PKG_CHECK_MODULES): Capture pkg-config diagnostics
better, in particular, problems in invoking pkg-config itself.
This is useful on hosts that don't have pkg-config.
(GTK_MODULES): Do not exit 'configure' simply because gtk3
and gtk2 are both missing. Problem found on Solaris 8.
Stefan Monnier [Fri, 14 Sep 2012 03:55:16 +0000 (23:55 -0400)]
* lisp/emacs-lisp/edebug.el: Miscellaneous cleanup.
Remove obsolete byte-compiler hack that tried to silence some warnings.
(edebug-submit-bug-report): Remove.
(edebug-get-buffer-window, edebug-sit-for, edebug-input-pending-p):
Remove aliases, use the un-prefixed name instead.
(edebug-pop-to-buffer): Consider other frames.
(edebug-original-read):: Make it more obvious that it's always defined.
(edebug--make-form-data-entry, edebug--form-data-name)
(edebug--form-data-begin, edebug--form-data-end): Rename from the
single-dashed name, and implement with cl-defstruct.
(edebug-set-form-data-entry): Use the standard accessors.
(edebug-make-top-form-data-entry): Use push.
(edebug-no-match): Drop useless `funcall'.
(mapcar, mapconcat, mapatoms, apply, funcall): Don't add debug specs
to functions.
(defsubst, dont-compile, eval-when-compile, eval-and-compile)
(delay-mode-hooks, with-temp-file, with-temp-message, ad-dolist)
(with-syntax-table, push, pop, 1value, noreturn, defadvice)
(easy-menu-define, with-custom-print): Remove redundant specs.
(edebug-outside-overriding-local-map)
(edebug-outside-overriding-terminal-local-map): Remove, unused.
(edebug--display): Bind unread-command-events directly to nil rather
than binding it to unread-command-events and later setting it to nil.
(edebug--display): Kill edebug-eval-buffer here...
(edebug--recursive-edit): ...rather than here.
Bind standard-output and standard-input.
(edebug-eval): Check cl-macroexpand-all is fboundp.
(edebug-temp-display-freq-count): Fix last change.
* lisp/emacs-lisp/easymenu.el (easy-menu-define): Add `debug' spec.
* lisp/subr.el (noreturn, 1value): Add `debug' spec.
* lisp/emacs-lisp/advice.el: Require cl-lib.
(ad-copy-tree): Remove, use copy-tree instead.
(ad-dolist): Remove use dolist or cl-dolist instead.
(ad-do-return): Remove, use cl-return instead.
(defadvice): Add `debug' spec.
* lisp/vc/vc.el: No need to require ediff.
(ediff-load-version-control): Declare.
(ediff-vc-internal): Fix declaration.
(vc-version-ediff): Require ediff.
Paul Eggert [Thu, 13 Sep 2012 16:23:06 +0000 (09:23 -0700)]
Use a more backwards-compatible timer format.
* etc/NEWS: Document it.
* lisp/emacs-lisp/timer.el (timer): PSECS is now at the end, rather than
being right after USECS, as that better supports old code that
inadvisedly looked directly at the timer vector.
* src/keyboard.c (decode_timer): Get PSECS from the 8th (origin-0)
vector element, not from the 4th, since PSECS is now at the end.
(Fcurrent_idle_time): Doc fix.
language/chinese.el ("Chinese-GB", "Chinese-BIG5", "Chinese-CNS", "Chinese-EUC-TW"): Add chinese-gbk to coding-priority property of these language environment.