Paul Eggert [Wed, 19 Mar 2014 21:09:08 +0000 (14:09 -0700)]
Fix porting inconsistency about rounding to even.
* doc/lispref/numbers.texi (Numeric Conversions, Rounding Operations):
Document that 'round' and 'fround' round to even.
* src/floatfns.c (emacs_rint) [!HAVE_RINT]: Round to even.
This way, the unusual !HAVE_RINT case acts like the usual
HAVE_RINT case, and we can fix the documentation accordingly.
Recommend not modifying :set's value arg in defcustom (bug#16755).
* doc/lispref/customize.texi (Variable Definitions):
* lisp/custom.el (defcustom): Recommend avoiding
destructive modification of the value argument of :set.
Stefan Monnier [Tue, 18 Mar 2014 21:14:36 +0000 (17:14 -0400)]
* doc/lispref/modes.texi (Auto-Indentation): Mention electric-indent variables.
* doc/misc/cc-mode.texi (Indentation Commands): Remove C-j, since it's not
defined by CC-mode but globally.
(FAQ): Tweak text about RET and auto-indentation.
* doc/misc/vip.texi (Other Vi Commands): Adjust doc of C-j.
David Engster [Tue, 18 Mar 2014 21:12:42 +0000 (22:12 +0100)]
Document new EDE features.
* ede.texi (ede-cpp-root): Document the :compile-command slot.
(ede-linux): Document new variables
`project-linux-build-directory-default' and
`project-linux-architecture-default'.
David Engster [Tue, 18 Mar 2014 07:13:51 +0000 (08:13 +0100)]
ede.texi: Remove documentation for features only in CEDET upstream.
* ede.texi (Project Local Variables): Remove reference to
`ede-java-root' and the example using it.
(Android projects, ede-java-root): Remove nodes since they are
only in CEDET upstream (Bug#17030). All nodes updated.
Dmitry Gutov [Tue, 18 Mar 2014 06:06:33 +0000 (08:06 +0200)]
Further tweaks for comment-start-skip behavior
* lisp/newcomment.el (comment-normalize-vars): Only add escaping check
to `comment-start-skip' if not `comment-use-syntax'.
(comment-beginning): Use `narrow-to-region' instead of moving back
one character.
(http://lists.gnu.org/archive/html/emacs-devel/2014-03/msg00488.html)
(comment-start-skip): Update the docstring.
Paul Eggert [Tue, 18 Mar 2014 04:03:59 +0000 (21:03 -0700)]
Improve documentation for integer and floating-point basics.
* numbers.texi (Numbers, Integer Basics, Float Basics):
Document the basics a bit more precisely. Say more clearly
that Emacs floating-point numbers are IEEE doubles on all
current platforms. Give more details about frexp.
Say more clearly that '1.' is an integer.
(Predicates on Numbers): Fix wholenump typo.
* objects.texi (Integer Type): Adjust to match numbers.texi.
Stefan Monnier [Tue, 18 Mar 2014 01:51:12 +0000 (21:51 -0400)]
* doc/lispref/functions.texi (Advising Functions): Try and improve the text.
Add example use of advice-add.
(Core Advising Primitives): Rename. Explain handling of interactive
specs, including advice-eval-interactive-spec.
(Advising Named Functions): Try and better explain the difference with
add-function.
(Porting old advices): New node.
Paul Eggert [Tue, 18 Mar 2014 01:19:03 +0000 (18:19 -0700)]
Style fixes for floating-point doc.
* commands.texi, customize.texi, display.texi, elisp.texi, files.texi:
* frames.texi, hash.texi, internals.texi, keymaps.texi, lists.texi:
* minibuf.texi, nonascii.texi, numbers.texi, objects.texi, os.texi:
* processes.texi, streams.texi, strings.texi, text.texi:
* variables.texi, windows.texi:
Hyphenate "floating-point" iff it precedes a noun.
Reword to avoid nouns and hyphenation when that's easy.
Prefer "integer" to "integer number" and "is floating point"
to "is a floating point number".
Prefer "@minus{}" to "-" when it's a minus.
Stefan Monnier [Mon, 17 Mar 2014 18:30:53 +0000 (14:30 -0400)]
* lisp/emacs-lisp/nadvice.el (advice--interactive-form): New function.
(advice--make-interactive-form): Use it to avoid (auto)loading function.
(advice--make-1, advice-add, advice-remove):
Remove braindead :advice-pending hack.
Dmitry Gutov [Mon, 17 Mar 2014 06:22:58 +0000 (08:22 +0200)]
Fix debbugs#16971
* lisp/emacs-lisp/lisp-mode.el (lisp-mode-variables): Set
`comment-use-syntax' to t to avoid the unnecessary runtime check.
Set `comment-start-skip' to a simpler value that doesn't try to
check if the semicolon is escaped (this is handled by
`syntax-ppss' now).
Eli Zaretskii [Sun, 16 Mar 2014 16:28:34 +0000 (18:28 +0200)]
Fix bug #16830 with slow search for newlines in forward-line.
src/search.c (find_newline): Speed up the function when using the
newline cache, by halving the number of calls to
region_cache_forward and region_cache_backward.
Martin Rudalics [Sun, 16 Mar 2014 09:26:58 +0000 (10:26 +0100)]
Fix behavior of with-temp-buffer-window (Bug#16816, Bug#17007).
* window.el (with-temp-buffer-window): Don't make BUFFER-OR-NAME
current (Bug#16816, Bug#17007).
(with-current-buffer-window): New macro doing the same as
`with-temp-buffer-window' but with BUFFER-OR-NAME current.
* help.el (help-print-return-message): Warn in doc-string to not
use this in `with-help-window'.
(describe-bindings-internal): Call `describe-buffer-bindings'
from within help buffer. See Juanma's scenario in (Bug#16816).
(with-help-window): Update doc-string.
* dired.el (dired-mark-pop-up):
* files.el (save-buffers-kill-emacs):
* register.el (register-preview): Use `with-current-buffer-window'
instead of `with-temp-buffer-window'.
* display.texi (Temporary Displays): Rewrite descriptions of
`with-output-to-temp-buffer' and `with-temp-buffer-window'.
* help.texi (Help Functions): Rewrite description of
`with-help-window'.
lisp/term/ns-win.el (x-command-line-resources): Rename from ns-... version.
(ns-initialize-window-system): Use it. It is set in term/common-win.el
from the -xrm command line argument, but in the Nextstep port its value
is irrelevant because nsfns.m:Fx_open_connection ignores it for now.
Martin Rudalics [Fri, 14 Mar 2014 10:38:46 +0000 (11:38 +0100)]
Document pixelwise frame resizing and fix related bug on Windows.
* w32term.c (x_set_window_size): When frame-resize-pixelwise is
nil, always resize character wise to avoid potential loss of the
mode line (Bug#16923 related).
* display.texi (Temporary Displays): Say that
with-temp-buffer-window makes its buffer current.
* frames.texi (Size and Position): Describe new option
`frame-resize-pixelwise'. Rewrite descriptions of
`set-frame-size', `set-frame-height' and `set-frame-width'.
Paul Eggert [Thu, 13 Mar 2014 05:27:28 +0000 (22:27 -0700)]
* mule.texi (International, Language Environments): Update
the list of language environments to what Emacs currently
supports. Add the full list to the index. Suggest C-h L for
details rather than trying to give very brief details here.
Martin Rudalics [Wed, 12 Mar 2014 07:28:23 +0000 (08:28 +0100)]
Two adjustments in window/frame resizing.
* frame.c (x_set_frame_parameters): Always calculate new sizes
pixelwise to avoid potential loss when rounding.
* window.el (fit-frame-to-buffer): Get maximum width from
display's width instead of height.
Glenn Morris [Wed, 12 Mar 2014 07:14:30 +0000 (00:14 -0700)]
Some doc edits related to desktop-restore-frames
* doc/emacs/misc.texi (Saving Emacs Sessions):
Be briefer about desktop's handling of frames.
The manual does not need to mention every option, nor should
it just repeat the doc-strings.
Paul Eggert [Wed, 12 Mar 2014 07:03:40 +0000 (00:03 -0700)]
* mule.texi (International Chars): Adjust C-u C-x = description.
Change it to match Emacs's current behavior. Also, change the
example to use ê instead of À, as the isolated grave accent in the
latter's decomposition listing was confusingly transliterated to
left single quote in the PDF version of the manual.
Glenn Morris [Wed, 12 Mar 2014 06:52:54 +0000 (23:52 -0700)]
* doc/misc/octave-mode.texi (Using Octave Mode): Remove outdated stuff
about RET and indentation. E.g., octave-reindent-then-newline-and-indent
was removed three years ago.
When you delete commands, please use grep to check for references to them.
Stefan Monnier [Tue, 11 Mar 2014 17:10:07 +0000 (13:10 -0400)]
* lisp/simple.el (set-mark): Ensure mark-active is nil if the mark is nil.
Deactivate the mark before setting it to nil.
(activate-mark): Do nothing if region is already active.
Stefan Monnier [Tue, 11 Mar 2014 01:22:24 +0000 (21:22 -0400)]
* lisp/emacs-lisp/nadvice.el (advice--make-1): Fix autoloading avoidance.
(advice-add): Add a :advice--pending marker, so advice--make-1 knows
when the advice is pending.
(advice-remove): Remove this marker when not needed any more.
lisp/frameset.el: Separate frame reusing from cleaning up.
* lisp/desktop.el (desktop-restore-forces-onscreen)
(desktop-restore-reuses-frames): Use non-keyword values.
(desktop-restore-frameset): Use CLEANUP-FRAMES arg of frameset-restore.
* lisp/frameset.el: Separate options for reusing frames and cleaning up.
(frameset--reuse-list): Remove definition; declare.
(frameset--action-map): Declare.
(frameset--find-frame-if): Doc fix.
(frameset--restore-frame): Cache frame action.
(frameset-restore): New keyword arg CLEANUP-FRAMES, allows to select
how to clean up the frame list after restoring. Remove cleaning
options from REUSE-FRAMES. Change all keyword values to symbols.
(frameset--jump-to-register): Simplify by using CLEANUP-FRAMES.
Paul Eggert [Mon, 10 Mar 2014 18:12:25 +0000 (11:12 -0700)]
Fix "\" problem in tutorials by using natural-language quotes.
* tutorials/TUTORIAL, tutorials/TUTORIAL.cs, tutorials/TUTORIAL.eo:
* tutorials/TUTORIAL.es, tutorials/TUTORIAL.it, tutorials/TUTORIAL.ja:
* tutorials/TUTORIAL.ko, tutorials/TUTORIAL.nl, tutorials/TUTORIAL.pl:
* tutorials/TUTORIAL.pt_BR, tutorials/TUTORIAL.ro:
* tutorials/TUTORIAL.ru, tutorials/TUTORIAL.sk, tutorials/TUTORIAL.sv:
* tutorials/TUTORIAL.th:
Avoid using ` for natural-language quotes. Instead, work around
the problem with "\" by using non-" quotation marks appropriate
for the natural language in question, e.g., «...» for Spanish.
For English “...” could be used, but use '...' instead so that
TUTORIAL continues to be encoded in ASCII.
Eli Zaretskii [Mon, 10 Mar 2014 17:26:45 +0000 (19:26 +0200)]
Fix an obscure bug in fstatat on Windows 9X.
src/w32.c (fstatat): Don't add an extra slash if the argument ends
with a slash: this fails the subsequent call to stat_worker on
Windows 9X. Reported by oslsachem <oslsachem@gmail.com>.
Michael Albinus [Mon, 10 Mar 2014 13:36:39 +0000 (14:36 +0100)]
* net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Do not add `nil' to the environment, when there's no remote `locale'.
(tramp-find-inline-encoding): Check, that the remote host has
installed perl, before sending scripts.
Paul Eggert [Sun, 9 Mar 2014 22:38:15 +0000 (15:38 -0700)]
Fix emacsclient terminal corruption when in background.
* emacsclient.c (handle_sigcont): Check for tcgetpgrp failure.
Cancel the continue only if tty. Send SIGTTIN to the process
group, not SIGSTOP to self, as this is what the glibc manual
recommends.
(main): If tty, and if started in the background, send SIGTTIN
to the process group.
Juri Linkov [Sun, 9 Mar 2014 21:55:35 +0000 (23:55 +0200)]
* lisp/ansi-color.el (ansi-color-names-vector): Copy default colors
from `xterm-standard-colors' that look well on the default white
background (and also on the black background) to avoid illegible
color combinations like yello-on-white and white-on-white.
http://lists.gnu.org/archive/html/emacs-devel/2014-02/msg00157.html
lisp/frameset.el: Avoid computing frame-list unnecessarily.
(frameset-restore): When no frame is visible, do not generate
a list of frames, just make visible the selected one.