Commit 763a11d0 authored by Kenichi Handa's avatar Kenichi Handa
Browse files

merge trunk

parents 0782685d a519335c
2014-06-28 Glenn Morris <rgm@gnu.org>
* configure.ac (lwlib_deps_frag, oldxmenu_deps_frag): New output files.
* make-dist (lwlib, oldXMenu): Distribute *.mk.
2014-06-27 Glenn Morris <rgm@gnu.org>
* Makefile.in (src): No more need to pass BOOTSTRAPEMACS.
......
2014-06-30 Glenn Morris <rgm@gnu.org>
* update_autogen: Find loaddefs targets rather than
parsing lisp/Makefile.in
2014-06-29 Glenn Morris <rgm@gnu.org>
* update_autogen: Remove need to cd into/out of lisp/.
* grammars/Makefile.in (bootstrap-clean): Don't delete Makefile,
for sake of top-level maintainer-clean rule.
2014-06-26 Eli Zaretskii <eliz@gnu.org>
* notes/unicode: Some notes about what to do when a new Unicode
......
......@@ -99,7 +99,10 @@ ${cedetdir}/srecode/srt-wy.el: ${srcdir}/srecode-template.wy
distclean:
rm -f Makefile
bootstrap-clean maintainer-clean: distclean
## Perhaps this should do what extraclean (qv) does.
bootstrap-clean:
maintainer-clean: distclean
## We do not normally delete the generated files, even in bootstrap.
## Creating them does not take long, so we could easily change this.
......
......@@ -322,15 +322,20 @@ EOF
echo "Finding loaddef targets..."
sed -n -e '/^AUTOGEN_VCS/,/^$/p' lisp/Makefile.in | \
sed -e '/AUTOGEN_VCS/d' -e '/^$/d' -e 's/\\//' \
>| $tempfile || die "sed error"
find lisp -name '*.el' -exec grep '^;.*generated-autoload-file:' {} + | \
sed -e '/loaddefs\|esh-groups/d' -e 's|/[^/]*: "|/|' -e 's/"//g' \
>| $tempfile || die "Error finding targets"
genfiles=
while read genfile; do
[ -r lisp/$genfile ] || die "Unable to read $genfile"
## Or we can just use sort -u when making tempfile...
case " $genfiles " in
*" $genfile "*) continue ;;
esac
[ -r $genfile ] || die "Unable to read $genfile"
genfiles="$genfiles $genfile"
done < $tempfile
......@@ -369,18 +374,12 @@ make -C lisp "$@" autoloads EMACS=../src/bootstrap-emacs || die "make src error"
cp $ldefs_in $ldefs_out || die "cp ldefs_boot error"
cd lisp
echo "Checking status of loaddef files..."
## It probably would be fine to just check+commit lisp/, since
## making autoloads should not effect any other files. But better
## safe than sorry.
modified=$(status $genfiles ${ldefs_out#lisp/}) || die
## bzr status output is always relative to top-level, not PWD.
[ "$vcs" = "bzr" ] && cd ../
modified=$(status $genfiles $ldefs_out) || die
commit "loaddefs" $modified || die "commit error"
......
......@@ -1590,11 +1590,14 @@ if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
deps_frag=autodeps.mk
fi
fi
lwlib_deps_frag=$srcdir/lwlib/$deps_frag
oldxmenu_deps_frag=$srcdir/oldXMenu/$deps_frag
deps_frag=$srcdir/src/$deps_frag
AC_SUBST(MKDEPDIR)
AC_SUBST(DEPFLAGS)
AC_SUBST_FILE(deps_frag)
AC_SUBST_FILE(lwlib_deps_frag)
AC_SUBST_FILE(oldxmenu_deps_frag)
lisp_frag=$srcdir/src/lisp.mk
AC_SUBST_FILE(lisp_frag)
......
2014-06-28 Glenn Morris <rgm@gnu.org>
* minibuf.texi (Intro to Minibuffers): Batch mode is basic.
(Reading a Password): Mention batch mode. (Bug#17839)
2014-06-23 Glenn Morris <rgm@gnu.org>
* Makefile.in (%.texi): Disable implicit rules.
......
......@@ -101,7 +101,9 @@ the minibuffer is in a separate frame. @xref{Minibuffers and Frames}.
When Emacs is running in batch mode, any request to read from the
minibuffer actually reads a line from the standard input descriptor that
was supplied when Emacs was started.
was supplied when Emacs was started. This supports only basic input:
none of the special minibuffer features (history, completion,
password hiding, etc.) are available in batch mode.
@node Text from Minibuffer
@section Reading Text Strings with the Minibuffer
......@@ -2146,7 +2148,8 @@ function @code{read-passwd}.
@defun read-passwd prompt &optional confirm default
This function reads a password, prompting with @var{prompt}. It does
not echo the password as the user types it; instead, it echoes @samp{.}
for each character in the password.
for each character in the password. (Note that in batch mode, the
input is not hidden.)
The optional argument @var{confirm}, if non-@code{nil}, says to read the
password twice and insist it must be the same both times. If it isn't
......
2014-06-28 Glenn Morris <rgm@gnu.org>
* publicsuffix.txt: Update from source.
2014-06-24 Eli Barzilay <eli@barzilay.org>
* NEWS: calculator.el user-visible changes.
......
......@@ -178,6 +178,13 @@ permissions set to temporary values (e.g., for creating private files).
** Functions `rmail-delete-forward' and `rmail-delete-backward' take an
optional repeat-count argument.
---
** New utilities in subr-x.el:
*** New macros `if-let' and `when-let' allow defining bindings and to
execute code depending whether all values are true.
*** New macros `thread-first' and `thread-last' allow threading a form
as the first or last argument of subsequent forms.
* Changes in Emacs 24.5 on Non-Free Operating Systems
......
This diff is collapsed.
2014-06-30 Fabián Ezequiel Gallina <fgallina@gnu.org>
* emacs-lisp/subr-x.el (string-reverse): Define as obsolete alias
for `reverse'.
2014-06-30 Glenn Morris <rgm@gnu.org>
* emacs-lisp/autoload.el (autoload-ensure-writable): New variable.
(autoload-ensure-default-file): Maybe make existing output writable.
* Makefile.in (AUTOGEN_VCS): Remove.
(autoloads): Use autoload-ensure-writable rather than AUTOGEN_VCS.
2014-06-30 Fabián Ezequiel Gallina <fgallina@gnu.org>
* emacs-lisp/subr-x.el (string-reverse): Use `reverse'.
2014-06-30 Fabián Ezequiel Gallina <fgallina@gnu.org>
New if-let, when-let, thread-first and thread-last macros.
* emacs-lisp/subr-x.el
(internal--listify, internal--check-binding)
(internal--build-binding-value-form, internal--build-binding)
(internal--build-bindings): New functions.
(internal--thread-argument, thread-first, thread-last)
(if-let, when-let): New macros.
2014-06-30 Grégoire Jadi <daimrod@gmail.com>
* net/rcirc.el (rcirc-buffer-process): Restore previous
behaviour. (Bug#17772)
2014-06-29 Alan Mackenzie <acm@muc.de>
Don't call c-parse-state when c++-template-syntax-table is active.
* progmodes/cc-engine.el (c-guess-continued-construct CASE G)
(c-guess-basic-syntax CASE 5D.3): Rearrange so that
c-syntactic-skip-backwards isn't called with the pertinent syntax
table.
2014-06-28 Stephen Berman <stephen.berman@gmx.net>
* calendar/todo-mode.el (todo-set-top-priorities): Fix logic to
account for file-wide setting of todo-top-priorities-overrides.
Make code a bit cleaner.
2014-06-28 Glenn Morris <rgm@gnu.org>
* net/eww.el (eww-mode) <eww-current-title>: Make local. (Bug#17860)
2014-06-28 Stephen Berman <stephen.berman@gmx.net>
* calendar/todo-mode.el (todo-prefix-overlays): If there is no
category-wide setting of todo-top-priorities-overrides, check for
a file-wide setting and fontify accordingly.
2014-06-28 Glenn Morris <rgm@gnu.org>
* subr.el (read-passwd): Warn about batch mode. (Bug#17839)
2014-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
 
* progmodes/hideif.el: Use lexical-binding. Fix up cl-lib usage.
......
......@@ -70,18 +70,6 @@ AUTOGENEL = loaddefs.el \
cedet/srecode/loaddefs.el \
org/org-loaddefs.el
# Versioned files that are the value of someone's `generated-autoload-file'.
# Note that update_loaddefs parses this.
AUTOGEN_VCS = \
ps-print.el \
obsolete/tpu-edt.el \
mail/rmail.el \
dired.el \
ibuffer.el \
htmlfontify.el \
emacs-lisp/eieio.el \
textmodes/reftex.el
# Value of max-lisp-eval-depth when compiling initially.
# During bootstrapping the byte-compiler is run interpreted when compiling
# itself, and uses more stack than usual.
......@@ -183,7 +171,6 @@ finder-data:
--eval '(setq generated-finder-keywords-file (unmsys--file-name "$(srcdir)/finder-inf.el"))' \
-f finder-compile-keywords-make-dist $$wins
# The chmod +w is to handle env var CVSREAD=1.
# Use expand-file-name rather than $abs_scrdir so that Emacs does not
# get confused when it compares file-names for equality.
#
......@@ -191,10 +178,10 @@ finder-data:
# If you want to allow autoloads in such files, remove that,
# and make this depend on leim.
autoloads: $(LOADDEFS)
cd $(lisp) && chmod +w $(AUTOGEN_VCS)
$(setwins_almost); \
echo Directories: $$wins; \
$(emacs) -l autoload \
--eval '(setq autoload-ensure-writable t)' \
--eval '(setq autoload-builtin-package-versions t)' \
--eval '(setq generated-autoload-file (expand-file-name (unmsys--file-name "$(srcdir)/loaddefs.el")))' \
-f batch-update-autoloads $$wins
......
......@@ -4292,30 +4292,30 @@ set the user customizable option `todo-top-priorities-overrides'."
(file todo-current-todo-file)
(rules todo-top-priorities-overrides)
(frule (assoc-string file rules))
(crule (assoc-string cat (nth 2 frule)))
(crules (nth 2 frule))
(cur (or (if arg (cdr crule) (nth 1 frule))
(crule (assoc-string cat crules))
(cur (or (and arg (cdr crule))
(nth 1 frule)
todo-top-priorities))
(prompt (if arg (concat "Number of top priorities in this category"
" (currently %d): ")
(concat "Default number of top priorities per category"
" in this file (currently %d): ")))
(new -1)
nrule)
(new -1))
(while (< new 0)
(let ((cur0 cur))
(setq new (read-number (format prompt cur0))
prompt "Enter a non-negative number: "
cur0 nil)))
(setq nrule (if arg
(append (delete crule crules) (list (cons cat new)))
(append (list file new) (list crules))))
(setq rules (cons (if arg
(list file cur nrule)
nrule)
(delete frule rules)))
(customize-save-variable 'todo-top-priorities-overrides rules)
(todo-prefix-overlays)))
(let ((nrule (if arg
(append (delete crule crules) (list (cons cat new)))
(append (list file new) (list crules)))))
(setq rules (cons (if arg
(list file cur nrule)
nrule)
(delete frule rules)))
(customize-save-variable 'todo-top-priorities-overrides rules)
(todo-prefix-overlays))))
(defun todo-find-item (str)
"Search for filtered item STR in its saved todo file.
......@@ -5303,6 +5303,8 @@ of each other."
(todo-current-category)
(nth 2 (assoc-string todo-current-todo-file
todo-top-priorities-overrides))))
(nth 1 (assoc-string todo-current-todo-file
todo-top-priorities-overrides))
todo-top-priorities))
done prefix)
(save-excursion
......
......@@ -351,9 +351,26 @@ not be relied upon."
";;; " basename
" ends here\n")))
(defvar autoload-ensure-writable nil
"Non-nil means `autoload-ensure-default-file' makes existing file writable.")
;; Just in case someone tries to get you to overwrite a file that you
;; don't want to.
;;;###autoload
(put 'autoload-ensure-writable 'risky-local-variable t)
(defun autoload-ensure-default-file (file)
"Make sure that the autoload file FILE exists and if not create it."
(unless (file-exists-p file)
"Make sure that the autoload file FILE exists, creating it if needed.
If the file already exists and `autoload-ensure-writable' is non-nil,
make it writable."
(if (file-exists-p file)
;; Probably pointless, but replaces the old AUTOGEN_VCS in lisp/Makefile,
;; which was designed to handle CVSREAD=1 and equivalent.
(and autoload-ensure-writable
(let ((modes (file-modes file)))
(if (zerop (logand modes #o0200))
;; Ignore any errors here, and let subsequent attempts
;; to write the file raise any real error.
(ignore-errors (set-file-modes file (logior modes #o0200))))))
(write-region (autoload-rubric file) nil file))
file)
......
......@@ -32,6 +32,113 @@
;;; Code:
(require 'pcase)
(defmacro internal--thread-argument (first? &rest forms)
"Internal implementation for `thread-first' and `thread-last'.
When Argument FIRST? is non-nil argument is threaded first, else
last. FORMS are the expressions to be threaded."
(pcase forms
(`(,x (,f . ,args) . ,rest)
`(internal--thread-argument
,first? ,(if first? `(,f ,x ,@args) `(,f ,@args ,x)) ,@rest))
(`(,x ,f . ,rest) `(internal--thread-argument ,first? (,f ,x) ,@rest))
(_ (car forms))))
(defmacro thread-first (&rest forms)
"Thread FORMS elements as the first argument of their succesor.
Example:
(thread-first
5
(+ 20)
(/ 25)
-
(+ 40))
Is equivalent to:
(+ (- (/ (+ 5 20) 25)) 40)
Note how the single `-' got converted into a list before
threading."
(declare (indent 1)
(debug (form &rest [&or symbolp (sexp &rest form)])))
`(internal--thread-argument t ,@forms))
(defmacro thread-last (&rest forms)
"Thread FORMS elements as the last argument of their succesor.
Example:
(thread-last
5
(+ 20)
(/ 25)
-
(+ 40))
Is equivalent to:
(+ 40 (- (/ 25 (+ 20 5))))
Note how the single `-' got converted into a list before
threading."
(declare (indent 1) (debug thread-first))
`(internal--thread-argument nil ,@forms))
(defsubst internal--listify (elt)
"Wrap ELT in a list if it is not one."
(if (not (listp elt))
(list elt)
elt))
(defsubst internal--check-binding (binding)
"Check BINDING is properly formed."
(when (> (length binding) 2)
(signal
'error
(cons "`let' bindings can have only one value-form" binding)))
binding)
(defsubst internal--build-binding-value-form (binding prev-var)
"Build the conditional value form for BINDING using PREV-VAR."
`(,(car binding) (and ,prev-var ,(cadr binding))))
(defun internal--build-binding (binding prev-var)
"Check and build a single BINDING with PREV-VAR."
(thread-first
binding
internal--listify
internal--check-binding
(internal--build-binding-value-form prev-var)))
(defun internal--build-bindings (bindings)
"Check and build conditional value forms for BINDINGS."
(let ((prev-var t))
(mapcar (lambda (binding)
(let ((binding (internal--build-binding binding prev-var)))
(setq prev-var (car binding))
binding))
bindings)))
(defmacro if-let (bindings then &rest else)
"Process BINDINGS and if all values are non-nil eval THEN, else ELSE.
Argument BINDINGS is a list of tuples whose car is a symbol to be
bound and (optionally) used in THEN, and its cadr is a sexp to be
evaled to set symbol's value. In the special case you only want
to bind a single value, BINDINGS can just be a plain tuple."
(declare (indent 2) (debug ((&rest (symbolp form)) form body)))
(when (and (<= (length bindings) 2)
(not (listp (car bindings))))
;; Adjust the single binding case
(setq bindings (list bindings)))
`(let* ,(internal--build-bindings bindings)
(if ,(car (internal--listify (car (last bindings))))
,then
,@else)))
(defmacro when-let (bindings &rest body)
"Process BINDINGS and if all values are non-nil eval BODY.
Argument BINDINGS is a list of tuples whose car is a symbol to be
bound and (optionally) used in BODY, and its cadr is a sexp to be
evaled to set symbol's value. In the special case you only want
to bind a single value, BINDINGS can just be a plain tuple."
(declare (indent 1) (debug if-let))
(list 'if-let bindings (macroexp-progn body)))
(defsubst hash-table-keys (hash-table)
"Return a list of keys in HASH-TABLE."
(let ((keys '()))
......@@ -52,9 +159,7 @@
"Join all STRINGS using SEPARATOR."
(mapconcat 'identity strings separator))
(defsubst string-reverse (str)
"Reverse the string STR."
(apply 'string (nreverse (string-to-list str))))
(define-obsolete-function-alias 'string-reverse 'reverse "24.5")
(defsubst string-trim-left (string)
"Remove leading whitespace from STRING."
......
This diff is collapsed.
......@@ -478,6 +478,7 @@ word(s) will be searched for via `eww-search-prefix'."
(setq-local eww-current-url 'author)
(setq-local eww-current-dom nil)
(setq-local eww-current-source nil)
(setq-local eww-current-title "")
(setq-local browse-url-browser-function 'eww-browse-url)
(setq-local after-change-functions 'eww-process-text-input)
(setq-local eww-history nil)
......
......@@ -802,11 +802,11 @@ Function is called with PROCESS, COMMAND, SENDER, ARGS and LINE.")
(defun rcirc-buffer-process (&optional buffer)
"Return the process associated with channel BUFFER.
With no argument or nil as argument, use the current buffer."
(let ((buffer (or buffer (if (buffer-live-p rcirc-server-buffer)
rcirc-server-buffer
(error "Server buffer deleted")))))
(or (with-current-buffer buffer rcirc-process)
rcirc-process)))
(let ((buffer (or buffer (and (buffer-live-p rcirc-server-buffer)
rcirc-server-buffer))))
(if buffer
(with-current-buffer buffer rcirc-process)
rcirc-process)))
(defun rcirc-server-name (process)
"Return PROCESS server name, given by the 001 response."
......
......@@ -823,6 +823,8 @@ be after it."
(defmacro c-with-syntax-table (table &rest code)
;; Temporarily switches to the specified syntax table in a failsafe
;; way to execute code.
;; Maintainers' note: If TABLE is `c++-template-syntax-table', DON'T call
;; any forms inside this that call `c-parse-state'. !!!!
`(let ((c-with-syntax-table-orig-table (syntax-table)))
(unwind-protect
(progn
......
......@@ -9355,16 +9355,16 @@ comment at the start of cc-engine.el for more info."
(not (looking-at c-<-op-cont-regexp))))))
(c-with-syntax-table c++-template-syntax-table
(goto-char placeholder)
(c-beginning-of-statement-1 containing-sexp t)
(if (save-excursion
(c-backward-syntactic-ws containing-sexp)
(eq (char-before) ?<))
;; In a nested template arglist.
(progn
(goto-char placeholder)
(c-syntactic-skip-backward "^,;" containing-sexp t)
(c-forward-syntactic-ws))
(back-to-indentation)))
(c-beginning-of-statement-1 containing-sexp t))
(if (save-excursion
(c-backward-syntactic-ws containing-sexp)
(eq (char-before) ?<))
;; In a nested template arglist.
(progn
(goto-char placeholder)
(c-syntactic-skip-backward "^,;" containing-sexp t)
(c-forward-syntactic-ws))
(back-to-indentation))
;; FIXME: Should use c-add-stmt-syntax, but it's not yet
;; template aware.
(c-add-syntax 'template-args-cont (point) placeholder))
......@@ -10022,16 +10022,16 @@ comment at the start of cc-engine.el for more info."
(eq (char-after placeholder) ?<))))))
(c-with-syntax-table c++-template-syntax-table
(goto-char placeholder)
(c-beginning-of-statement-1 lim t)
(if (save-excursion
(c-backward-syntactic-ws lim)
(eq (char-before) ?<))
;; In a nested template arglist.
(progn
(goto-char placeholder)
(c-syntactic-skip-backward "^,;" lim t)
(c-forward-syntactic-ws))
(back-to-indentation)))
(c-beginning-of-statement-1 lim t))
(if (save-excursion
(c-backward-syntactic-ws lim)
(eq (char-before) ?<))
;; In a nested template arglist.
(progn
(goto-char placeholder)
(c-syntactic-skip-backward "^,;" lim t)
(c-forward-syntactic-ws))
(back-to-indentation))
;; FIXME: Should use c-add-stmt-syntax, but it's not yet
;; template aware.
(c-add-syntax 'template-args-cont (point) placeholder))
......
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