Commit 9ac6d28a authored by Glenn Morris's avatar Glenn Morris
Browse files

Merge from emacs-24; up to 2014-06-11T19:33:14Z!

parents a0e2175a 436550da
2014-06-26 Eli Zaretskii <>
* notes/unicode: Some notes about what to do when a new Unicode
version is imported.
2014-06-26 Glenn Morris <>
* authors.el: Move here from ../lisp/emacs-lisp.
......@@ -622,11 +622,12 @@ Changes to files in this list are not listed.")
"temacs.opt" "descrip.mms" "" ""
"compact.el" "fadr.el"
"meese.el" "iswitchb.el"
"ledit.el" "meese.el" "iswitchb.el" "longlines.el"
"mh-exec.el" "mh-init.el" "mh-customize.el"
"net/zone-mode.el" "xesam.el"
"term/mac-win.el" "sup-mouse.el"
......@@ -647,6 +648,7 @@ Changes to files in this list are not listed.")
"dns-mode.el" "run-at-time.el" "gnus-encrypt.el" "sha1-el.el"
"gnus-gl.el" "gnus.sum.el" "proto-stream.el" "color.el" "color-lab.el"
"eww.el" "shr-color.el" "shr.el" "earcon.el" "gnus-audio.el" "encrypt.el"
"format-spec.el" "gnus-move.el"
;; doc
"getopt.c" "texindex.c" "news.texi" "vc.texi" "vc2-xtra.texi"
"back.texi" "vol1.texi" "vol2.texi" "elisp-covers.texi" "two.el"
......@@ -752,7 +754,11 @@ in the repository.")
("progmodes/octave-inf.el" . "octave.el")
("progmodes/octave-mod.el" . "octave.el")
;; Obsolete.
("emacs-lisp/assoc.el" . "assoc.el")
("emacs-lisp/cust-print.el" . "cust-print.el")
("mail/mailpost.el" . "mailpost.el")
("play/bruce.el" . "bruce.el")
("play/yow.el" . "yow.el")
("patcomp.el" . "patcomp.el")
;; From lisp to etc/forms.
("forms-d2.el" . "forms-d2.el")
......@@ -771,6 +777,7 @@ in the repository.")
("build-install" . "")
("" . "")
("unidata/Makefile" . "unidata/")
("mac/uvs.el" . "unidata/uvs.el")
;; Moved from top to etc/
("FTP" . "FTP")
......@@ -3,6 +3,39 @@
Copyright (C) 2002-2014 Free Software Foundation, Inc.
See the end of the file for license conditions.
Importing a new Unicode Standard version into Emacs
Emacs uses the following files from the Unicode Character Database
(a.k.a. "UCD):
. UnicodeData.txt
. BidiMirroring.txt
. IVD_Sequences.txt
First, these files need to be copied into admin/unidata/, and then
Emacs should be rebuilt for them to take effect. Rebuilding Emacs
updates several derived files elsewhere in the Emacs source tree,
mainly in lisp/international/.
When Emacs is rebuilt for the first time after importing the new
files, pay attention to any warning or error messages. In particular,
admin/unidata/unidata-gen.el will complain if UnicodeData.txt defines
new bidirectional attributes of characters, because unidata-gen.el,
bidi.c and dispextern.h need to be updated in that case; failure to do
so will cause aborts in redisplay.
Next, review the changes in UnicodeData.txt vs the previous version
used by Emacs. Any changes, be it introduction of new scripts or
addition of codepoints to existing scripts, need corresponding changes
in the data used for filling char-script-table, see characters.el
around line 1300. Other databases and settings in characters.el, such
as the data for char-width-table, might also need changes.
Any new scripts added by UnicodeData.txt will also need updates to
script-representative-chars defined in fontset.el. Other databases in
fontset.el might also need to be updated as needed.
Problems, fixmes and other unicode-related issues
2014-06-26 Glenn Morris <>
* emacs-lisp/cl-macs.el (help-add-fundoc-usage):
Remove outdated declaration.
* emacs-lisp/authors.el (authors-valid-file-names)
(authors-renamed-files-alist): Additions.
2014-06-26 Leo Liu <>
* textmodes/picture.el (picture-set-tab-stops):
* ruler-mode.el (ruler-mode-mouse-add-tab-stop)
(ruler-mode-ruler): Fix to work with nil tab-stop-list.
* progmodes/asm-mode.el (asm-calculate-indentation): Use
* indent.el (indent-accumulate-tab-stops): New function.
2014-06-26 Stefan Monnier <>
* emacs-lisp/package.el (package-list-unsigned): New var (bug#17625).
(package-desc-status): Obey it.
2014-06-26 Stephen Berman <>
* calendar/todo-mode.el: Fix two bugs.
(todo-insert-item--basic): If user cancels item insertion to
another category before setting priority, show original category
whether it is in the same or a different file.
(todo-set-item-priority): After selecting category, instead of
moving point to top, which extends an active region, restore it.
2014-06-26 Stefan Monnier <>
* help-fns.el (describe-function-1): Check file-name is a string before
calling help-fns--autoloaded-p (bug#17564).
2014-06-26 Juri Linkov <>
* desktop.el (desktop-auto-save-enable)
(desktop-auto-save-disable): New functions.
(desktop-save-mode, desktop-auto-save-timeout): Use them.
(desktop-read): Disable the autosave before loading the desktop,
and enable afterwards. (Bug#17351)
2014-06-26 Stefan Monnier <>
Fix some indentation problem with \; and pipes (bug#17842).
* progmodes/sh-script.el (sh-mode-syntax-table): Set syntax of ;|&.
(sh-smie--default-forward-token, sh-smie--default-backward-token):
New functions.
(sh-smie-sh-forward-token, sh-smie-sh-backward-token)
(sh-smie-rc-forward-token, sh-smie-rc-backward-token): Use them.
(sh-smie-sh-rules): Fix indentation of a pipe at BOL.
2014-06-26 Glenn Morris <>
* emacs-lisp/find-func.el (find-function-C-source-directory):
......@@ -12194,7 +12250,7 @@
2013-07-07 Michael Kifer <>
* ediff.el (ediff-version): Version update.
* vc/ediff.el (ediff-version): Version update.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command)
......@@ -12202,19 +12258,21 @@
All are command-line interfaces to ediff: to facilitate calling
Emacs with the appropriate ediff functions invoked.
* viper-cmd.el (viper-del-forward-char-in-insert): New function.
* emulation/viper-cmd.el (viper-del-forward-char-in-insert):
New function.
(viper-save-kill-buffer): Check if buffer is modified.
* viper.el (viper-version): Version update.
* emulation/viper.el (viper-version): Version update.
(viper-emacs-state-mode-list): Add egg-status-buffer-mode.
2013-07-07 Stefan Monnier <>
* faces.el (tty-run-terminal-initialization): Run new tty-setup-hook.
* viper-cmd.el (viper-envelop-ESC-key): Remove function.
* emulation/viper-cmd.el (viper-envelop-ESC-key): Remove function.
(viper-intercept-ESC-key): Simplify.
* viper-keym.el (viper-ESC-key): Make it a constant, don't use kbd.
* viper.el (viper--tty-ESC-filter, viper--lookup-key)
* emulation/viper-keym.el (viper-ESC-key): Make it a constant,
don't use kbd.
* emulation/viper.el (viper--tty-ESC-filter, viper--lookup-key)
(viper-catch-tty-ESC, viper-uncatch-tty-ESC)
(viper-setup-ESC-to-escape): New functions.
(viper-go-away, viper-set-hooks): Call viper-setup-ESC-to-escape.
......@@ -8501,7 +8501,7 @@
2012-07-25 Jay Belanger <>
* calc-alg.el (math-simplify-divide): Don't cross multiply
* calc/calc-alg.el (math-simplify-divide): Don't cross multiply
in an equation when the lhs is a variable.
2012-07-24 Julien Danjou <>
......@@ -1962,13 +1962,12 @@ their associated keys and their effects."
;; If user cancels before setting priority, restore
;; display.
(unless item-added
(if ocat
(set-window-buffer (selected-window) (set-buffer obuf))
(when ocat
(unless (equal cat ocat)
(todo-category-number ocat)
(and done-only (todo-toggle-view-done-only)))
(set-window-buffer (selected-window) (set-buffer obuf)))
(goto-char opoint))
;; If the todo items section is not visible when the
;; insertion command is called (either because only done
......@@ -2553,9 +2552,9 @@ meaning to raise or lower the item's priority by one."
(goto-char (point-min))
(setq done (re-search-forward todo-done-string-start nil t))))
(let ((todo-show-with-done done))
;; Keep top of category in view while setting priority.
(goto-char (point-min)))))
;; Keep current item or top of moved to category in view
;; while setting priority.
(save-excursion (todo-category-select)))))
;; Prompt for priority only when the category has at least one
;; todo item.
(when (> maxnum 1)
......@@ -174,11 +174,8 @@ For further details, see info node `(emacs)Saving Emacs Sessions'."
:global t
:group 'desktop
(if desktop-save-mode
(when (and (integerp desktop-auto-save-timeout)
(> desktop-auto-save-timeout 0))
(add-hook 'window-configuration-change-hook 'desktop-auto-save-set-timer))
(remove-hook 'window-configuration-change-hook 'desktop-auto-save-set-timer)
(defun desktop-save-mode-off ()
"Disable `desktop-save-mode'. Provided for use in hooks."
......@@ -219,9 +216,8 @@ Zero or nil means disable auto-saving due to idleness."
(set-default symbol value)
(if (and (integerp value) (> value 0))
(add-hook 'window-configuration-change-hook 'desktop-auto-save-set-timer)
(remove-hook 'window-configuration-change-hook 'desktop-auto-save-set-timer)
(desktop-auto-save-enable value)
:group 'desktop
:version "24.4")
......@@ -1132,6 +1128,10 @@ Using it may cause conflicts. Use it anyway? " owner)))))
(unless desktop-dirname
(message "Desktop file in use; not loaded.")))
;; Temporarily disable the autosave that will leave it
;; disabled when loading the desktop fails with errors,
;; thus not overwriting the desktop with broken contents.
;; Evaluate desktop buffer and remember when it was modified.
(load (desktop-full-file-name) t t t)
(setq desktop-file-modtime (nth 5 (file-attributes (desktop-full-file-name))))
......@@ -1184,6 +1184,7 @@ Using it may cause conflicts. Use it anyway? " owner)))))
(set-window-prev-buffers window nil)
(set-window-next-buffers window nil))))
(setq desktop-saved-frameset nil)
;; No desktop file found.
......@@ -1230,6 +1231,15 @@ directory DIRNAME."
;; Auto-Saving.
(defvar desktop-auto-save-timer nil)
(defun desktop-auto-save-enable (&optional timeout)
(when (and (integerp (or timeout desktop-auto-save-timeout))
(> (or timeout desktop-auto-save-timeout) 0))
(add-hook 'window-configuration-change-hook 'desktop-auto-save-set-timer)))
(defun desktop-auto-save-disable ()
(remove-hook 'window-configuration-change-hook 'desktop-auto-save-set-timer)
(defun desktop-auto-save ()
"Save the desktop periodically.
Called by the timer created in `desktop-auto-save-set-timer'."
......@@ -382,8 +382,6 @@ its argument list allows full Common Lisp conventions."
(if (car res) `(progn ,(car res) ,form) form))
`(function ,func)))
(declare-function help-add-fundoc-usage "help-fns" (docstring arglist))
(defun cl--make-usage-var (x)
"X can be a var or a (destructuring) lambda-list."
......@@ -836,6 +836,8 @@ GnuPG keyring is located under \"gnupg\" in `package-user-dir'."
(epg-context-result-for context 'verify)))))
(if (null good-signatures)
;; FIXME: Only signal an error if the signature is invalid, not if we
;; simply lack the key needed to check the sig!
(error "Failed to verify signature %s: %S"
(mapcar #'epg-signature-to-string
......@@ -1664,6 +1666,9 @@ package PKG-DESC, add one. The alist is keyed with PKG-DESC."
(defvar package-list-unversioned nil
"If non-nil include packages that don't have a version in `list-package'.")
(defvar package-list-unsigned nil
"If non-nil, mention in the list which packages were installed w/o signature.")
(defun package-desc-status (pkg-desc)
(let* ((name (package-desc-name pkg-desc))
(dir (package-desc-dir pkg-desc))
......@@ -1684,9 +1689,8 @@ package PKG-DESC, add one. The alist is keyed with PKG-DESC."
(dir ;One of the installed packages.
((not (file-exists-p (package-desc-dir pkg-desc))) "deleted")
((eq pkg-desc (cadr (assq name package-alist))) (if signed
((eq pkg-desc (cadr (assq name package-alist)))
(if (or (not package-list-unsigned) signed) "installed" "unsigned"))
(t "obsolete")))
(let* ((ins (cadr (assq name package-alist)))
......@@ -1696,9 +1700,9 @@ package PKG-DESC, add one. The alist is keyed with PKG-DESC."
(if (memq name package-menu--new-package-list)
"new" "available"))
((version-list-< version ins-v) "obsolete")
((version-list-= version ins-v) (if signed
((version-list-= version ins-v)
(if (or (not package-list-unsigned) signed)
"installed" "unsigned"))))))))
(defun package-menu--refresh (&optional packages keywords)
"Re-populate the `tabulated-list-entries'.
2014-06-26 Glenn Morris <>
* mm-util.el (help-function-arglist): Remove outdated declaration.
2014-06-24 Andreas Schwab <>
* html2text.el (html2text-get-attr): Rewrite to handle spaces in quoted
......@@ -1374,8 +1374,6 @@ If INHIBIT is non-nil, inhibit `mm-inhibit-file-name-handlers'."
(write-region start end filename append visit lockname)))
(autoload 'gmm-write-region "gmm-utils")
(declare-function help-function-arglist "help-fns"
(def &optional preserve-names))
;; It is not a MIME function, but some MIME functions use it.
(if (and (fboundp 'make-temp-file)
......@@ -483,7 +483,7 @@ FILE is the file where FUNCTION was probably defined."
(beg (if (and (or (byte-code-function-p def)
(keymapp def)
(memq (car-safe def) '(macro lambda closure)))
(stringp file-name)
(help-fns--autoloaded-p function file-name))
(if (commandp def)
"an interactive autoloaded "
......@@ -677,6 +677,13 @@ If PREV is non-nil, return the previous one instead."
(if (<= column last) -1 (/ (- column last 1) step))
(1+ (/ (- column last) step)))))))))
(defun indent-accumulate-tab-stops (limit)
"Get a list of tab stops before LIMIT (inclusive)."
(let ((tab 0) (tab-stops))
(while (<= (setq tab (indent-next-tab-stop tab)) limit)
(push tab tab-stops))
(nreverse tab-stops)))
(defun tab-to-tab-stop ()
"Insert spaces or tabs to next defined tab-stop column.
The variable `tab-stop-list' is a list of columns at which there are tab stops.
......@@ -172,7 +172,7 @@ Special commands:
;; Simple `;' comments go to the comment-column.
(and (looking-at "\\s<\\(\\S<\\|\\'\\)") comment-column)
;; The rest goes at the first tab stop.
(or (car tab-stop-list) tab-width)))
(or (indent-next-tab-stop 0))))
(defun asm-colon ()
"Insert a colon; if it follows a label, delete the label's indentation."
......@@ -481,6 +481,9 @@ name symbol."
?~ "_"
?, "_"
?= "."
?\; "."
?| "."
?& "."
?< "."
?> ".")
"The syntax table to use for Shell-Script mode.
......@@ -1860,6 +1863,40 @@ Does not preserve point."
((equal tok "in") (sh-smie--sh-keyword-in-p))
(t (sh-smie--keyword-p))))
(defun sh-smie--default-forward-token ()
(forward-comment (point-max))
(progn (if (zerop (skip-syntax-forward "."))
(while (progn (skip-syntax-forward "w_'")
(looking-at "\\\\"))
(forward-char 2)))
(defun sh-smie--default-backward-token ()
(forward-comment (- (point)))
(let ((pos (point))
(n (skip-syntax-backward ".")))
(if (or (zerop n)
(and (eq n -1)
(let ((p (point)))
(if (eq -1 (% (skip-syntax-backward "\\") 2))
(goto-char p)
(progn (skip-syntax-backward "w_'")
(or (not (zerop (skip-syntax-backward "\\")))
(when (eq ?\\ (char-before (1- (point))))
(let ((p (point)))
(forward-char -1)
(if (eq -1 (% (skip-syntax-backward "\\") 2))
(goto-char p)
(goto-char (- (point) (% (skip-syntax-backward "\\") 2))))
(buffer-substring-no-properties (point) pos)))
(defun sh-smie-sh-forward-token ()
(if (and (looking-at "[ \t]*\\(?:#\\|\\(\\s|\\)\\|$\\)")
......@@ -1888,7 +1925,7 @@ Does not preserve point."
(let* ((pos (point))
(tok (smie-default-forward-token)))
(tok (sh-smie--default-forward-token)))
((equal tok ")") "case-)")
((equal tok "(") "case-(")
......@@ -1932,7 +1969,7 @@ Does not preserve point."
(goto-char (match-beginning 1))
(match-string-no-properties 1))
(let ((tok (smie-default-backward-token)))
(let ((tok (sh-smie--default-backward-token)))
((equal tok ")") "case-)")
((equal tok "(") "case-(")
......@@ -1962,18 +1999,18 @@ May return nil if the line should not be treated as continued."
(`(:after . "case-)") (- (sh-var-value 'sh-indent-for-case-alt)
(sh-var-value 'sh-indent-for-case-label)))
((and `(:before . ,_)
(guard (when sh-indent-after-continuation
;; After a line-continuation, make sure the rest is indented.
(guard sh-indent-after-continuation)
(guard (save-excursion
(skip-chars-backward " \t")
;; After a line-continuation, make sure the rest is indented.
(let* ((sh-indent-after-continuation nil)
(indent (smie-indent-calculate))
(initial (sh-smie--continuation-start-indent)))
(when (and (numberp indent) (numberp initial)
(<= indent initial))
`(column . ,(+ initial sh-indentation)))))
(let initial (sh-smie--continuation-start-indent))
(guard (let* ((sh-indent-after-continuation nil)
(indent (smie-indent-calculate)))
(and (numberp indent) (numberp initial)
(<= indent initial)))))
`(column . ,(+ initial sh-indentation)))
(`(:before . ,(or `"(" `"{" `"["))
(when (smie-rule-hanging-p)
(if (not (smie-rule-prev-p "&&" "||" "|"))
......@@ -1997,7 +2034,12 @@ May return nil if the line should not be treated as continued."
(`(:after . ,(or `"|" `"&&" `"||")) (if (smie-rule-parent-p token) nil 4))
(`(:before . ,(or `"|" `"&&" `"||"))
(unless (smie-rule-parent-p token)
(smie-backward-sexp token)
`(column . ,(+ (funcall smie-rules-function :elem 'basic)
;; 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))
......@@ -2118,7 +2160,7 @@ Point should be before the newline."
;; tok))
(let* ((pos (point))
(tok (smie-default-forward-token)))
(tok (sh-smie--default-forward-token)))
;; ((equal tok ")") "case-)")
((and tok (string-match "\\`[a-z]" tok)
......@@ -2159,7 +2201,7 @@ Point should be before the newline."
;; (goto-char (match-beginning 1))
;; (match-string-no-properties 1))
(let ((tok (smie-default-backward-token)))
(let ((tok (sh-smie--default-backward-token)))
;; ((equal tok ")") "case-)")
((and tok (string-match "\\`[a-z]" tok)
......@@ -476,8 +476,9 @@ START-EVENT is the mouse click event."
(not (member ts tab-stop-list))
(message "Tab stop set to %d" ts)
(setq tab-stop-list (sort (cons ts tab-stop-list)
(when (null tab-stop-list)
(setq tab-stop-list (indent-accumulate-tab-stops (1- ts))))
(setq tab-stop-list (sort (cons ts tab-stop-list) #'<)))))))))
(defun ruler-mode-mouse-del-tab-stop (start-event)
"Delete tab stop at the graduation where the mouse pointer is on.
......@@ -753,7 +754,7 @@ Optional argument PROPS specifies other text properties to apply."
i (1+ i) 'help-echo ruler-mode-fill-column-help-echo
;; Show the `tab-stop-list' markers.
((and ruler-mode-show-tab-stops (member j tab-stop-list))
((and ruler-mode-show-tab-stops (= j (indent-next-tab-stop (1- j))))
(aset ruler i ruler-mode-tab-stop-char)
i (1+ i) 'face 'ruler-mode-tab-stop
......@@ -418,7 +418,8 @@ stops computed are displayed in the minibuffer with `:' at each stop."
(let (tabs)
(if arg
(setq tabs (default-value 'tab-stop-list))
(setq tabs (or (default-value 'tab-stop-list)
(indent-accumulate-tab-stops (window-width))))
(let ((regexp (concat "[ \t]+[" (regexp-quote picture-tab-chars) "]")))
(let ((bol (point)))
2014-06-26 Leo Liu <>
* url-http.el (url-http-end-of-headers): Remove duplicate defvar.
* url-handlers.el (url-http-parse-response): Remove unused autoload.
(url-insert-file-contents): Condition on url-http-response-status
for the HTTP/S specific part. (Bug#17549)
2014-05-14 Glenn Morris <>
* url-util.el (url-make-private-file): Use with-file-modes.
......@@ -33,7 +33,6 @@
(autoload 'url-expand-file-name "url-expand" "Convert url to a fully specified url, and canonicalize it.")
(autoload 'mm-dissect-buffer "mm-decode" "Dissect the current buffer and return a list of MIME handles.")
(autoload 'url-scheme-get-property "url-methods" "Get property of a URL SCHEME.")
(autoload 'url-http-parse-response "url-http" "Parse just the response code.")
;; Always used after mm-dissect-buffer and defined in the same file.
(declare-function mm-save-part-to-file "mm-decode" (handle file))
......@@ -308,17 +307,21 @@ They count bytes from the beginning of the body."
(insert data))
(list (length data) charset)))
(defvar url-http-codes)
(defun url-insert-file-contents (url &optional visit beg end replace)
(let ((buffer (url-retrieve-synchronously url)))
(unless buffer (signal 'file-error (list url "No Data")))
(with-current-buffer buffer
(let ((response (url-http-parse-response)))
(if (and (>= response 200) (< response 300))
(goto-char (point-min))
(let ((desc (buffer-substring-no-properties (1+ (point))
;; XXX: This is HTTP/S specific and should be moved to url-http
;; instead. See
(when (bound-and-true-p url-http-response-status)
(unless (and (>= url-http-response-status 200)
(< url-http-response-status 300))
(let ((desc (nth 2 (assq url-http-response-status url-http-codes))))
(kill-buffer buffer)
;; Signal file-error per
(signal 'file-error (list url desc))))))
(if visit (setq buffer-file-name url))
......@@ -333,6 +336,7 @@ They count bytes from the beginning of the body."
;; usual heuristic/rules that we apply to files.
(decode-coding-inserted-region start (point) url visit beg end replace))
(list url (car size-and-charset))))))
(put 'insert-file-contents 'url-file-handlers 'url-insert-file-contents)
(defun url-file-name-completion (url directory &optional predicate)
......@@ -48,7 +48,6 @@
(defvar url-http-response-version)
(defvar url-http-target-url)
(defvar url-http-transfer-encoding)
(defvar url-http-end-of-headers)
(defvar url-show-status)
(require 'url-gw)
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