Commit 31e7d6e0 authored by Kenichi Handa's avatar Kenichi Handa
Browse files

merge trunk

parents 4eb4de01 f17e1d00
2012-08-28 Glenn Morris <rgm@gnu.org>
* bzrmerge.el (bzrmerge-merges): Allow unversioned files in the tree.
2012-08-28 Andreas Schwab <schwab@linux-m68k.org>
* charsets/mule-charsets.el (header): Fix typo.
2012-08-24 Paul Eggert <eggert@cs.ucla.edu>
On assertion failure, print backtrace if available.
......
......@@ -45,16 +45,23 @@ The list returned is sorted by oldest-first."
(erase-buffer)
;; We generally want to make sure we start with a clean tree, but we also
;; want to allow restarts (i.e. with some part of FROM already merged but
;; not yet committed).
;; not yet committed). Unversioned (unknown) files in the tree
;; are also ok.
(call-process "bzr" nil t nil "status" "-v")
(goto-char (point-min))
(when (re-search-forward "^conflicts:\n" nil t)
(error "You still have unresolved conflicts"))
(let ((merges ()))
(let ((merges ())
found)
(if (not (re-search-forward "^pending merges:\n" nil t))
(when (save-excursion
(goto-char (point-min))
(re-search-forward "^[a-z ]*:\n" nil t))
(while (and
(re-search-forward "^\\([a-z ]*\\):\n" nil t)
(not
(setq found
(not (equal "unknown" (match-string 1)))))))
found)
(error "You still have uncommitted changes"))
;; This is really stupid, but it seems there's no easy way to figure
;; out which revisions have been merged already. The only info I can
......
......@@ -45,7 +45,7 @@
(defconst header
(format
"# Generated by running amdin/charsets/mule-charsets.el in Emacs %d.%d.\n"
"# Generated by running admin/charsets/mule-charsets.el in Emacs %d.%d.\n"
emacs-major-version emacs-minor-version))
(dolist (elt charset-alist)
......
2012-08-28 Andreas Schwab <schwab@linux-m68k.org>
* charsets/MULE-ethiopic.map: Fix typo in comment.
* charsets/MULE-ipa.map: Likewise.
* charsets/MULE-is13194.map: Likewise.
* charsets/MULE-lviscii.map: Likewise.
* charsets/MULE-sisheng.map: Likewise.
* charsets/MULE-tibetan.map: Likewise.
* charsets/MULE-uviscii.map: Likewise.
2012-08-09 Chong Yidong <cyd@gnu.org>
* images/splash.svg, images/splash.png: Tweak SVG paths to improve
......
......@@ -207,6 +207,8 @@ It copies the region-rectangle as the last rectangle kill.
* Changes in Specialized Modes and Packages in Emacs 24.3
** Compilation has a new `compilation-always-kill' configuration variable.
** Term changes
The variables `term-default-fg-color' and `term-default-bg-color' are
......@@ -588,6 +590,8 @@ are deprecated and will be removed eventually.
* Lisp changes in Emacs 24.3
** New minor mode `read-only-mode' to replace toggle-read-only (now obsolete).
** New functions `autoloadp' and `autoload-do-load'.
** New function `posnp' to test if an object is a `posn'.
......
# Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3.
# Generated by running admin/charsets/mule-charsets.el in Emacs 22.3.
0x2121 0x1200
0x2122 0x1201
0x2123 0x1202
......
# Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3.
# Generated by running admin/charsets/mule-charsets.el in Emacs 22.3.
0x20 0x0069
0x21 0x026A
0x22 0x0065
......
# Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3.
# Generated by running admin/charsets/mule-charsets.el in Emacs 22.3.
0x21 0x0901
0x22 0x0902
0x23 0x0903
......
# Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3.
# Generated by running admin/charsets/mule-charsets.el in Emacs 22.3.
0x21 0x1EAF
0x22 0x1EB1
0x23 0x1EB7
......
# Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3.
# Generated by running admin/charsets/mule-charsets.el in Emacs 22.3.
0x21 0x0101
0x22 0x00E1
0x23 0x01CE
......
# Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3.
# Generated by running admin/charsets/mule-charsets.el in Emacs 22.3.
0x2130 0x0F00
0x2131 0x0F01
0x2132 0x0F02
......
# Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3.
# Generated by running admin/charsets/mule-charsets.el in Emacs 22.3.
0x21 0x1EAE
0x22 0x1EB0
0x23 0x1EB6
......
2012-08-30 Andreas Schwab <schwab@linux-m68k.org>
* progmodes/compile.el (compilation-always-kill): Doc fix.
2012-08-30 Chong Yidong <cyd@gnu.org>
* window.el (display-buffer-reuse-frames): Make the obsolescence
message more informative.
2012-08-30 Glenn Morris <rgm@gnu.org>
* paren.el (show-paren-delay):
Add a :set function. Doc fix. (Bug#12297)
2012-08-29 Martin Blais <blais@furius.ca> (tiny change)
* progmodes/compile.el (compilation-always-kill): New var.
(compilation-start): Use it.
2012-08-29 Stefan Monnier <monnier@iro.umontreal.ca>
* simple.el (read-only-mode): Move from files.el for bootstrapping.
* files.el (read-only-mode): Move to simple.el.
* files.el (read-only-mode): New minor mode.
(toggle-read-only): Use it and mark obsolete.
(find-file--read-only):
* vc/vc.el (vc-next-action, vc-checkout):
* vc/vc-cvs.el (vc-cvs-checkout):
* obsolete/vc-mcvs.el (vc-mcvs-update):
* ffap.el (ffap--toggle-read-only): Update callers.
2012-08-29 Michael Albinus <michael.albinus@gmx.de>
* eshell/esh-ext.el (eshell-external-command): Do not examine
remote shell scripts. See
<https://bugs.launchpad.net/ubuntu/+source/emacs23/+bug/1035790>.
* net/tramp-sh.el (tramp-remote-path): Add "/sbin" and
"/usr/local/sbin".
2012-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/cl-lib.el (buffer-string): Fix setter macro (bug#12293).
2012-08-28 Leo Liu <sdl.web@gmail.com>
* progmodes/sh-script.el (sh-dynamic-complete-functions): Adapt to
completion-at-point. (Bug#12220)
* skeleton.el (skeleton-untabify): Change to nil (bug#12223).
* progmodes/sh-script.el (sh-indent-comment): Change to t (bug#12267).
2012-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
* files.el (safe-local-eval-forms): Fix before-save-hook entry to
be buffer-local; add delete-trailing-whitespace (bug#12259).
2012-08-28 Jeremy Moore <jmoore@ieee.org> (tiny change)
* progmodes/hideif.el (hif-compress-define-list):
Fix typo. (Bug#11951)
2012-08-28 Dan Nicolaescu <dann@gnu.org>
* progmodes/hideshow.el (hs-block-end-regexp): Restore lost
buffer local setting.
* net/rcirc.el (rcirc-split-message): Fix for buffer-local
rcirc-encode-coding-system.
2012-08-28 Leo Liu <sdl.web@gmail.com>
* net/rcirc.el (rcirc-split-message): New function.
(rcirc-send-message): Use it. (Bug#12051)
2012-08-28 Juri Linkov <juri@jurta.org>
 
* info.el (Info-fontify-node): Hide empty lines at the end of
......@@ -21,8 +98,8 @@
 
2012-08-26 Chong Yidong <cyd@gnu.org>
 
* progmodes/gdb-mi.el (gdb-display-buffer-other-frame-action): New
variable, replacing gdb-frame-parameters.
* progmodes/gdb-mi.el (gdb-display-buffer-other-frame-action):
New variable, replacing gdb-frame-parameters.
(gdb-frame-io-buffer, gdb-frame-breakpoints-buffer)
(gdb-frame-threads-buffer, gdb-frame-memory-buffer)
(gdb-frame-disassembly-buffer, gdb-frame-stack-buffer)
......@@ -98,17 +175,17 @@
 
2012-08-22 Martin Rudalics <rudalics@gmx.at>
 
* window.el (walk-window-tree, window-with-parameter): New
optional argument MINIBUF to control whether these functions
* window.el (walk-window-tree, window-with-parameter):
New optional argument MINIBUF to control whether these functions
should run on the minibuffer window.
(window-at-side-list): Don't operate on minibuffer window.
(window-in-direction): Simplify and rewrite doc-string.
(window--size-ignore): Rename to window--size-ignore-p. Update
callers.
(window--size-ignore): Rename to window--size-ignore-p.
Update callers.
(display-buffer-in-atom-window, window--major-non-side-window)
(window--major-side-window, display-buffer-in-major-side-window)
(delete-side-window, display-buffer-in-side-window): New
functions.
(delete-side-window, display-buffer-in-side-window):
New functions.
(window--side-check, window-deletable-p, delete-window)
(delete-other-windows, split-window): Handle side windows and
atomic windows appropriately.
......@@ -160,8 +237,8 @@
* window.el (window-point-1, set-window-point-1): Remove.
(window-in-direction, record-window-buffer)
(set-window-buffer-start-and-point, split-window-below)
(window--state-get-1, display-buffer-record-window): Replace
calls to window-point-1 and set-window-point-1 by calls to
(window--state-get-1, display-buffer-record-window):
Replace calls to window-point-1 and set-window-point-1 by calls to
window-point and set-window-point respectively.
 
2012-08-21 Glenn Morris <rgm@gnu.org>
......@@ -279,8 +356,8 @@
(yank-excluded-properties): Add font-lock-face and category.
(yank): Doc fix.
 
* subr.el (remove-yank-excluded-properties): Obey
yank-handled-properties. The special handling of font-lock-face
* subr.el (remove-yank-excluded-properties):
Obey yank-handled-properties. The special handling of font-lock-face
and category is now done this way, instead of being hard-coded.
(insert-for-yank-1): Remove font-lock-face handling.
(yank-handle-font-lock-face-property)
......@@ -294,8 +371,8 @@
 
2012-08-17 Michael Albinus <michael.albinus@gmx.de>
 
* net/tramp-sh.el (tramp-sh-handle-start-file-process): Eliminate
superfluous prompt. (Bug#12203)
* net/tramp-sh.el (tramp-sh-handle-start-file-process):
Eliminate superfluous prompt. (Bug#12203)
 
2012-08-17 Chong Yidong <cyd@gnu.org>
 
......@@ -322,8 +399,8 @@
(next-buffer, previous-buffer, split-window, balance-windows-2)
(set-window-text-height, window-buffer-height)
(fit-window-to-buffer, shrink-window-if-larger-than-buffer)
(truncated-partial-width-window-p): Minor code adjustments. In
doc-strings state whether the argument window has to denote a
(truncated-partial-width-window-p): Minor code adjustments.
In doc-strings state whether the argument window has to denote a
live, valid or any window.
 
2012-08-16 Phil Sainty <psainty@orcon.net.nz> (tiny change)
......@@ -566,6 +643,7 @@
* files.el (hack-local-variables-filter): If an eval: form is not
known to be safe, and enable-local-variables is :safe, then ignore
the form totally, as is done for non-eval forms. (Bug#12155)
This is CVE-2012-3479.
 
2012-08-10 Stefan Monnier <monnier@iro.umontreal.ca>
 
......
......@@ -635,7 +635,7 @@ If ALIST is non-nil, the new pairs are prepended to it."
(set-buffer-modified-p ,flag)))
(gv-define-simple-setter buffer-name rename-buffer t)
(gv-define-setter buffer-string (store)
`(progn (erase-buffer) (insert ,store)))
`(insert (prog1 ,store (erase-buffer))))
(gv-define-simple-setter buffer-substring cl--set-buffer-substring)
(gv-define-simple-setter current-buffer set-buffer)
(gv-define-simple-setter current-case-table set-case-table)
......
......@@ -191,8 +191,9 @@ well for simple place forms.
Assignments of VAL to (NAME ARGS...) are expanded by binding the argument
forms (VAL ARGS...) according to ARGLIST, then executing BODY, which must
return a Lisp form that does the assignment.
Actually, ARGLIST may be bound to temporary variables which are introduced
automatically to preserve proper execution order of the arguments. Example:
The first arg in ARLIST (the one that receives VAL) receives an expression
which can do arbitrary things, whereas the other arguments are all guaranteed
to be pure and copyable. Example use:
(gv-define-setter aref (v a i) `(aset ,a ,i ,v))"
(declare (indent 2) (debug (&define name sexp body)))
`(gv-define-expander ,name
......
......@@ -209,7 +209,11 @@ causing the user to wonder if anything's really going on..."
(setq args (eshell-stringify-list (eshell-flatten-list args)))
;; (if (file-remote-p default-directory)
;; (eshell-remote-command command args))
(let ((interp (eshell-find-interpreter command)))
(let ((interp (eshell-find-interpreter
command
;; Do not examine remote shell scripts.
(or (and (stringp command) (file-remote-p command))
(file-remote-p default-directory)))))
(cl-assert interp)
(if (functionp (car interp))
(apply (car interp) (append (cdr interp) args))
......
......@@ -1703,7 +1703,7 @@ Only intended for interactive use."
buffer-or-list
(list buffer-or-list)))
(with-current-buffer buffer
(toggle-read-only 1))))
(read-only-mode 1))))
(defun ffap-read-only ()
"Like `ffap', but mark buffer as read-only.
......
......@@ -1456,7 +1456,7 @@ file names with wildcards."
(file-exists-p filename))
(error "%s does not exist" filename))
(let ((value (funcall fun filename wildcards)))
(mapc (lambda (b) (with-current-buffer b (toggle-read-only 1)))
(mapc (lambda (b) (with-current-buffer b (read-only-mode 1)))
(if (listp value) value (list value)))
value))
......@@ -2837,7 +2837,8 @@ symbol and VAL is a value that is considered safe."
;; This should be here at least as long as Emacs supports write-file-hooks.
'((add-hook 'write-file-hooks 'time-stamp)
(add-hook 'write-file-functions 'time-stamp)
(add-hook 'before-save-hook 'time-stamp))
(add-hook 'before-save-hook 'time-stamp nil t)
(add-hook 'before-save-hook 'delete-trailing-whitespace nil t))
"Expressions that are considered safe in an `eval:' local variable.
Add expressions to this list if you want Emacs to evaluate them, when
they appear in an `eval' local variable specification, without first
......@@ -4817,51 +4818,12 @@ prints a message in the minibuffer. Instead, use `set-buffer-modified-p'."
"Modification-flag cleared"))
(set-buffer-modified-p arg))
(defun toggle-read-only (&optional arg message)
"Toggle the read-only state of the current buffer.
With prefix argument ARG, make the buffer read-only if ARG is
positive; otherwise make it writable.
When making the buffer read-only, enable View mode if
`view-read-only' is non-nil. When making the buffer writable,
disable View mode if View mode is enabled.
If called interactively, or if called from Lisp with MESSAGE
non-nil, print a message reporting the buffer's new read-only
status.
Do not call this from a Lisp program unless you really intend to
do the same thing as the \\[toggle-read-only] command, including
possibly enabling or disabling View mode. Also, note that this
command works by setting the variable `buffer-read-only', which
does not affect read-only regions caused by text properties. To
ignore read-only status in a Lisp program (whether due to text
properties or buffer state), bind `inhibit-read-only' temporarily
to a non-nil value."
(interactive "P")
(cond
;; Do nothing if `buffer-read-only' already matches the state
;; specified by ARG.
((and arg
(if (> (prefix-numeric-value arg) 0)
buffer-read-only
(not buffer-read-only))))
;; If View mode is enabled, exit it.
((and buffer-read-only view-mode)
(View-exit-and-edit)
(set (make-local-variable 'view-read-only) t))
;; If `view-read-only' is non-nil, enable View mode.
((and view-read-only
(not buffer-read-only)
(not view-mode)
(not (eq (get major-mode 'mode-class) 'special)))
(view-mode-enter))
;; The usual action: flip `buffer-read-only'.
(t (setq buffer-read-only (not buffer-read-only))
(force-mode-line-update)))
(if (or message (called-interactively-p 'interactive))
(message "Read-only %s for this buffer"
(if buffer-read-only "enabled" "disabled"))))
(defun toggle-read-only (&optional arg interactive)
(declare (obsolete read-only-mode "24.3"))
(interactive (list current-prefix-arg t))
(if interactive
(call-interactively 'read-only-mode)
(read-only-mode (or arg 'toggle))))
(defun insert-file (filename)
"Insert contents of file FILENAME into buffer after point.
......
2012-08-29 Julien Danjou <julien@danjou.info>
* gnus-notifications.el: New file.
(gnus-notifications-notify): New function.
(gnus-notifications): Use `gnus-notifications-notify'.
2012-08-28 Katsumi Yamaoka <yamaoka@jpl.org>
 
* gnus-sum.el (gnus-summary-enter-digest-group): Decode content
......
;; gnus-notifications.el -- Send notification on new message in Gnus
;; Copyright (C) 2012 Free Software Foundation, Inc.
;; Author: Julien Danjou <julien@danjou.info>
;; Keywords: news
;; This file is part of GNU Emacs.
;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This implements notifications using `notifications-notify' on new
;; messages received.
;; Use (add-hook 'gnus-after-getting-new-news-hook 'gnus-notifications)
;; to get notifications just after getting the new news.
;;; Code:
(require 'notifications nil t)
(require 'gnus-sum)
(require 'gnus-group)
(require 'gnus-int)
(require 'gnus-art)
(require 'gnus-util)
(require 'google-contacts nil t) ; Optional
(defgroup gnus-notifications nil
"Send notifications on new message in Gnus."
:group 'gnus)
(defcustom gnus-notifications-use-google-contacts t
"Use Google Contacts to retrieve photo."
:type 'boolean
:group 'gnus-notifications)
(defcustom gnus-notifications-use-gravatar t
"Use Gravatar to retrieve photo."
:type 'boolean
:group 'gnus-notifications)
(defcustom gnus-notifications-minimum-level 1
"Minimum group level the message should have to be notified.
Any message in a group that has a greater value than this will
not get notifications."
:type 'integer
:group 'gnus-notifications)
(defvar gnus-notifications-sent nil
"Notifications already sent.")
(defun gnus-notifications-notify (from subject photo-file)
"Send a notification about a new mail."
(if (fboundp 'notifications-notify)
(notifications-notify
:title from
:body subject
:app-icon (image-search-load-path "gnus/gnus.png")
:app-name "Gnus"
:category "email.arrived"
:image-path photo-file)
(message "New message from %s: %s" from subject)))
(defun gnus-notifications-get-photo (mail-address)
"Get photo for mail address."
(let ((google-photo (when (and gnus-notifications-use-google-contacts
(fboundp 'google-contacts-get-photo))
(ignore-errors
(google-contacts-get-photo mail-address)))))
(if google-photo
google-photo
(when gnus-notifications-use-gravatar
(let ((gravatar (ignore-errors
(gravatar-retrieve-synchronously mail-address))))
(if (eq gravatar 'error)
nil
(plist-get (cdr gravatar) :data)))))))
(defun gnus-notifications-get-photo-file (mail-address)
"Get a temporary file with an image for MAIL-ADDRESS.
You have to delete the temporary image yourself using
`delete-image'.
Returns nil if no image found."
(let ((photo (gnus-notifications-get-photo mail-address)))
(when photo
(let ((photo-file (make-temp-file "gnus-notifications-photo-"))
(coding-system-for-write 'binary))
(with-temp-file photo-file
(insert photo))
photo-file))))
;;;###autoload
(defun gnus-notifications ()
"Send a notification on new message.
This check for new messages that are in group with a level lower
or equal to `gnus-notifications-minimum-level' and send a
notification using `notifications-notify' for it.
This is typically a function to add in
`gnus-after-getting-new-news-hook'"
(dolist (entry gnus-newsrc-alist)
(let ((group (car entry)))
;; Check that the group level is less than
;; `gnus-notifications-minimum-level' and the the group has unread
;; messages.
(when (and (<= (gnus-group-level group) gnus-notifications-minimum-level)
(let ((unread (gnus-group-unread group)))
(and (numberp unread)
(> unread 0))))
;; Each group should have an entry in the `gnus-notifications-sent'
;; alist. If not, we add one at this time.
(let ((group-notifications (or (assoc group gnus-notifications-sent)
;; Nothing, add one and return it.
(assoc group
(add-to-list
'gnus-notifications-sent
(cons group nil))))))
(dolist (article (gnus-list-of-unread-articles group))
;; Check if the article already has been notified
(unless (memq article (cdr group-notifications))
(with-current-buffer nntp-server-buffer
(gnus-request-head article group)
(article-decode-encoded-words) ; to decode mail addresses, subjects, etc
(let* ((address-components (mail-extract-address-components
(or (mail-fetch-field "From") "")))
(address (cadr address-components))
(photo-file (gnus-notifications-get-photo-file
address)))
(when (or
;; Ignore mails from ourselves
(gnus-string-match-p gnus-ignored-from-addresses
address)
(gnus-notifications-notify
(or (car address-components) address)
(mail-fetch-field "Subject")
photo-file))
;; Register that we did notify this message
(setcdr group-notifications (cons article (cdr group-notifications))))
(when photo-file
(delete-file photo-file)))))))))))
(provide 'gnus-notifications)
;;; gnus-notifications.el ends here
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