Commit c400516a authored by Glenn Morris's avatar Glenn Morris
Browse files

Merge from emacs-24; up to 2014-06-06T02:22:40Z!

parents 539ad293 8047f439
2014-06-21 Paul Eggert <>
* Warn about --enable-link-time-optimization's issues
in --help message (Bug#17806).
Port to GCC 4.9.0 with link time optimization (Bug#17806).
* (CFLAGS): With link time optimization,
use -ffat-lto-objects if supported; otherwise Emacs won't
build with GCC 4.9.0.
2014-06-20 Paul Eggert <>
Diagnose failures due to colons in directory names (Bug#17278).
2014-06-21 Stephen Berman <>
* notes/elpa: Use "git" instead of "bzr" in the name of machine to
clone the repository from.
2014-06-13 Glenn Morris <>
* unidata/ (${DSTDIR}/charprop.el):
The GNU Emacs package archive, at, is managed using a Git
repository named "elpa", hosted on Savannah. To check it out:
git clone git://
git clone git://
cd elpa
git remote set-url --push origin git+ssh://
git remote set-url --push origin git+ssh://
[create task branch for edits, etc.]
Changes to this branch propagate to via a "deployment" script run
......@@ -931,8 +931,11 @@ edit_cflags="
[build emacs with link-time optimization.
This is supported for gcc since 4.5.0 and clang.
Note that clang support is experimental - see INSTALL])],
This requires GCC 4.5.0 or later, or clang.
(Note that clang support is experimental - see INSTALL.)
It also makes Emacs harder to debug, and when we tried it
with GCC 4.9.0 x86-64 it made Emacs slower, so it's not
recommended for typical use.])],
if test "${enableval}" != "no"; then
if test $emacs_cv_clang = yes; then
......@@ -970,6 +973,13 @@ if test "${enableval}" != "no"; then
# command, so plugin name is appended to ARFLAGS.
ARFLAGS="cru --plugin $GOLD_PLUGIN"
dnl The following is needed for GCC 4.9.0. The GCC 4.9.0 release notes
dnl suggest that instead of -ffat-lto-objects we should use gcc-ar and
dnl gcc-ranlib in place of ar and ranlib, but gcc-ar makes /usr/bin/ar
dnl dump core on Fedora 20, so play it safe for now.
[CFLAGS="$CFLAGS -ffat-lto-objects"])
2014-06-21 Eli Zaretskii <>
* positions.texi (Screen Lines): Clarify how columns are counted
by vertical-motion.
2014-06-15 Glenn Morris <>
* (bootstrap-clean): New.
......@@ -500,7 +500,11 @@ is negative, it moves up instead.
The @var{count} argument can be a cons cell, @code{(@var{cols}
. @var{lines})}, instead of an integer. Then the function moves by
@var{lines} screen lines, and puts point @var{cols} columns from the
start of that screen line.
visual start of that screen line. Note that @var{cols} are counted
from the @emph{visual} start of the line; if the window is scrolled
horizontally (@pxref{Horizontal Scrolling}), the column on which point
will end is in addition to the number of columns by which the text is
The return value is the number of screen lines over which point was
moved. The value may be less in absolute value than @var{count} if
2014-06-21 Eli Zaretskii <>
* autotype.texi (Skeleton Language): Document the feature of \n
when at eol.
2014-06-21 Michael Albinus <>
* dbus.texi (Type Conversion): Formatting edits in example.
2014-06-15 Michael Albinus <>
Sync with Tramp 2.2.10.
......@@ -232,8 +232,11 @@ Insert string or character. Literal strings and characters are passed through
@code{skeleton-transformation} when that is non-@code{nil}.
@item @code{?\n}
@c ??? something seems very wrong here.
Insert a newline and align under current line. Use newline character
@code{?\n} to prevent alignment.
Insert a newline and align under current line, but not if this is the
last element of a skeleton and the newline would be inserted at end of
line. Use newline character @code{?\n} to prevent alignment. Use
@code{"\n"} as the last string element of a skeleton to insert a
newline after the skeleton unconditionally.
@item @code{_}
Interesting point. When wrapping skeletons around successive regions, they are
put at these places. Point is left at first @code{_} where nothing is wrapped.
......@@ -1060,11 +1060,11 @@ elements of this array. Example:
"" ;; No icon.
"Notification summary" ;; Summary.
(format ;; Body.
"This is a test notification, raised from %s" (emacs-version))
"This is a test notification, raised from\n%S" (emacs-version))
'(:array) ;; No actions (empty array of strings).
'(:array :signature "@{sv@}") ;; No hints
;; (empty array of dictionary entries).
:int32 -1) ;; Default timeout.
:int32 -1) ;; Default timeout.
@result{} 3
@end lisp
2014-06-21 Fabián Ezequiel Gallina <>
Fix completion retrieval parsing (bug#17209).
* progmodes/python.el (python-mode):
(python-util-strip-string): New function.
(python-shell-completion-get-completions): Use it.
2014-06-21 Eli Zaretskii <>
* skeleton.el (skeleton-insert): Fix last change.
2014-06-21 Fabián Ezequiel Gallina <>
Enhancements for outline integration (bug#17796).
* progmodes/python.el (python-mode): Properly set
outline-heading-end-regexp so that comments after colons for
defuns are supported.
2014-06-21 Eli Zaretskii <>
* skeleton.el (skeleton-insert): Doc fix.
2014-06-21 Stefan Monnier <>
* emacs-lisp/smie.el (smie-config--guess): Fix typo.
(smie-config-guess): Use smie-config-local so the rules are obeyed
* mouse.el (mouse-drag-line): Don't re-add to unread-comment-events,
since it's already done inside the loop (bug#17819).
2014-06-21 Martin Rudalics <>
* mouse.el (mouse-drag-line): Re-remove code initially removed
on 2013-03-09 and inadvertently reintroduced on 2013-11-30
2014-06-21 Stefan Monnier <>
* progmodes/sh-script.el (sh-smie-sh-rules): For { after &&, don't
align with the surrounding parent (bug#17721).
2014-06-21 Eli Zaretskii <>
* textmodes/texinfo.el (texinfo-mode): Set skeleton-end-newline
locally to nil.
(texinfo-insert-block, texinfo-insert-@end)
(texinfo-insert-@example, texinfo-insert-@quotation): Adjust to
local setting of skeleton-end-newline by adding an explicit \n to
the skeletons where appropriate. (Bug#17801)
2014-06-21 Stefan Monnier <>
* emacs-lisp/smie.el (smie--hanging-eolp-function): New var.
(smie-indent--hanging-p): Use it.
* progmodes/sh-script.el (sh-set-shell): Set it (bug#17621).
2014-06-21 Leo Liu <>
* simple.el (read-quoted-char): Don't let help chars pop up help
buffer. (Bug#16617)
2014-06-21 Stefan Monnier <>
* progmodes/sh-script.el (sh-smie-sh-rules): Use same rule for && as
for | (bug#17621).
* xt-mouse.el (xterm-mouse--read-event-sequence-1000):
Drop unknown events instead of burping.
2014-06-21 Eli Zaretskii <>
* term/w32-win.el (dynamic-library-alist): Support giflib 5.1.0
and later. (Bug#17790)
2014-06-21 Juri Linkov <>
* dired.el (dired-mark-pop-up): Let-bind display-buffer-mark-dedicated
to `soft'. (Bug#17554)
2014-06-21 Stefan Monnier <>
* delsel.el (electric-newline-and-maybe-indent): Mark it as well
2014-06-21 Dmitry Gutov <>
* progmodes/ruby-mode.el (ruby-font-lock-keywords): Don't fontify
`!' in `!~' with `font-lock-negation-char-face'. (Bug#17732)
2014-06-21 Michael Albinus <>
* net/dbus.el (dbus-call-method): Push only non D-Bus events into
2014-06-19 William Xu <>
* progmodes/hideif.el (hif-string-to-number): Don't return float for
......@@ -188,6 +188,7 @@ See `delete-selection-helper'."
(put 'reindent-then-newline-and-indent 'delete-selection t)
(put 'newline-and-indent 'delete-selection t)
(put 'newline 'delete-selection t)
(put 'electric-newline-and-maybe-indent 'delete-selection t)
(put 'open-line 'delete-selection 'kill)
;; This is very useful for canceling a selection in the minibuffer without
......@@ -3099,7 +3099,10 @@ argument or confirmation)."
;; If FILES defaulted to the current line's file.
(= (length files) 1))
(apply function args)
(let ((buffer (get-buffer-create (or buffer-or-name " *Marked Files*"))))
(let ((buffer (get-buffer-create (or buffer-or-name " *Marked Files*")))
;; Mark *Marked Files* window as softly-dedicated, to prevent
;; other buffers e.g. *Completions* from reusing it (bug#17554).
(display-buffer-mark-dedicated 'soft))
(with-current-buffer buffer
......@@ -1155,6 +1155,15 @@ NUMBER offset by NUMBER, relative to a base token
The functions whose name starts with \"smie-rule-\" are helper functions
designed specifically for use in this function.")
(defvar smie--hanging-eolp-function
;; FIXME: This is a quick hack for 24.4. Don't document it and replace with
;; a well-defined function with a cleaner interface instead!
(lambda ()
(skip-chars-forward " \t")
(or (eolp)
(and ;; (looking-at comment-start-skip) ;(bug#16041).
(forward-comment (point-max))))))
(defalias 'smie-rule-hanging-p 'smie-indent--hanging-p)
(defun smie-indent--hanging-p ()
"Return non-nil if the current token is \"hanging\".
......@@ -1168,10 +1177,7 @@ the beginning of a line."
(not (eobp))
;; Could be an open-paren.
(forward-char 1))
(skip-chars-forward " \t")
(or (eolp)
(and ;; (looking-at comment-start-skip) ;(bug#16041).
(forward-comment (point-max))))
(funcall smie--hanging-eolp-function)
(defalias 'smie-rule-bolp 'smie-indent--bolp)
......@@ -2132,7 +2138,7 @@ position corresponding to each rule."
(push (cons (+ offset (nth 2 sig)) sig) rules)
;; Adjust the rest of the data.
(pcase-dolist ((and cotrace `(,count ,toffset ,trace))
(pcase-dolist ((and cotrace `(,count ,toffset . ,trace))
(setf (nth 1 cotrace) (- toffset offset))
(dolist (sig trace)
......@@ -2161,15 +2167,14 @@ To save the result for future sessions, use `smie-config-save'."
((null config) (message "Nothing to change"))
((null smie-config--buffer-local)
(message "Local rules set")
(setq smie-config--buffer-local config))
(smie-config-local config)
(message "Local rules set"))
((y-or-n-p "Replace existing local config? ")
(message "Local rules replaced")
(setq smie-config--buffer-local config))
(smie-config-local config))
((y-or-n-p "Merge with existing local config? ")
(message "Local rules adjusted")
(setq smie-config--buffer-local
(append config smie-config--buffer-local)))
(smie-config-local (append config smie-config--buffer-local)))
(message "Rules guessed: %S" config)))))
......@@ -390,8 +390,6 @@ must be one of the symbols `header', `mode', or `vertical'."
(window (posn-window start))
(frame (window-frame window))
(minibuffer-window (minibuffer-window frame))
(on-link (and mouse-1-click-follows-link
(mouse-on-link-p start)))
(side (and (eq line 'vertical)
(or (cdr (assq 'vertical-scroll-bars
(frame-parameters frame)))
......@@ -487,15 +485,7 @@ must be one of the symbols `header', `mode', or `vertical'."
(unless (zerop growth)
(setq dragged t)
window (if (eq line 'mode) growth (- growth)) nil t))))))
;; Process the terminating event.
(when (and (mouse-event-p event) on-link (not dragged)
(mouse--remap-link-click-p start-event event))
;; If mouse-2 has never been done by the user, it doesn't have
;; the necessary property to be interpreted correctly.
(put 'mouse-2 'event-kind 'mouse-click)
(setcar event 'mouse-2)
(push event unread-command-events))))
window (if (eq line 'mode) growth (- growth)) nil t))))))))
(defun mouse-drag-mode-line (start-event)
"Change the height of a window by dragging on the mode line."
......@@ -318,10 +318,12 @@ object is returned instead of a list containing this single Lisp object.
(while (eq (car result) :pending)
(let ((event (let ((inhibit-redisplay t) unread-command-events)
(read-event nil nil check-interval))))
(when event
(setf unread-command-events
(nconc unread-command-events
(cons event nil))))
(when event
(if (ignore-errors (dbus-check-event event))
(setf result (gethash key dbus-return-values-table))
(setf unread-command-events
(nconc unread-command-events
(cons event nil)))))
(when (< check-interval 1)
(setf check-interval (* check-interval 1.05))))))
(when (eq (car result) :error)
......@@ -2461,8 +2461,10 @@ LINE is used to detect the context on how to complete given INPUT."
(and completion-code
(> (length input) 0)
(with-current-buffer (process-buffer process)
(let ((completions (python-shell-send-string-no-output
(format completion-code input) process)))
(let ((completions
(format completion-code input) process))))
(and (> (length completions) 2)
(split-string completions
"^'\\|^\"\\|;\\|'$\\|\"$" t)))))))
......@@ -3648,6 +3650,14 @@ returned as is."
n (1- n)))
(reverse acc))))
(defun python-util-strip-string (string)
"Strip STRING whitespace and newlines from end and beginning."
(rx (or (: string-start (* (any whitespace ?\r ?\n)))
(: (* (any whitespace ?\r ?\n)) string-end)))
(defun python-electric-pair-string-delimiter ()
(when (and electric-pair-mode
......@@ -3736,7 +3746,7 @@ returned as is."
(set (make-local-variable 'outline-regexp)
(python-rx (* space) block-start))
(set (make-local-variable 'outline-heading-end-regexp) ":\\s-*\n")
(set (make-local-variable 'outline-heading-end-regexp) ":[^\n]*\n")
(set (make-local-variable 'outline-level)
#'(lambda ()
"`outline-level' function for Python mode."
......@@ -2152,7 +2152,7 @@ See `font-lock-syntax-table'.")
2 font-lock-variable-name-face t)
;; Negation char.
1 font-lock-negation-char-face)
;; Character literals.
;; FIXME: Support longer escape sequences.
......@@ -1975,7 +1975,11 @@ May return nil if the line should not be treated as continued."
(<= indent initial))
`(column . ,(+ initial sh-indentation)))))
(`(:before . ,(or `"(" `"{" `"["))
(if (smie-rule-hanging-p) (smie-rule-parent)))
(when (smie-rule-hanging-p)
(if (not (smie-rule-prev-p "&&" "||" "|"))
(smie-backward-sexp 'halfexp)
`(column . ,(smie-indent-virtual)))))
;; FIXME: Maybe this handling of ;; should be made into
;; a smie-rule-terminator function that takes the substitute ";" as arg.
(`(:before . ,(or `";;" `";&" `";;&"))
......@@ -1993,7 +1997,7 @@ May return nil if the line should not be treated as continued."
(`(:after . "|") (if (smie-rule-parent-p "|") nil 4))
(`(:after . ,(or `"|" `"&&" `"||")) (if (smie-rule-parent-p token) nil 4))
;; Attempt at backward compatibility with the old config variables.
(`(:before . "fi") (sh-var-value 'sh-indent-for-fi))
(`(:before . "done") (sh-var-value 'sh-indent-for-done))
......@@ -2300,6 +2304,11 @@ Calls the value of `sh-set-shell-hook' if set."
(let ((mksym (lambda (name)
(intern (format "sh-smie-%s-%s"
sh-indent-supported-here name)))))
(add-function :around (local 'smie--hanging-eolp-function)
(lambda (orig)
(if (looking-at "[ \t]*\\\\\n")
(goto-char (match-end 0))
(funcall orig))))
(smie-setup (symbol-value (funcall mksym "grammar"))
(funcall mksym "rules")
:forward-token (funcall mksym "forward-token")
......@@ -658,11 +658,16 @@ any other terminator is used itself as input.
The optional argument PROMPT specifies a string to use to prompt the user.
The variable `read-quoted-char-radix' controls which radix to use
for numeric input."
(let ((message-log-max nil) done (first t) (code 0) translated)
(let ((message-log-max nil)
(help-events (delq nil (mapcar (lambda (c) (unless (characterp c) c))
done (first t) (code 0) translated)
(while (not done)
(let ((inhibit-quit first)
;; Don't let C-h get the help message--only help function keys.
;; Don't let C-h or other help chars get the help
;; message--only help function keys. See bug#16617.
(help-char nil)
(help-event-list help-events)
"Type the special character you want to use,
or the octal character code.
......@@ -197,7 +197,8 @@ not needed, a prompt-string or an expression for complex read functions.
If ELEMENT is a string or a character it gets inserted (see also
`skeleton-transformation-function'). Other possibilities are:
\\n go to next line and indent according to mode
\\n if not the last element of the skeleton, or not at eol,
go to next line and indent according to mode
_ interesting point, interregion here
- interesting point, no interregion interaction, overrides
interesting point set by _
......@@ -212,6 +213,10 @@ If ELEMENT is a string or a character it gets inserted (see also
After termination, point will be positioned at the last occurrence of -
or at the first occurrence of _ or at the end of the inserted text.
Note that \\n as the last element of the skeleton only inserts a
newline if not at eol. If you want to unconditionally insert a newline
at the end of the skeleton, use \"\\n\" instead.
Further elements can be defined via `skeleton-further-elements'.
ELEMENT may itself be a SKELETON with an INTERACTOR. The user is prompted
repeatedly for different inputs. The SKELETON is processed as often as
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