Commit 5671dc51 authored by Glenn Morris's avatar Glenn Morris
Browse files

Merge from emacs-24; up to 2014-03-21T08:51:02Z!eliz@gnu.org

parents 26e91130 1e92a8a3
2014-03-21 Martin Rudalics <rudalics@gmx.at>
* frames.texi (Size and Position): In `frame-resize-pixelwise'
description drop remark about frame maximization.
* windows.texi (Display Action Functions): Add description for
`display-buffer-no-window' and explain use of `allow-no-window'
alist entries.
2014-03-21 Glenn Morris <rgm@gnu.org>
* commands.texi (Defining Commands): Copyedit re `interactive-only'.
2014-03-20 Paul Eggert <eggert@cs.ucla.edu>
* internals.texi (C Integer Types): Prefer 'false' and 'true'
......
......@@ -123,11 +123,10 @@ value for this property takes precedence over any @code{interactive}
form in the function body itself. This feature is seldom used.
@cindex @code{interactive-only} property
Sometimes, a named command is only intended to be called
interactively, never directly from Lisp. In that case, give it a
non-@code{nil} @code{interactive-only} property. In that case, the
byte compiler will print a warning message if the command is called
from Lisp.
Sometimes, a function is only intended to be called interactively,
never directly from Lisp. In that case, give the function a
non-@code{nil} @code{interactive-only} property. This causes the
byte compiler to warn if the command is called from Lisp.
@menu
* Using Interactive:: General rules for @code{interactive}.
......
......@@ -1163,10 +1163,7 @@ on the toolkit used: Dragging the frame border with the mouse is usually
always done character-wise. Calling @code{set-frame-size} (see below)
with arguments that do not specify the frame size as an integer multiple
of its character size may be, however, either ignored or cause a
rounding (GTK+, Windows) or get accepted (Lucid, Motif). This also
means that with some toolkits and a display whose size is not an
integral multiple of your default font, you may have to set this to
non-@code{nil} in order to fully maximize a frame.
rounding (GTK+, Windows) or get accepted (Lucid, Motif).
@end defopt
@defun set-frame-size frame width height pixelwise
......
......@@ -2280,6 +2280,15 @@ window and displaying the buffer in that window. It can fail if all
windows are dedicated to another buffer (@pxref{Dedicated Windows}).
@end defun
@defun display-buffer-no-window buffer alist
If @var{alist} has a non-@code{nil} @code{allow-no-window} entry, then
this function does not display @code{buffer}. This allows to override
the default action and avoid displaying the buffer. It is assumed that
when the caller specifies a non-@code{nil} @code{allow-no-window} value
it can handle a @code{nil} value returned from @code{display-buffer} in
this case.
@end defun
To illustrate the use of action functions, consider the following
example.
......
2014-03-21 Glenn Morris <rgm@gnu.org>
* ede.texi (ede-linux):
* vip.texi (New Bindings): Tiny copyedits.
2014-03-18 Stefan Monnier <monnier@iro.umontreal.ca>
* vip.texi (Other Vi Commands): Adjust doc of C-j.
......
......@@ -917,7 +917,7 @@ and has an optimized include file identification function.
Through the variables @code{project-linux-build-directory-default} and
@code{project-linux-architecture-default}, you can set the build
directory and its architecture, resp. The default is to assume that
directory and its architecture, respectively. The default is to assume that
the build happens in the source directory and to auto-detect the
architecture; if the auto-detection fails, you will be asked.
......
......@@ -569,7 +569,7 @@ in the current window, while @kbd{S} selects buffer in another window.
@kindex 1300 @kbd{X} (@code{vip-ctl-x-equivalent})
These keys will exit from vi mode and return to emacs mode temporarily.
If you type @kbd{C} (@kbd{X}), Emacs will be in emacs mode and will believe
that you have typed @kbd{C-c} (@kbd{C-x}, resp.) in emacs mode. Moreover,
that you have typed @kbd{C-c} (@kbd{C-x}) in emacs mode. Moreover,
if the following character you type is an upper-case letter, then Emacs
will believe that you have typed the corresponding control character.
You will be in vi mode again after the command is executed. For example,
......
......@@ -240,6 +240,7 @@ bound to <f11> and M-<f10>, respectively.
*** New hooks `focus-in-hook', `focus-out-hook'.
These are normal hooks run when an Emacs frame gains or loses input focus.
+++
*** Emacs can now change frame sizes in units of pixels, rather than
text rows or columns. When maximizing a frame or making it fullscreen,
remaining extra pixels are no longer given to the minibuffer, the rightmost
......@@ -248,6 +249,7 @@ areas of the frame's windows. If the new option `frame-resize-pixelwise'
is non-nil, all frame size changes happen pixelwise and set the
corresponding size hints for the window manager.
+++
*** Emacs can now change window sizes in units of pixels.
Mouse-dragging a mode line or window divider now changes the size of
adjacent windows pixelwise. If the new option `window-resize-pixelwise'
......@@ -261,6 +263,7 @@ or values to be returned, in pixels instead of lines/columns.
count partially visible lines or columns if called with a nil PIXELWISE
argument.
+++
*** Emacs can now draw dividers between adjacent windows. To put
dividers between side-by-side/vertically stacked windows customize the
frame parameters `right-divider-width' and `bottom-divider-width' to
......@@ -271,25 +274,30 @@ the appearance of dividers by customizing the faces `window-divider',
two are useful to provide a 3D effect, or to better distinguish dividers
from surrounding display objects.
+++
*** New functions are provided to return the pixel sizes of window
components, namely `window-scroll-bar-width', `window-mode-line-height'
`window-header-line-height', `window-right-divider-width' and
`window-bottom-divider-width'.
+++
*** The new function `window-text-pixel-size' returns the size of the
text of a window's buffer in pixels. This allows functions like
`fit-frame-to-buffer' and `fit-window-to-buffer' to accurately fit a
window to its buffer as it will be displayed.
+++
*** `fit-window-to-buffer' can now resize windows in both dimensions.
This behavior is controlled by the new option
`fit-window-to-buffer-horizontally'. The new option
`fit-frame-to-buffer' allows to fit the window's frame to its buffer.
+++
*** `fit-frame-to-buffer' now fits frames in both dimensions. The new
options `fit-frame-to-buffer-margins' and `fit-frame-to-buffer-sizes'
control the size of the frame and its position on screen.
---
*** Temp Buffer Resize Mode can now adjust height and width of windows
and frames. `temp-buffer-resize-mode' is now able to adjust the height
and the width of a window displaying a temporary buffer. The new option
......@@ -328,9 +336,11 @@ buffer.
`display-buffer' choose or make a window at the bottom of the selected
frame.
+++
*** New display action function `display-buffer-no-window' to not
display the buffer in a window.
+++
*** New display action alist entry `allow-no-window' to indicate the
caller of `display-buffer' is ready to handle the case of not
displaying the buffer in a window.
......
2014-03-21 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-methods): Add docstring for `tramp-login-env'
and `tramp-copy-env'.
* net/tramp-sh.el (tramp-methods) <sudo>: Add `tramp-login-env'.
(tramp-maybe-open-connection): Handle `tramp-login-env'.
2014-03-21 Glenn Morris <rgm@gnu.org>
* electric.el (electric-indent-post-self-insert-function): Add doc.
2014-03-21 Dmitry Gutov <dgutov@yandex.ru>
* emacs-lisp/package.el (package-compute-transaction):
Use `version-list-<=' to compare the requirement version against
the version of package already to be installed. Update the error
message. (Bug#16826)
* progmodes/ruby-mode.el (ruby-smie-rules):
Add indentation rule for ` @ '. (Bug#17050)
2014-03-21 Juanma Barranquero <lekktu@gmail.com>
* align.el (align-regexp): Remove superfluous backslash.
* ffap.el (ffap-ftp-default-user, ffap-url-regexp)
(ffap-pass-wildcards-to-dired, dired-at-point-require-prefix)
(ffap-rfc-path, ffap-ftp-sans-slash-regexp, ffap-menu-regexp):
Fix docstring typos.
(ffap-next): Use C-u in docstring.
(ffap-machine-p, ffap-list-env, ffap-alist, ffap-alist)
(ffap-string-at-point-mode-alist, ffap-menu, ffap-menu-ask):
Remove superfluous backslashes.
(ffap-string-at-point): Reflow docstring.
* server.el (server-host): Reflow docstring.
(server-unload-function): Fix docstring typo.
(server-eval-at): Remove superfluous backslash.
* skeleton.el (skeleton-insert): Remove superfluous backslash.
(skeleton-insert): Doc fix.
(skeleton-insert): Reflow docstring.
* term/tty-colors.el (tty-color-alist, tty-modify-color-alist)
(tty-color-approximate, tty-color-by-index, tty-color-values)
(tty-color-desc): Remove superfluous backslashes.
2014-03-21 Glenn Morris <rgm@gnu.org>
 
* cus-start.el (history-length): Bump :version.
......
......@@ -937,7 +937,7 @@ throughout the line.
See `align-rules-list' for more information about these options.
The non-interactive form of the previous example would look something like:
\(align-regexp (point-min) (point-max) \"\\\\(\\\\s-*\\\\)(\")
(align-regexp (point-min) (point-max) \"\\\\(\\\\s-*\\\\)(\")
This function is a nothing more than a small wrapper that helps you
construct a rule to pass to `align-region', which does the real work."
......
......@@ -228,6 +228,10 @@ not try to reindent lines. It is normally better to make the major
mode set `electric-indent-inhibit', but this can be used as a workaround.")
(defun electric-indent-post-self-insert-function ()
"Function that `electric-indent-mode' adds to `post-self-insert-hook'.
This indents if the hook `electric-indent-functions' returns non-nil,
or if a member of `electric-indent-chars' was typed; but not in a string
or comment."
;; FIXME: This reindents the current line, but what we really want instead is
;; to reindent the whole affected text. That's the current line for simple
;; cases, but not all cases. We do take care of the newline case in an
......@@ -286,7 +290,8 @@ mode set `electric-indent-inhibit', but this can be used as a workaround.")
(let ((electric-indent-mode nil))
(newline arg 'interactive)))
;;;###autoload(define-key global-map "\C-j" 'electric-newline-and-maybe-indent)
;;;###autoload
(define-key global-map "\C-j" 'electric-newline-and-maybe-indent)
;;;###autoload
(defun electric-newline-and-maybe-indent ()
"Insert a newline.
......
......@@ -923,10 +923,10 @@ not included in this list."
(setq already pkg)))
(cond
(already
(if (version-list-< next-version (package-desc-version already))
(if (version-list-<= next-version (package-desc-version already))
;; Move to front, so it gets installed early enough (bug#14082).
(setq packages (cons already (delq already packages)))
(error "Need package `%s-%s', but only %s is available"
(error "Need package `%s-%s', but only %s is being installed"
next-pkg (package-version-join next-version)
(package-version-join (package-desc-version already)))))
......
......@@ -164,9 +164,9 @@ schemes (e.g. \"ftp\"); in that case, only convert those URLs."
:version "24.3")
(defcustom ffap-ftp-default-user "anonymous"
"User name in ftp file names generated by `ffap-host-to-path'.
"User name in FTP file names generated by `ffap-host-to-path'.
Note this name may be omitted if it equals the default
\(either `efs-default-user' or `ange-ftp-default-user'\)."
\(either `efs-default-user' or `ange-ftp-default-user')."
:type 'string
:group 'ffap)
......@@ -185,7 +185,7 @@ Note this name may be omitted if it equals the default
"\\|"
"\\(ftp\\|https?\\|telnet\\|gopher\\|www\\|wais\\)://" ; needs host
"\\)")
"Regexp matching the beginning of a URI, for FFAP.
"Regexp matching the beginning of a URI, for ffap.
If the value is nil, disable URL-matching features in ffap.")
(defcustom ffap-foo-at-bar-prefix "mailto"
......@@ -228,7 +228,7 @@ it passes it on to `dired'."
:group 'ffap)
(defcustom ffap-pass-wildcards-to-dired nil
"If non-nil, pass filenames matching `ffap-dired-wildcards' to dired."
"If non-nil, pass filenames matching `ffap-dired-wildcards' to Dired."
:type 'boolean
:group 'ffap)
......@@ -291,8 +291,8 @@ For a fancy alternative, get `ffap-url.el'."
(defcustom dired-at-point-require-prefix nil
"If non-nil, reverse the prefix argument to `dired-at-point'.
This is nil so neophytes notice FFAP. Experts may prefer to
disable FFAP most of the time."
This is nil so neophytes notice ffap. Experts may prefer to
disable ffap most of the time."
:type 'boolean
:group 'ffap
:version "20.3")
......@@ -343,7 +343,7 @@ Only considers strings that match `ffap-next-regexp'."
"Search buffer for next file or URL, and run ffap.
Optional argument BACK says to search backwards.
Optional argument WRAP says to try wrapping around if necessary.
Interactively: use a single prefix to search backwards,
Interactively: use a single prefix \\[universal-argument] to search backwards,
double prefix to wrap forward, triple to wrap backwards.
Actual search is done by the function `ffap-next-guess'."
(interactive
......@@ -413,7 +413,7 @@ See `mail-extr.el' for the known domains."
Depending on the domain (none, known, or unknown), follow the strategy
named by the variable `ffap-machine-p-local', `ffap-machine-p-known',
or `ffap-machine-p-unknown'. Pinging uses `open-network-stream'.
Optional SERVICE specifies the port used \(default \"discard\"\).
Optional SERVICE specifies the port used (default \"discard\").
Optional QUIET flag suppresses the \"Pinging...\" message.
Optional STRATEGY overrides the three variables above.
Returned values:
......@@ -642,7 +642,7 @@ Looks at `ffap-ftp-default-user', returns \"\" for \"localhost\"."
(defun ffap-list-env (env &optional empty)
"Return a list of strings parsed from environment variable ENV.
Optional EMPTY is the default list if \(getenv ENV\) is undefined, and
Optional EMPTY is the default list if (getenv ENV) is undefined, and
also is substituted for the first empty-string component, if there is one.
Uses `path-separator' to separate the path into substrings."
;; We cannot use parse-colon-path (files.el), since it kills
......@@ -787,12 +787,12 @@ This uses `ffap-file-exists-string', which may try adding suffixes from
. ffap-rfc) ; "100% RFC2100 compliant"
(dired-mode . ffap-dired) ; maybe in a subdirectory
)
"Alist of \(KEY . FUNCTION\) pairs parsed by `ffap-file-at-point'.
"Alist of (KEY . FUNCTION) pairs parsed by `ffap-file-at-point'.
If string NAME at point (maybe \"\") is not a file or URL, these pairs
specify actions to try creating such a string. A pair matches if either
KEY is a symbol, and it equals `major-mode', or
KEY is a string, it should match NAME as a regexp.
On a match, \(FUNCTION NAME\) is called and should return a file, an
On a match, (FUNCTION NAME) is called and should return a file, an
URL, or nil. If nil, search the alist for further matches.")
(put 'ffap-alist 'risky-local-variable t)
......@@ -980,7 +980,7 @@ If t, `ffap-tex-init' will initialize this when needed.")
(defcustom ffap-rfc-path
(concat (ffap-host-to-filename "ftp.rfc-editor.org") "/in-notes/rfc%s.txt")
"A `format' string making a filename for RFC documents.
This can be an ange-ftp or tramp remote filename to download, or
This can be an ange-ftp or Tramp remote filename to download, or
a local filename if you have full set of RFCs locally. See also
`ffap-rfc-directories'."
:type 'string
......@@ -1018,8 +1018,8 @@ If a given RFC isn't in these then `ffap-rfc-path' is offered."
;; Mathematica paths: allow backquotes
(math-mode ",-:$+<>@-Z_[:lower:]~`" "<" "@>;.,!?`:")
)
"Alist of \(MODE CHARS BEG END\), where MODE is a symbol,
possibly a major-mode name, or one of the symbol
"Alist of (MODE CHARS BEG END), where MODE is a symbol,
possibly a major-mode name, or one of the symbols
`file', `url', `machine', and `nocolon'.
Function `ffap-string-at-point' uses the data fields as follows:
1. find a maximal string of CHARS around point,
......@@ -1032,8 +1032,8 @@ Function `ffap-string-at-point' uses the data fields as follows:
(defun ffap-string-at-point (&optional mode)
"Return a string of characters from around point.
MODE (defaults to value of `major-mode') is a symbol used to look up string
syntax parameters in `ffap-string-at-point-mode-alist'.
MODE (defaults to value of `major-mode') is a symbol used to look up
string syntax parameters in `ffap-string-at-point-mode-alist'.
If MODE is not found, we use `file' instead of MODE.
If the region is active, return a string from the region.
Sets the variable `ffap-string-at-point' and the variable
......@@ -1143,7 +1143,7 @@ The two subexpressions are the KEY and VALUE.")
;; Icky regexp avoids: default: 123: foo::bar cs:pub
;; It does match on: mic@cs: cs:/pub mathcs.emory.edu: (point at end)
"\\`\\([^:@]+@[^:@]+:\\|[^@.:]+\\.[^@:]+:\\|[^:]+:[~/]\\)\\([^:]\\|\\'\\)")
"Strings matching this are coerced to ftp file names by ffap.
"Strings matching this are coerced to FTP file names by ffap.
That is, ffap just prepends \"/\". Set to nil to disable.")
(defun ffap-file-at-point ()
......@@ -1445,7 +1445,7 @@ and the functions `ffap-file-at-point' and `ffap-url-at-point'."
(defcustom ffap-menu-regexp nil
"If non-nil, regexp overriding `ffap-next-regexp' in `ffap-menu'.
Make this more restrictive for faster menu building.
For example, try \":/\" for URL (and some ftp) references."
For example, try \":/\" for URL (and some FTP) references."
:type '(choice (const nil) regexp)
:group 'ffap)
......@@ -1465,7 +1465,7 @@ These properties may be used to fontify the menu references.")
"Put up a menu of files and URLs mentioned in this buffer.
Then set mark, jump to choice, and try to fetch it. The menu is
cached in `ffap-menu-alist', and rebuilt by `ffap-menu-rescan'.
The optional RESCAN argument \(a prefix, interactively\) forces
The optional RESCAN argument (a prefix, interactively) forces
a rebuild. Searches with `ffap-menu-regexp'."
(interactive "P")
;; (require 'imenu) -- no longer used, but roughly emulated
......@@ -1498,7 +1498,7 @@ a rebuild. Searches with `ffap-menu-regexp'."
(defun ffap-menu-ask (title alist cont)
"Prompt from a menu of choices, and then apply some action.
Arguments are TITLE, ALIST, and CONT \(a continuation function\).
Arguments are TITLE, ALIST, and CONT (a continuation function).
This uses either a menu or the minibuffer depending on invocation.
The TITLE string is used as either the prompt or menu title.
Each ALIST entry looks like (STRING . DATA) and defines one choice.
......
......@@ -227,6 +227,8 @@ detected as prompt when being sent on echoing hosts, therefore.")
'("sudo"
(tramp-login-program "sudo")
(tramp-login-args (("-u" "%u") ("-s") ("-H") ("-p" "Password:")))
;; Local $SHELL could be a nasty one, like zsh or fish. Let's override it.
(tramp-login-env (("SHELL") ("/bin/sh")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-args ("-c"))
(tramp-connection-timeout 10)))
......@@ -4492,6 +4494,9 @@ connection if a previous connection has died for some reason."
(login-args
(tramp-get-method-parameter
l-method 'tramp-login-args))
(login-env
(tramp-get-method-parameter
l-method 'tramp-login-env))
(async-args
(tramp-get-method-parameter
l-method 'tramp-async-args))
......@@ -4549,6 +4554,24 @@ connection if a previous connection has died for some reason."
tramp-current-user (or g-user l-user)
tramp-current-host (or g-host l-host))
;; Add login environment.
(when login-env
(setq
login-env
(mapcar
(lambda (x)
(setq x (mapcar (lambda (y) (format-spec y spec)) x))
(unless (member "" x) (mapconcat 'identity x " ")))
login-env))
(while login-env
(setq command
(format
"%s=%s %s"
(pop login-env)
(tramp-shell-quote-argument (pop login-env))
command)))
(setq command (concat "env " command)))
;; Replace `login-args' place holders.
(setq
l-host (or l-host "")
......
......@@ -230,6 +230,9 @@ pair of the form (KEY VALUE). The following KEYs are defined:
`tramp-make-tramp-temp-file'. \"%k\" indicates the keep-date
parameter of a program, if exists. \"%c\" adds additional
`tramp-ssh-controlmaster-options' options for the first hop.
* `tramp-login-env'
A list of environment variables and their values, which will
be set when calling `tramp-login-program'.
* `tramp-async-args'
When an asynchronous process is started, we know already that
the connection works. Therefore, we can pass additional
......@@ -242,6 +245,9 @@ pair of the form (KEY VALUE). The following KEYs are defined:
* `tramp-copy-args'
This specifies the list of parameters to pass to the above mentioned
program, the hints for `tramp-login-args' also apply here.
* `tramp-copy-env'
A list of environment variables and their values, which will
be set when calling `tramp-copy-program'.
* `tramp-copy-keep-date'
This specifies whether the copying program when the preserves the
timestamp of the original file.
......
......@@ -3,7 +3,7 @@
;; Copyright (C) 2003, 2007-2014 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: XML
;; Keywords: wp, hypermedia, languages, XML
;; This file is part of GNU Emacs.
......
......@@ -3,7 +3,7 @@
;; Copyright (C) 2003, 2007-2014 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: XML
;; Keywords: wp, hypermedia, languages, XML
;; This file is part of GNU Emacs.
......
......@@ -3,7 +3,7 @@
;; Copyright (C) 2003, 2007-2014 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: XML
;; Keywords: wp, hypermedia, languages, XML
;; This file is part of GNU Emacs.
......
......@@ -3,7 +3,7 @@
;; Copyright (C) 2003-2004, 2007-2014 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: XML
;; Keywords: wp, hypermedia, languages, XML
;; This file is part of GNU Emacs.
......
......@@ -3,7 +3,7 @@
;; Copyright (C) 2003, 2007-2014 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: XML
;; Keywords: wp, hypermedia, languages, XML
;; This file is part of GNU Emacs.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment