Merge from trunk.

This commit is contained in:
Paul Eggert 2012-04-10 14:59:42 -07:00
commit 1530927cb9
38 changed files with 5710 additions and 180 deletions

View file

@ -1,4 +1,4 @@
2012-04-09 Paul Eggert <eggert@cs.ucla.edu>
2012-04-10 Paul Eggert <eggert@cs.ucla.edu>
configure: new option --enable-gcc-warnings (Bug#11207)
I have been using this change for many months in my private copy
@ -15,11 +15,13 @@
* lib/Makefile.am (AM_CFLAGS): New macro.
* m4/manywarnings.m4, m4/warnings.m4: New files, from gnulib.
2012-04-10 Glenn Morris <rgm@gnu.org>
* configure.in: Conditionally generate admin/unidata/Makefile.
2012-04-09 Teodor Zlatanov <tzz@lifelogs.com>
* info/dir (File):
* Makefile.in: Add emacs-gnutls to the info directory and the
INFO_FILES target.
* info/dir, Makefile.in (INFO_FILES): Add emacs-gnutls manual.
2012-04-09 Glenn Morris <rgm@gnu.org>

View file

@ -1,3 +1,10 @@
2012-04-10 Glenn Morris <rgm@gnu.org>
* bzrmerge.el (bzrmerge-skip-regexp): Add "from trunk".
* unidata/Makefile.in: Add FSF copyright.
Make it use autoconf features, and work for out-of-tree builds.
2012-04-07 Eli Zaretskii <eliz@gnu.org>
* unidata/README:

View file

@ -1,9 +1,9 @@
;;; bzrmerge.el --- help merge one Emacs bzr branch to another
;; Copyright (C) 2010-2012 Free Software Foundation, Inc.
;; Copyright (C) 2010-2012 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords:
;; Keywords: maint
;; 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
@ -28,7 +28,7 @@
(require 'cl)) ; assert
(defvar bzrmerge-skip-regexp
"back[- ]?port\\|merge\\|sync\\|re-?generate\\|bump version"
"back[- ]?port\\|merge\\|sync\\|re-?generate\\|bump version\\|from trunk"
"Regexp matching logs of revisions that might be skipped.
`bzrmerge-missing' will ask you if it should skip any matches.")

View file

@ -1,4 +1,7 @@
# Makefile -- Makefile to generate character property tables.
# Copyright (C) 2012 Free Software Foundation, Inc.
# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
# National Institute of Advanced Industrial Science and Technology (AIST)
# Registration Number H13PRO009
@ -18,25 +21,33 @@
# You should have received a copy of the GNU General Public License
# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
SHELL = /bin/sh
EMACS = ../../src/emacs
DSTDIR = ../../lisp/international
RUNEMACS = ${EMACS} -Q -batch
srcdir = @srcdir@
abs_builddir = @abs_builddir@
top_srcdir = @top_srcdir@
abs_top_builddir = @abs_top_builddir@
EMACS = ${abs_top_builddir}/src/emacs
DSTDIR = ${top_srcdir}/lisp/international
emacs = ${EMACS} -batch --no-site-file --no-site-lisp
all: ${DSTDIR}/charprop.el
.el.elc:
${RUNEMACS} -batch -f batch-byte-compile $<
${emacs} -f batch-byte-compile $<
unidata.txt: UnicodeData.txt
sed -e 's/\([^;]*\);\(.*\)/(#x\1 "\2")/' -e 's/;/" "/g' < UnicodeData.txt > $@
unidata.txt: ${srcdir}/UnicodeData.txt
sed -e 's/\([^;]*\);\(.*\)/(#x\1 "\2")/' -e 's/;/" "/g' < ${srcdir}/UnicodeData.txt > $@
${DSTDIR}/charprop.el: unidata-gen.elc unidata.txt
ELC=`/bin/pwd`/unidata-gen.elc; \
DATADIR=`/bin/pwd`; \
DATA=unidata.txt; \
cd ${DSTDIR}; \
${RUNEMACS} -batch --load $${ELC} -f unidata-gen-files $${DATADIR} $${DATA}
${DSTDIR}/charprop.el: ${srcdir}/unidata-gen.elc unidata.txt
cd ${DSTDIR} && ${emacs} -l ${srcdir}/unidata-gen \
-f unidata-gen-files ${srcdir} ${abs_builddir}/unidata.txt
## Like the above, but generate in PWD rather than lisp/international.
charprop.el: ${srcdir}/unidata-gen.elc unidata.txt
${emacs} -l ${srcdir}/unidata-gen \
-f unidata-gen-files ${srcdir} unidata.txt
install: charprop.el
cp charprop.el ${DSTDIR}
@ -46,4 +57,9 @@ clean:
if test -f charprop.el; then \
rm -f `sed -n 's/^;; FILE: //p' < charprop.el`; \
fi
rm -f charprop.el unidata-gen.elc unidata.txt
rm -f charprop.el ${srcdir}/unidata-gen.elc unidata.txt
distclean: clean
-rm -f ./Makefile
maintainer-clean: distclean

11
autogen/configure vendored
View file

@ -22430,6 +22430,16 @@ if test -f $srcdir/${opt_makefile}.in; then
fi
opt_makefile=admin/unidata/Makefile
if test -f $srcdir/${opt_makefile}.in; then
SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
ac_config_files="$ac_config_files admin/unidata/Makefile"
fi
SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
@ -23259,6 +23269,7 @@ do
"lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
"leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
"test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;;
"admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;;
"mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;;
"epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;;
"gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;;

View file

@ -3913,6 +3913,16 @@ if test -f $srcdir/${opt_makefile}.in; then
AC_CONFIG_FILES([test/automated/Makefile])
fi
dnl admin/ may or may not be present.
opt_makefile=admin/unidata/Makefile
if test -f $srcdir/${opt_makefile}.in; then
SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
AC_CONFIG_FILES([admin/unidata/Makefile])
fi
SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
AC_SUBST(SUBDIR_MAKEFILES_IN)

View file

@ -1,3 +1,7 @@
2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
* publicsuffix.txt: New file (bug#1401).
2012-04-02 Alan Mackenzie <acm@muc.de>
* NEWS: Add CC Mode entries.

View file

@ -46,6 +46,10 @@ been adding them there, put them somewhere else, eg site-lisp.
* Editing Changes in Emacs 24.2
* Changes in Specialized Modes and Packages in Emacs 24.2
** erc will look up server/channel names via auth-source and use the
channel keys found, if any.
* New Modes and Packages in Emacs 24.2

5189
etc/publicsuffix.txt Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,76 @@
2012-04-10 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/autoload.el (autoload-make-program): Remove, unused.
* international/quail.el: Use dolist and simplify.
(quail-define-package, quail-update-keyboard-layout)
(quail-define-rules): Use dolist.
(quail-insert-kbd-layout, quail-get-translation): CSE.
* tmm.el: Use dolist, remove left over hook.
(tmm-prompt, tmm-define-keys, tmm-shortcut, tmm-get-keybind):
Use dolist.
(calendar-load-hook): Don't mess with it.
* vc/vc-annotate.el (vc-annotate-show-diff-revision-at-line-internal):
Use derived-mode-p. Run the diff asynchronously.
2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
* obsolete/mouse-sel.el: Add an Obsolete-since header.
2012-04-10 Juanma Barranquero <lekktu@gmail.com>
* misc.el: Display absolute path of loaded DLLs (bug#10424).
(list-dynamic-libraries--loaded): New function.
(list-dynamic-libraries--refresh): Use it.
2012-04-10 Nathan Weizenbaum <nweiz@google.com>
* progmodes/python.el (python-fill-paragraph):
Make python-fill-region in a multiline string work when font-lock is
disabled (bug#7018).
2012-04-10 Laimonas Vėbra <laimonas.vebra@gmail.com> (tiny change)
* language/european.el (cp775): Add oem/legacy (en)coding on
DOS/MS Windows for the Baltic languages. There are still plenty of
texts written in this encoding/codepage (bug#6519).
2012-04-10 Glenn Morris <rgm@gnu.org>
* cus-start.el (eol-mnemonic-unix, eol-mnemonic-dos, eol-mnemonic-mac):
Add :standard values, reducing "rogue" customs in emacs -Q a bit more.
2012-04-10 Florian Adamsky <florian@adamsky.it> (tiny change)
* recentf.el (recentf-dialog-mode-map): Add two keybindings for
next-line "n" and previous-line "p" in order to make recentf more
consistent with ibuffer, dired or org-mode (bug#9387).
2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
* image.el (put-image): Return the overlay created instead of the
optional input string (bug#7834). Note that this may break code
that is (for some reason or other) depending on `put-image'
returning the string.
* mouse-sel.el (mouse-sel-mode): Mark as obsolete (bug#6174).
* simple.el (zap-to-char): Allow zapping using input methods
(bug#1580).
* textmodes/fill.el (fill-region): Leave point and mark where they
were before filling (bug#5399).
2012-04-09 Glenn Morris <rgm@gnu.org>
* version.el (emacs-bzr-get-version):
Handle lightweight checkouts of local branches.
2012-04-09 Andreas Schwab <schwab@linux-m68k.org>
* international/characters.el: Recover lost case pairs.
(Bug#11209)
* international/characters.el: Recover lost case pairs. (Bug#11209)
2012-04-09 Chong Yidong <cyd@gnu.org>

View file

@ -138,9 +138,18 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
;; coding.c
(inhibit-eol-conversion mule boolean)
(eol-mnemonic-undecided mule string)
(eol-mnemonic-unix mule string)
(eol-mnemonic-dos mule string)
(eol-mnemonic-mac mule string)
;; startup.el fiddles with the values. IMO, would be
;; simpler to just use #ifdefs in coding.c.
(eol-mnemonic-unix mule string nil
:standard
(if (memq system-type '(ms-dos windows-nt))
"(Unix)" ":"))
(eol-mnemonic-dos mule string nil
:standard
(if (memq system-type '(ms-dos windows-nt))
"\\" "(DOS)"))
(eol-mnemonic-mac mule string nil
:standard "(Mac)")
(file-coding-system-alist
mule
(alist

View file

@ -762,9 +762,6 @@ write its autoloads into the specified file instead."
(define-obsolete-function-alias 'update-autoloads-from-directories
'update-directory-autoloads "22.1")
(defvar autoload-make-program (or (getenv "MAKE") "make")
"Name of the make program in use during the Emacs build process.")
;;;###autoload
(defun batch-update-autoloads ()
"Update loaddefs.el autoloads in batch mode.

View file

@ -1,3 +1,18 @@
2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
* erc-join.el (erc-server-join-channel): New function to look up
the channel password via auth-source.
(erc-autojoin-channels): Use it.
(erc-autojoin-after-ident): Ditto.
(erc-autojoin-channels-alist): Mention auth-source.
2012-04-10 Deniz Dogan <deniz@dogan.se> (tiny change)
* erc.el (erc-display-prompt): Adds the field text property to the
ERC prompt. This allows users to use `kill-whole-line' to kill
all text back to the prompt given that it's on a single line
(bug#10841).
2012-04-09 Chong Yidong <cyd@gnu.org>
* erc.el (erc-cmd-SET): Call custom-variable-p instead of

View file

@ -32,6 +32,7 @@
;;; Code:
(require 'erc)
(require 'auth-source)
(eval-when-compile (require 'cl))
(defgroup erc-autojoin nil
@ -56,6 +57,13 @@ Every element in the alist has the form (SERVER . CHANNELS).
SERVER is a regexp matching the server, and channels is the
list of channels to join.
If the channel(s) require channel keys for joining, the passwords
are found via auth-source. For instance, if you use ~/.authinfo
as your auth-source backend, then put something like the
following in that file:
machine irc.example.net login \"#fsf\" password sEcReT
Customize this variable to set the value for your first connect.
Once you are connected and join and part channels, this alist
keeps track of what channels you are on, and will join them
@ -131,7 +139,7 @@ This function is run from `erc-nickserv-identified-hook'."
(when (string-match (car l) server)
(dolist (chan (cdr l))
(unless (erc-member-ignore-case chan joined)
(erc-server-send (concat "join " chan))))))))
(erc-server-join-channel server chan)))))))
nil)
(defun erc-autojoin-channels (server nick)
@ -148,10 +156,25 @@ This function is run from `erc-nickserv-identified-hook'."
(dolist (l erc-autojoin-channels-alist)
(when (string-match (car l) server)
(dolist (chan (cdr l))
(erc-server-send (concat "join " chan))))))
(erc-server-join-channel server chan)))))
;; Return nil to avoid stomping on any other hook funcs.
nil)
(defun erc-server-join-channel (server channel)
(let* ((secret (plist-get (nth 0 (auth-source-search
:max 1
:host server
:port "irc"
:user channel))
:secret))
(password (if (functionp secret)
(funcall secret)
secret)))
(erc-server-send (concat "join " channel
(if password
(concat " " password)
"")))))
(defun erc-autojoin-add (proc parsed)
"Add the channel being joined to `erc-autojoin-channels-alist'."
(let* ((chnl (erc-response.contents parsed))

View file

@ -3646,6 +3646,7 @@ If FACE is non-nil, it will be used to propertize the prompt. If it is nil,
'start-open t ; XEmacs
'rear-nonsticky t ; Emacs
'erc-prompt t
'field t
'front-sticky t
'read-only t))
(erc-put-text-property 0 (1- (length prompt))

View file

@ -412,7 +412,8 @@ means display it in the right marginal area."
(prop (if (null area) image (list (list 'margin area) image))))
(put-text-property 0 (length string) 'display prop string)
(overlay-put overlay 'put-image t)
(overlay-put overlay 'before-string string))))
(overlay-put overlay 'before-string string)
overlay)))
;;;###autoload

View file

@ -576,7 +576,7 @@ with L, LRE, or LRO Unicode bidi character type.")
(set-case-syntax-pair from (1+ from) tbl)
(setq from (+ from 2))))))
(set-case-syntax-pair ?ÿ tbl)
(set-case-syntax-pair #x178 #x0ff tbl)
(set-case-syntax-pair #x189 #x256 tbl)
(set-case-syntax-pair #x18A #x257 tbl)

View file

@ -486,19 +486,15 @@ non-Quail commands."
(setq translation-keymap (copy-keymap
(if simple quail-simple-translation-keymap
quail-translation-keymap)))
(while translation-keys
(define-key translation-keymap
(car (car translation-keys)) (cdr (car translation-keys)))
(setq translation-keys (cdr translation-keys))))
(dolist (trans translation-keys)
(define-key translation-keymap (car trans) (cdr trans))))
(setq translation-keymap
(if simple quail-simple-translation-keymap
quail-translation-keymap)))
(when conversion-keys
(setq conversion-keymap (copy-keymap quail-conversion-keymap))
(while conversion-keys
(define-key conversion-keymap
(car (car conversion-keys)) (cdr (car conversion-keys)))
(setq conversion-keys (cdr conversion-keys))))
(dolist (conv conversion-keys)
(define-key conversion-keymap (car conv) (cdr conv))))
(quail-add-package
(list name title (list nil) guidance (or docstring "")
translation-keymap
@ -720,12 +716,11 @@ The command `quail-set-keyboard-layout' usually sets this variable."
(setq quail-keyboard-layout-substitution subst-list)
;; If there are additional key locations, map them to missing
;; key locations.
(while missing-list
(dolist (missing missing-list)
(while (and subst-list (cdr (car subst-list)))
(setq subst-list (cdr subst-list)))
(if subst-list
(setcdr (car subst-list) (car missing-list)))
(setq missing-list (cdr missing-list))))))
(setcdr (car subst-list) missing))))))
(defcustom quail-keyboard-layout-type "standard"
"Type of keyboard layout used in Quail base input method.
@ -806,9 +801,10 @@ The format of KBD-LAYOUT is the same as `quail-keyboard-layout'."
(if translation
(progn
(if (consp translation)
(if (> (length (cdr translation)) 0)
(setq translation (aref (cdr translation) 0))
(setq translation " ")))
(setq translation
(if (> (length (cdr translation)) 0)
(aref (cdr translation) 0)
" ")))
(setq done-list (cons translation done-list)))
(setq translation (aref kbd-layout i)))
(aset layout i translation))
@ -834,17 +830,19 @@ The format of KBD-LAYOUT is the same as `quail-keyboard-layout'."
(if (< (if (stringp lower) (string-width lower) (char-width lower)) 2)
(insert " "))
(if (characterp lower)
(if (eq (get-char-code-property lower 'general-category) 'Mn)
;; Pad the left and right of non-spacing characters.
(setq lower (compose-string (string lower) 0 1
(format "\t%c\t" lower)))
(setq lower (string lower))))
(setq lower
(if (eq (get-char-code-property lower 'general-category) 'Mn)
;; Pad the left and right of non-spacing characters.
(compose-string (string lower) 0 1
(format "\t%c\t" lower))
(string lower))))
(if (characterp upper)
(if (eq (get-char-code-property upper 'general-category) 'Mn)
;; Pad the left and right of non-spacing characters.
(setq upper (compose-string (string upper) 0 1
(format "\t%c\t" upper)))
(setq upper (string upper))))
(setq upper
(if (eq (get-char-code-property upper 'general-category) 'Mn)
;; Pad the left and right of non-spacing characters.
(compose-string (string upper) 0 1
(format "\t%c\t" upper))
(string upper))))
(insert (bidi-string-mark-left-to-right lower)
(propertize " " 'invisible t)
(bidi-string-mark-left-to-right upper))
@ -1032,8 +1030,8 @@ the following annotation types are supported.
(let ((map (list nil))
(decode-map (if (not no-decode-map) (list 'decode-map)))
key trans)
(while l
(setq key (car (car l)) trans (car (cdr (car l))) l (cdr l))
(dolist (el l)
(setq key (car el) trans (car (cdr el)))
(quail-defrule-internal key trans map t decode-map props))
`(if (prog1 (quail-decode-map)
(quail-install-map ',map))
@ -1201,7 +1199,7 @@ function `quail-define-rules' for the detail."
(if (stringp trans)
(setq trans (string-to-vector trans))))
(let ((new (quail-vunion prevchars trans)))
(setq trans
(setq trans
(if (equal new prevchars)
;; Nothing to change, get back to orig value.
prev
@ -1215,10 +1213,8 @@ where VECTOR is a vector of candidates (character or string) for
the translation, and INDEX points into VECTOR to specify the currently
selected translation."
(if (and def (symbolp def))
(if (functionp def)
;; DEF is a symbol of a function which returns valid translation.
(setq def (funcall def key len))
(setq def nil)))
;; DEF is a symbol of a function which returns valid translation.
(setq def (if (functionp def) (funcall def key len))))
(if (and (consp def) (not (vectorp (cdr def))))
(setq def (car def)))

View file

@ -324,6 +324,14 @@ Latin-9 is sometimes nicknamed `Latin-0'."))
:mime-charset 'windows-1257)
(define-coding-system-alias 'cp1257 'windows-1257)
(define-coding-system 'cp775
"DOS codepage 775 (PC Baltic, MS-DOS Baltic Rim)"
:coding-type 'charset
:mnemonic ?D
:charset-list '(cp775)
:mime-charset 'cp775)
(define-coding-system-alias 'ibm775 'cp775)
(define-coding-system 'cp850
"DOS codepage 850 (Western European)"
:coding-type 'charset

View file

@ -138,6 +138,19 @@ variation of `C-x M-c M-butterfly' from url `http://xkcd.com/378/'."
(defvar list-dynamic-libraries--loaded-only-p)
(make-variable-buffer-local 'list-dynamic-libraries--loaded-only-p)
(defun list-dynamic-libraries--loaded (from)
"Compute the \"Loaded from\" column.
Internal use only."
(if from
(let ((name (car from))
(path (or (cdr from) "<unknown>")))
;; This is a roundabout way to change the tooltip without
;; having to replace the default printer function
(propertize name
'display (propertize name
'help-echo (concat "Loaded from: " path))))
""))
(defun list-dynamic-libraries--refresh ()
"Recompute the list of dynamic libraries.
Internal use only."
@ -159,7 +172,7 @@ Internal use only."
(when (or from
(not list-dynamic-libraries--loaded-only-p))
(push (list id (vector (symbol-name id)
(or from "")
(list-dynamic-libraries--loaded from)
(mapconcat 'identity (cdr lib) ", ")))
tabulated-list-entries)))))

View file

@ -4,6 +4,7 @@
;; Author: Mike Williams <mdub@bigfoot.com>
;; Keywords: mouse
;; Obsolete-since: 24.2
;; This file is part of GNU Emacs.
@ -262,6 +263,8 @@ kill ring; mouse-1 or mouse-3 kills it."
interprogram-paste-function
mouse-sel-original-interprogram-paste-function))))
(make-obsolete 'mouse-sel-mode "use the normal mouse modes" "24.2")
;;=== Internal Variables/Constants ========================================
(defvar mouse-sel-primary-thing nil

View file

@ -1959,7 +1959,7 @@ the string's indentation."
;; paragraph in a multi-line string properly, so narrow
;; to the string and then fill around (the end of) the
;; current line.
((eq t (nth 3 syntax)) ; in fenced string
((nth 3 syntax) ; in fenced string
(goto-char (nth 8 syntax)) ; string start
(setq start (line-beginning-position))
(setq end (condition-case () ; for unbalanced quotes

View file

@ -1061,6 +1061,8 @@ Go to the beginning of buffer if not found."
(let ((km (copy-keymap recentf--shortcuts-keymap)))
(set-keymap-parent km widget-keymap)
(define-key km "q" 'recentf-cancel-dialog)
(define-key km "n" 'next-line)
(define-key km "p" 'previous-line)
(define-key km [follow-link] "\C-m")
km)
"Keymap used in recentf dialogs.")

View file

@ -3487,14 +3487,14 @@ and KILLP is t if a prefix arg was specified."
"Kill up to and including ARGth occurrence of CHAR.
Case is ignored if `case-fold-search' is non-nil in the current buffer.
Goes backward if ARG is negative; error if CHAR not found."
(interactive "p\ncZap to char: ")
(interactive (list (prefix-numeric-value current-prefix-arg)
(read-char "Zap to char: " t)))
;; Avoid "obsolete" warnings for translation-table-for-input.
(with-no-warnings
(if (char-table-p translation-table-for-input)
(setq char (or (aref translation-table-for-input char) char))))
(kill-region (point) (progn
(search-forward (char-to-string char) nil nil arg)
; (goto-char (if (> arg 0) (1- (point)) (1+ (point))))
(point))))
;; kill-line and its subroutines.

View file

@ -1011,7 +1011,8 @@ space does not end a sentence, so don't break a line there."
(if current-prefix-arg 'full))))
(unless (memq justify '(t nil none full center left right))
(setq justify 'full))
(let (max beg fill-pfx)
(let ((start-point (point-marker))
max beg fill-pfx)
(goto-char (max from to))
(when to-eop
(skip-chars-backward "\n")
@ -1042,6 +1043,8 @@ space does not end a sentence, so don't break a line there."
(setq fill-pfx
(fill-region-as-paragraph (point) end justify nosqueeze))
(goto-char end))))
(goto-char start-point)
(set-marker start-point nil)
fill-pfx))

View file

@ -165,14 +165,13 @@ Its value should be an event that has a binding in MENU."
;; tmm-km-list is an alist of (STRING . MEANING).
;; It has no other elements.
;; The order of elements in tmm-km-list is the order of the menu bar.
(mapc (lambda (elt)
(cond
((stringp elt) (setq gl-str elt))
((listp elt) (tmm-get-keymap elt not-menu))
((vectorp elt)
(dotimes (i (length elt))
(tmm-get-keymap (cons i (aref elt i)) not-menu)))))
menu)
(dolist (elt menu)
(cond
((stringp elt) (setq gl-str elt))
((listp elt) (tmm-get-keymap elt not-menu))
((vectorp elt)
(dotimes (i (length elt))
(tmm-get-keymap (cons i (aref elt i)) not-menu)))))
;; Choose an element of tmm-km-list; put it in choice.
(if (and not-menu (= 1 (length tmm-km-list)))
;; If this is the top-level of an x-popup-menu menu,
@ -313,15 +312,13 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'."
(defun tmm-define-keys (minibuffer)
(let ((map (make-sparse-keymap)))
(suppress-keymap map t)
(mapc
(lambda (c)
(if (listp tmm-shortcut-style)
(define-key map (char-to-string c) 'tmm-shortcut)
;; only one kind of letters are shortcuts, so map both upcase and
;; downcase input to the same
(define-key map (char-to-string (downcase c)) 'tmm-shortcut)
(define-key map (char-to-string (upcase c)) 'tmm-shortcut)))
tmm-short-cuts)
(dolist (c tmm-short-cuts)
(if (listp tmm-shortcut-style)
(define-key map (char-to-string c) 'tmm-shortcut)
;; only one kind of letters are shortcuts, so map both upcase and
;; downcase input to the same
(define-key map (char-to-string (downcase c)) 'tmm-shortcut)
(define-key map (char-to-string (upcase c)) 'tmm-shortcut)))
(if minibuffer
(progn
(define-key map [pageup] 'tmm-goto-completions)
@ -401,14 +398,13 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'."
(choose-completion))
;; In minibuffer
(delete-region (minibuffer-prompt-end) (point-max))
(mapc (lambda (elt)
(if (string=
(substring (car elt) 0
(min (1+ (length tmm-mid-prompt))
(length (car elt))))
(concat (char-to-string c) tmm-mid-prompt))
(setq s (car elt))))
tmm-km-list)
(dolist (elt tmm-km-list)
(if (string=
(substring (car elt) 0
(min (1+ (length tmm-mid-prompt))
(length (car elt))))
(concat (char-to-string c) tmm-mid-prompt))
(setq s (car elt))))
(insert s)
(exit-minibuffer)))))
@ -540,20 +536,16 @@ of `menu-bar-final-items'."
(setq allbind (cons globalbind (cons localbind minorbind)))
;; Merge all the elements of ALLBIND into one keymap.
(mapc (lambda (in)
(if (and (symbolp in) (keymapp in))
(setq in (symbol-function in)))
(and in (keymapp in)
(if (keymapp bind)
(setq bind (nconc bind (copy-sequence (cdr in))))
(setq bind (copy-sequence in)))))
allbind)
(dolist (in allbind)
(if (and (symbolp in) (keymapp in))
(setq in (symbol-function in)))
(and in (keymapp in)
(setq bind (if (keymapp bind)
(nconc bind (copy-sequence (cdr in)))
(copy-sequence in)))))
;; Return that keymap.
bind))))
;; Huh? What's that about? --Stef
(add-hook 'calendar-load-hook (lambda () (require 'cal-menu)))
(provide 'tmm)
;;; tmm.el ends here

View file

@ -1,3 +1,21 @@
2012-04-10 William Xu <william.xwl@gmail.com> (tiny change)
* url.el (url-retrieve-internal): Hexify multibye URL string first
when necessary (bug#7017).
2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
* url.el (url-retrieve-internal): Mention utf-8 encoding.
(url-retrieve): Ditto.
2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
* url-domsurf.el: New file (bug#1401).
* url-cookie.el (url-cookie-two-dot-domains): Remove.
(url-cookie-host-can-set-p): Use `url-domsuf-cookie-allowed-p'
instead of the variable above.
2012-03-25 Lars Magne Ingebrigtsen <larsi@gnus.org>
* url-queue.el (url-queue-kill-job): Check whether the buffer has

View file

@ -25,6 +25,7 @@
(require 'url-util)
(require 'url-parse)
(require 'url-domsuf)
(eval-when-compile (require 'cl)) ; defstruct
@ -211,14 +212,6 @@ telling Microsoft that."
(concat retval "\r\n")
"")))
(defvar url-cookie-two-dot-domains
(concat "\\.\\("
(mapconcat 'identity (list "com" "edu" "net" "org" "gov" "mil" "int")
"\\|")
"\\)$")
"A regexp of top level domains that only require two matching
'.'s in the domain name in order to set a cookie.")
(defcustom url-cookie-trusted-urls nil
"A list of regular expressions matching URLs to always accept cookies from."
:type '(repeat regexp)
@ -230,30 +223,18 @@ telling Microsoft that."
:group 'url-cookie)
(defun url-cookie-host-can-set-p (host domain)
(let ((numdots 0)
(last nil)
(case-fold-search t)
(mindots 3))
(while (setq last (string-match "\\." domain last))
(setq numdots (1+ numdots)
last (1+ last)))
(if (string-match url-cookie-two-dot-domains domain)
(setq mindots 2))
(cond
((string= host domain) ; Apparently netscape lets you do this
t)
((>= numdots mindots) ; We have enough dots in domain name
;; Need to check and make sure the host is actually _in_ the
;; domain it wants to set a cookie for though.
(string-match (concat (regexp-quote
;; Remove the dot from wildcard domains
;; before matching.
(if (eq ?. (aref domain 0))
(substring domain 1)
domain))
"$") host))
(t
nil))))
(let ((last nil)
(case-fold-search t))
(if (string= host domain) ; Apparently netscape lets you do this
t
;; Remove the dot from wildcard domains before matching.
(when (eq ?. (aref domain 0))
(setq domain (substring domain 1)))
(and (url-domsuf-cookie-allowed-p domain)
;; Need to check and make sure the host is actually _in_ the
;; domain it wants to set a cookie for though.
(string-match (concat (regexp-quote domain)
"$") host)))))
(defun url-cookie-handle-set-cookie (str)
(setq url-cookies-changed-since-last-save t)

98
lisp/url/url-domsuf.el Normal file
View file

@ -0,0 +1,98 @@
;;; url-domsuf.el --- Say what domain names can have cookies set.
;; Copyright (C) 2012 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: comm, data, processes, hypermedia
;; 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:
;; The rules for what domains can have cookies set is defined here:
;; http://publicsuffix.org/list/
;;; Code:
(defvar url-domsuf-domains nil)
(defun url-domsuf-parse-file ()
(with-temp-buffer
(insert-file-contents
(expand-file-name "publicsuffix.txt" data-directory))
(let ((domains nil)
domain exception)
(while (not (eobp))
(when (not (looking-at "[/\n\t ]"))
;; !pref.aichi.jp means that it's allowed.
(if (not (eq (following-char) ?!))
(setq exception nil)
(setq exception t)
(forward-char 1))
(setq domain (buffer-substring (point) (line-end-position)))
(cond
((string-match "\\`\\*\\." domain)
(setq domain (substring domain 2))
(push (cons domain (1+ (length (split-string domain "[.]"))))
domains))
(exception
(push (cons domain t) domains))
(t
(push (cons domain nil) domains))))
(forward-line 1))
(setq url-domsuf-domains (nreverse domains)))))
(defun url-domsuf-cookie-allowed-p (domain)
(unless url-domsuf-domains
(url-domsuf-parse-file))
(let* ((allowedp t)
(domain-bits (split-string domain "[.]"))
(length (length domain-bits))
(upper-domain (mapconcat 'identity (cdr domain-bits) "."))
entry modifier)
(dolist (elem url-domsuf-domains)
(setq entry (car elem)
modifier (cdr elem))
(cond
;; "com"
((and (null modifier)
(string= domain entry))
(setq allowedp nil))
;; "!pref.hokkaido.jp"
((and (eq modifier t)
(string= domain entry))
(setq allowedp t))
;; "*.ar"
((and (numberp modifier)
(= length modifier)
(string= entry upper-domain))
(setq allowedp nil))))
allowedp))
;; Tests:
;; (url-domsuf-cookie-allowed-p "com") => nil
;; (url-domsuf-cookie-allowed-p "foo.bar.ar") => t
;; (url-domsuf-cookie-allowed-p "bar.ar") => nil
;; (url-domsuf-cookie-allowed-p "co.uk") => nil
;; (url-domsuf-cookie-allowed-p "foo.bar.hokkaido.jo") => t
;; (url-domsuf-cookie-allowed-p "bar.hokkaido.jp") => nil
;; (url-domsuf-cookie-allowed-p "pref.hokkaido.jp") => t
(provide 'url-domsuf)
;;; url-domsuf.el ends here

View file

@ -330,8 +330,7 @@ forbidden in URL encoding."
" ")
(t (byte-to-string code))))
str (substring str (match-end 0)))))
(setq tmp (concat tmp str))
tmp))
(concat tmp str)))
(defconst url-unreserved-chars
'(

View file

@ -149,7 +149,9 @@ take effect.
If SILENT, then don't message progress reports and the like.
If INHIBIT-COOKIES, cookies will neither be stored nor sent to
the server."
the server.
If URL is a multibyte string, it will be encoded as utf-8 and
URL-encoded before it's used."
;;; XXX: There is code in Emacs that does dynamic binding
;;; of the following variables around url-retrieve:
;;; url-standalone-mode, url-gateway-unplugged, w3-honor-stylesheets,
@ -171,11 +173,16 @@ the list of events, as described in the docstring of `url-retrieve'.
If SILENT, don't message progress reports and the like.
If INHIBIT-COOKIES, cookies will neither be stored nor sent to
the server."
the server.
If URL is a multibyte string, it will be encoded as utf-8 and
URL-encoded before it's used."
(url-do-setup)
(url-gc-dead-buffers)
(if (stringp url)
(set-text-properties 0 (length url) nil url))
(when (multibyte-string-p url)
(let ((url-unreserved-chars (append '(?: ?/) url-unreserved-chars)))
(setq url (url-hexify-string url))))
(if (not (vectorp url))
(setq url (url-generic-parse-url url)))
(if (not (functionp callback))

View file

@ -522,12 +522,12 @@ the file in question, search for the log entry required and move point."
(car rev-at-line) t 1)))))))
(defun vc-annotate-show-diff-revision-at-line-internal (filediff)
(if (not (equal major-mode 'vc-annotate-mode))
(if (not (derived-mode-p 'vc-annotate-mode))
(message "Cannot be invoked outside of a vc annotate buffer")
(let* ((rev-at-line (vc-annotate-extract-revision-at-line))
(prev-rev nil)
(rev (car rev-at-line))
(fname (cdr rev-at-line)))
(prev-rev nil)
(rev (car rev-at-line))
(fname (cdr rev-at-line)))
(if (not rev-at-line)
(message "Cannot extract revision number from the current line")
(setq prev-rev
@ -535,17 +535,15 @@ the file in question, search for the log entry required and move point."
(if filediff fname nil) rev))
(if (not prev-rev)
(message "Cannot diff from any revision prior to %s" rev)
(save-window-excursion
(vc-diff-internal
nil
;; The value passed here should follow what
;; `vc-deduce-fileset' returns.
(list vc-annotate-backend
(if filediff
(list fname)
nil))
prev-rev rev))
(switch-to-buffer "*vc-diff*"))))))
(vc-diff-internal
t
;; The value passed here should follow what
;; `vc-deduce-fileset' returns.
(list vc-annotate-backend
(if filediff
(list fname)
nil))
prev-rev rev))))))
(defun vc-annotate-show-diff-revision-at-line ()
"Visit the diff of the revision at line from its previous revision."

View file

@ -85,19 +85,35 @@ String giving the bzr revision number from which this Emacs was built.
This is nil if Emacs was not built from a bzr checkout, or if we could
not determine the revision.")
(defun emacs-bzr-get-version () "\
(defun emacs-bzr-get-version (&optional dir) "\
Try to return as a string the bzr revision number of the Emacs sources.
Returns nil if the sources do not seem to be under bzr, or if we could
not determine the revision. Note that this reports on the current state
of the sources, which may not correspond to the running Emacs."
(let ((file (expand-file-name ".bzr/branch/last-revision" source-directory)))
(if (file-readable-p file)
(with-temp-buffer
(insert-file-contents file)
(goto-char (point-max))
(if (looking-back "\n")
(delete-char -1))
(buffer-string)))))
of the sources, which may not correspond to the running Emacs.
Optional argument DIR is a directory to use instead of `source-directory'."
(or dir (setq dir source-directory))
(when (file-directory-p (setq dir (expand-file-name ".bzr/branch" dir)))
(let (file loc)
(cond ((file-readable-p
(setq file (expand-file-name "last-revision" dir)))
(with-temp-buffer
(insert-file-contents file)
(goto-char (point-max))
(if (looking-back "\n")
(delete-char -1))
(buffer-string)))
;; OK, no last-revision. Is it a lightweight checkout?
((file-readable-p
(setq file (expand-file-name "location" dir)))
;; If the parent branch is local, try looking there for the revid.
(if (setq loc (with-temp-buffer
(insert-file-contents file)
(if (looking-at "file://\\(.*\\)")
(match-string 1))))
(emacs-bzr-get-version loc)))
;; Could fall back to eg `bzr testament' at this point.
))))
;; We put version info into the executable in the form that `ident' uses.
(or (eq system-type 'windows-nt)

View file

@ -1,3 +1,9 @@
2012-04-10 Eli Zaretskii <eliz@gnu.org>
* makefile.w32-in (emacs, misc, lispref, lispintro): New targets,
each runs makeinfo in its own subdirectory of 'doc'.
(info-gmake): Depend on these new targets.
2012-04-07 Glenn Morris <rgm@gnu.org>
* config.nt, makefile.w32-in, emacs.rc, emacsclient.rc:

View file

@ -307,11 +307,11 @@ info-nmake:
$(MAKE) $(MFLAGS) info
cd $(MAKEDIR)
info-gmake:
$(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/emacs info
$(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/misc info
$(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/lispref info
$(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/lispintro info
info-gmake: emacs misc lispref lispintro
emacs misc lispref lispintro:
$(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/$@ info
#
# Maintenance
#

View file

@ -1,4 +1,4 @@
2012-04-09 Paul Eggert <eggert@cs.ucla.edu>
2012-04-10 Paul Eggert <eggert@cs.ucla.edu>
configure: new option --enable-gcc-warnings (Bug#11207)
* Makefile.in (C_WARNINGS_SWITCH): Remove.
@ -11,6 +11,17 @@
the Emacs and Gnulib regex code is merged.
(xmalloc, xrealloc): Now static.
2012-04-10 "Jason S. Cornez" <jcornez@ravenpack.com> (tiny change)
* keyboard.c: Override inhibit-quit after the third C-g (bug#6585).
(force_quit_count): New var.
(handle_interrupt): Use it.
2012-04-10 Juanma Barranquero <lekktu@gmail.com>
* w32.c (w32_delayed_load): Record the full path of the library
being loaded (bug#10424).
2012-04-09 Glenn Morris <rgm@gnu.org>
* doc.c (Fsnarf_documentation): Check variables, functions are bound,
@ -25,8 +36,8 @@
* process.h: Add integer `gnutls_handshakes_tried' member to
process struct.
* gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit. Add
convenience `GNUTLS_LOG2i' macro.
* gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit.
Add convenience `GNUTLS_LOG2i' macro.
* gnutls.c (gnutls_log_function2i): Convenience log function.
(emacs_gnutls_read): Use new log functions,
@ -112,8 +123,8 @@
(xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
Calls xmlCleanupParser only if libxml2 was loaded (or statically
linked in).
(Flibxml_parse_html_region, Flibxml_parse_xml_region): Call
init_libxml2_functions before calling libxml2 functions.
(Flibxml_parse_html_region, Flibxml_parse_xml_region):
Call init_libxml2_functions before calling libxml2 functions.
(syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
* emacs.c: Don't include libxml/parser.h.

View file

@ -10213,7 +10213,7 @@ DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector,
memset (keybuf, 0, sizeof keybuf);
GCPRO1 (keybuf[0]);
gcpro1.nvars = (sizeof keybuf/sizeof (keybuf[0]));
gcpro1.nvars = (sizeof keybuf / sizeof (keybuf[0]));
if (NILP (continue_echo))
{
@ -10227,7 +10227,7 @@ DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector,
cancel_hourglass ();
#endif
i = read_key_sequence (keybuf, (sizeof keybuf/sizeof (keybuf[0])),
i = read_key_sequence (keybuf, (sizeof keybuf / sizeof (keybuf[0])),
prompt, ! NILP (dont_downcase_last),
! NILP (can_return_switch_frame), 0);
@ -10918,6 +10918,11 @@ interrupt_signal (int signalnum) /* If we don't have an argument, some */
errno = old_errno;
}
/* If Emacs is stuck because `inhibit-quit' is true, then keep track
of the number of times C-g has been requested. If C-g is pressed
enough times, then quit anyway. See bug#6585. */
static int force_quit_count;
/* This routine is called at interrupt level in response to C-g.
It is called from the SIGINT handler or kbd_buffer_store_event.
@ -11036,8 +11041,16 @@ handle_interrupt (void)
UNGCPRO;
}
else
/* Else request quit when it's safe */
Vquit_flag = Qt;
{ /* Else request quit when it's safe. */
if (NILP (Vquit_flag))
force_quit_count = 0;
if (++force_quit_count == 3)
{
immediate_quit = 1;
Vinhibit_quit = Qnil;
}
Vquit_flag = Qt;
}
}
/* TODO: The longjmp in this call throws the NS event loop integration off,

View file

@ -5816,7 +5816,15 @@ w32_delayed_load (Lisp_Object libraries, Lisp_Object library_id)
CHECK_STRING_CAR (dlls);
if ((library_dll = LoadLibrary (SDATA (XCAR (dlls)))))
{
found = XCAR (dlls);
char name[MAX_PATH];
DWORD len;
len = GetModuleFileNameA (library_dll, name, sizeof (name));
found = Fcons (XCAR (dlls),
(len > 0)
/* Possibly truncated */
? make_specified_string (name, -1, len, 1)
: Qnil);
break;
}
}