Now on revision 112922. ------------------------------------------------------------ revno: 112922 committer: Glenn Morris branch nick: trunk timestamp: Mon 2013-06-10 23:42:15 -0700 message: * doc/emacs/maintaining.texi (VC Directory Commands): Copyedit. (Branches): Put back milder version of pre 2013-06-07 text. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2013-06-07 14:00:27 +0000 +++ doc/emacs/ChangeLog 2013-06-11 06:42:15 +0000 @@ -1,7 +1,11 @@ +2013-06-11 Glenn Morris + + * maintaining.texi (VC Directory Commands): Copyedit. + (Branches): Put back milder version of pre 2013-06-07 text. + 2013-06-07 Xue Fuqiao - * maintaining.texi (Branches): Remove text copied from other - sources. + * maintaining.texi (Branches): Remove text copied from other sources. 2013-06-05 Alan Mackenzie === modified file 'doc/emacs/maintaining.texi' --- doc/emacs/maintaining.texi 2013-06-07 14:00:27 +0000 +++ doc/emacs/maintaining.texi 2013-06-11 06:42:15 +0000 @@ -1204,7 +1204,7 @@ @item x Hide files with @samp{up-to-date} status (@code{vc-dir-hide-up-to-date}). With a prefix argument, hide items -that are in state of item at point from display. +whose state is that of the item at point. @end table @findex vc-dir-mark @@ -1267,7 +1267,10 @@ @cindex branch (version control) One use of version control is to support multiple independent lines -of development, which are called @dfn{branches}. +of development, which are called @dfn{branches}. Amongst other +things, branches can be used for maintaining separate ``stable'' and +``development'' versions of a program, and for developing unrelated +features in isolation from one another. VC's support for branch operations is currently fairly limited. For decentralized version control systems, it provides commands for ------------------------------------------------------------ revno: 112921 fixes bug: http://debbugs.gnu.org/14583 committer: Glenn Morris branch nick: trunk timestamp: Mon 2013-06-10 23:36:06 -0700 message: * vc/log-view.el (log-view-mode-map): Inherit from special-mode-map, although define-derived-mode was doing this anyway. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-06-10 14:58:52 +0000 +++ lisp/ChangeLog 2013-06-11 06:36:06 +0000 @@ -1,3 +1,8 @@ +2013-06-11 Glenn Morris + + * vc/log-view.el (log-view-mode-map): Inherit from special-mode-map, + although define-derived-mode was doing this anyway. (Bug#14583) + 2013-06-10 Juanma Barranquero * allout.el (allout-encryption-plaintext-sanitization-regexps): === modified file 'lisp/vc/log-view.el' --- lisp/vc/log-view.el 2013-06-02 23:04:43 +0000 +++ lisp/vc/log-view.el 2013-06-11 06:36:06 +0000 @@ -123,8 +123,6 @@ (easy-mmode-defmap log-view-mode-map '( - ;; FIXME: (copy-keymap special-mode-map) instead - (" " . scroll-up-command) ("-" . negative-argument) ("0" . digit-argument) ("1" . digit-argument) @@ -136,14 +134,6 @@ ("7" . digit-argument) ("8" . digit-argument) ("9" . digit-argument) - ("<" . beginning-of-buffer) - (">" . end-of-buffer) - ("?" . describe-mode) - ("h" . describe-mode) - ("" . scroll-down-command) - (33554464 . scroll-down-command) - ("q" . quit-window) - ("g" . revert-buffer) ("\C-m" . log-view-toggle-entry-display) ("m" . log-view-toggle-mark-entry) @@ -162,6 +152,7 @@ ("\M-n" . log-view-file-next) ("\M-p" . log-view-file-prev)) "Log-View's keymap." + :inherit special-mode-map :group 'log-view) (easy-menu-define log-view-mode-menu log-view-mode-map ------------------------------------------------------------ revno: 112920 committer: Paul Eggert branch nick: trunk timestamp: Mon 2013-06-10 21:15:49 -0700 message: * keyboard.c: Don't use PROP (...) as an lvalue. (parse_tool_bar_item) [!USE_GTK && !HAVE_NS]: Use set_prop (A, B), not PROP (A) = B. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-06-10 14:58:52 +0000 +++ src/ChangeLog 2013-06-11 04:15:49 +0000 @@ -1,3 +1,9 @@ +2013-06-11 Paul Eggert + + * keyboard.c: Don't use PROP (...) as an lvalue. + (parse_tool_bar_item) [!USE_GTK && !HAVE_NS]: + Use set_prop (A, B), not PROP (A) = B. + 2013-06-10 Eli Zaretskii * xdisp.c (get_it_property): Use it->window instead of generating === modified file 'src/keyboard.c' --- src/keyboard.c 2013-06-05 01:58:43 +0000 +++ src/keyboard.c 2013-06-11 04:15:49 +0000 @@ -8150,11 +8150,12 @@ #if !defined (USE_GTK) && !defined (HAVE_NS) /* If we use build_desired_tool_bar_string to render the tool bar, the separator is rendered as an image. */ - PROP (TOOL_BAR_ITEM_IMAGES) - = menu_item_eval_property (Vtool_bar_separator_image_expression); - PROP (TOOL_BAR_ITEM_ENABLED_P) = Qnil; - PROP (TOOL_BAR_ITEM_SELECTED_P) = Qnil; - PROP (TOOL_BAR_ITEM_CAPTION) = Qnil; + set_prop (TOOL_BAR_ITEM_IMAGES, + (menu_item_eval_property + (Vtool_bar_separator_image_expression))); + set_prop (TOOL_BAR_ITEM_ENABLED_P, Qnil); + set_prop (TOOL_BAR_ITEM_SELECTED_P, Qnil); + set_prop (TOOL_BAR_ITEM_CAPTION, Qnil); #endif return 1; } ------------------------------------------------------------ revno: 112919 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Tue 2013-06-11 03:09:59 +0000 message: lisp/gnus/eww.el (eww-tag-input): Support password fields (eww-submit): Support POST diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-06-10 22:28:35 +0000 +++ lisp/gnus/ChangeLog 2013-06-11 03:09:59 +0000 @@ -1,3 +1,8 @@ +2013-06-11 Lars Magne Ingebrigtsen + + * eww.el (eww-tag-input): Support password fields. + (eww-submit): Support POST. + 2013-06-10 Lars Magne Ingebrigtsen * eww.el (eww-tag-form): Protect against degenerate forms. === modified file 'lisp/gnus/eww.el' --- lisp/gnus/eww.el 2013-06-10 22:28:35 +0000 +++ lisp/gnus/eww.el 2013-06-11 03:09:59 +0000 @@ -32,6 +32,7 @@ (defvar eww-current-url nil) (defvar eww-history nil) +;;;###autoload (defun eww (url) "Fetch URL and render the page." (interactive "sUrl: ") @@ -213,6 +214,7 @@ (or (cdr (assq :size cont)) "40")) :value (or (cdr (assq :value cont)) "") + :secret (and (equal type "password") ?*) :action 'eww-submit :name (cdr (assq :name cont)) :eww-form eww-form))))) @@ -279,11 +281,13 @@ (plist-get (cdr elem) :value)) values))) (let ((shr-base eww-current-url)) - (if (and (stringp (plist-get form :method)) - (equal (downcase (plist-get form :method)) "post")) + (if (and (stringp (cdr (assq :method form))) + (equal (downcase (cdr (assq :method form))) "post")) (let ((url-request-method "POST") + (url-request-extra-headers + '(("Content-Type" . "application/x-www-form-urlencoded"))) (url-request-data (mm-url-encode-www-form-urlencoded values))) - (eww-browse-url (shr-expand-url (plist-get form :action)))) + (eww-browse-url (shr-expand-url (cdr (assq :action form))))) (eww-browse-url (shr-expand-url (concat ------------------------------------------------------------ revno: 112918 committer: Paul Eggert branch nick: trunk timestamp: Mon 2013-06-10 16:02:33 -0700 message: Spelling fixes. diff: === modified file 'lisp/cedet/semantic/ctxt.el' --- lisp/cedet/semantic/ctxt.el 2013-06-02 13:33:09 +0000 +++ lisp/cedet/semantic/ctxt.el 2013-06-10 23:02:33 +0000 @@ -366,7 +366,7 @@ If the cursor is on 'this', will move point to the ; after entry.") (defun semantic-ctxt-end-of-symbol-default (&optional point) - "Move poin to the end of the current symbol under POINT. + "Move point to the end of the current symbol under POINT. This will move past type/field names when applicable. Depends on `semantic-type-relation-separator-character', and will work on C like languages." @@ -422,18 +422,18 @@ ;; Skip the separator and the symbol. (goto-char (match-end 0)) - + (if (looking-at "\\w\\|\\s_") ;; Skip symbols (forward-sexp 1) ;; No symbol, exit the search... (setq continuesearch nil)) - + (setq end (point))) - + ;; Cont... ) - + ;; Restore position if we go to far.... (error (goto-char end)) ) === modified file 'lisp/cedet/semantic/decorate/mode.el' --- lisp/cedet/semantic/decorate/mode.el 2013-06-02 13:33:09 +0000 +++ lisp/cedet/semantic/decorate/mode.el 2013-06-10 23:02:33 +0000 @@ -396,7 +396,7 @@ (let ((predicate (semantic-decorate-style-predicate name)) (highlighter (semantic-decorate-style-highlighter name)) (predicatedef (semantic-decorate-style-predicate-default name)) - (highlighterdef (semantic-decorate-style-highlighter-default name)) + (highlighterdef (semantic-decorate-style-highlighter-default name)) (defaultenable (if (plist-member flags :enabled) (plist-get flags :enabled) t)) @@ -422,14 +422,14 @@ (add-to-list 'semantic-decoration-styles (cons ',(symbol-name name) ,defaultenable)) - ;; If there is a load file, then create the autload tokens for + ;; If there is a load file, then create the autoload tokens for ;; those functions to load the token, but only if the fsym ;; doesn't exist yet. (when (stringp ,loadfile) (unless (fboundp ',predicatedef) (autoload ',predicatedef ',loadfile "Return non-nil to decorate TAG." nil 'function)) - + (unless (fboundp ',highlighterdef) (autoload ',highlighterdef ',loadfile "Decorate TAG." nil 'function)) ------------------------------------------------------------ revno: 112917 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2013-06-10 22:28:35 +0000 message: lisp/gnus/eww.el (eww-tag-form): Protect against degenerate forms diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-06-10 22:12:47 +0000 +++ lisp/gnus/ChangeLog 2013-06-10 22:28:35 +0000 @@ -1,5 +1,7 @@ 2013-06-10 Lars Magne Ingebrigtsen + * eww.el (eww-tag-form): Protect against degenerate forms. + * shr.el (shr-expand-url): Expand URLs that start with a slash correctly. === modified file 'lisp/gnus/eww.el' --- lisp/gnus/eww.el 2013-06-10 22:12:47 +0000 +++ lisp/gnus/eww.el 2013-06-10 22:28:35 +0000 @@ -177,8 +177,9 @@ (shr-ensure-paragraph) (shr-generic cont) (shr-ensure-paragraph) - (put-text-property start (1+ start) - 'eww-form eww-form))) + (when (> (point) start) + (put-text-property start (1+ start) + 'eww-form eww-form)))) (defun eww-tag-input (cont) (let* ((start (point)) ------------------------------------------------------------ revno: 112916 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2013-06-10 22:12:47 +0000 message: lisp/gnus/eww.el (eww-tag-input): Implement submit buttons (eww-click-radio): Implement radio and checkboxes (eww-submit): Handle hidden elements (eww-submit): Get submit button logic right lisp/gnus/shr.el (shr-expand-url): Expand URLs that start with a slash correctly diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-06-10 14:11:01 +0000 +++ lisp/gnus/ChangeLog 2013-06-10 22:12:47 +0000 @@ -1,6 +1,18 @@ 2013-06-10 Lars Magne Ingebrigtsen + * shr.el (shr-expand-url): Expand URLs that start with a slash + correctly. + + * eww.el (eww-submit): Get submit button logic right. + + * shr.el (shr-final-table-render): New variable to signal when we're + doing the final table rendering so that we can collect more data at + that point. + * eww.el (eww-submit): Make form submission work. + (eww-tag-input): Implement submit buttons. + (eww-click-radio): Implement radio and checkboxes. + (eww-submit): Handle hidden elements. * shr.el (shr-descend): Allow other packages to override (or provide) rendering of elements. === modified file 'lisp/gnus/eww.el' --- lisp/gnus/eww.el 2013-06-10 14:11:01 +0000 +++ lisp/gnus/eww.el 2013-06-10 22:12:47 +0000 @@ -118,6 +118,7 @@ (let ((map (make-sparse-keymap))) (suppress-keymap map) (define-key map "q" 'eww-quit) + (define-key map "g" 'eww-reload) (define-key map [tab] 'widget-forward) (define-key map [backtab] 'widget-backward) (define-key map [delete] 'scroll-down-command) @@ -158,6 +159,12 @@ (let ((prev (pop eww-history))) (url-retrieve (car prev) 'eww-render (list (car prev) (cadr prev))))) +(defun eww-reload () + "Reload the current page." + (interactive) + (url-retrieve eww-current-url 'eww-render + (list eww-current-url (point)))) + ;; Form support. (defvar eww-form nil) @@ -174,40 +181,112 @@ 'eww-form eww-form))) (defun eww-tag-input (cont) - (let ((start (point)) - (widget (list - 'editable-field - :size (string-to-number - (or (cdr (assq :size cont)) - "40")) - :value (or (cdr (assq :value cont)) "") - :action 'eww-submit - :name (cdr (assq :name cont)) - :eww-form eww-form))) - (apply 'widget-create widget) - (shr-generic cont) + (let* ((start (point)) + (type (downcase (or (cdr (assq :type cont)) + "text"))) + (widget + (cond + ((equal type "submit") + (list + 'push-button + :notify 'eww-submit + :name (cdr (assq :name cont)) + :eww-form eww-form + (or (cdr (assq :value cont)) "Submit"))) + ((or (equal type "radio") + (equal type "checkbox")) + (list 'checkbox + :notify 'eww-click-radio + :name (cdr (assq :name cont)) + :checkbox-value (cdr (assq :value cont)) + :eww-form eww-form + (cdr (assq :checked cont)))) + ((equal type "hidden") + (list 'hidden + :name (cdr (assq :name cont)) + :value (cdr (assq :value cont)))) + (t + (list + 'editable-field + :size (string-to-number + (or (cdr (assq :size cont)) + "40")) + :value (or (cdr (assq :value cont)) "") + :action 'eww-submit + :name (cdr (assq :name cont)) + :eww-form eww-form))))) + (if (eq (car widget) 'hidden) + (when shr-final-table-render + (nconc eww-form (list widget))) + (apply 'widget-create widget)) (put-text-property start (point) 'eww-widget widget))) -(defun eww-submit (widget dummy) - (let ((form (getf (cdr widget) :eww-form)) +(defun eww-click-radio (widget &rest ignore) + (let ((form (plist-get (cdr widget) :eww-form)) + (name (plist-get (cdr widget) :name))) + (if (widget-value widget) + ;; Switch all the other radio buttons off. + (dolist (overlay (overlays-in (point-min) (point-max))) + (let ((field (plist-get (overlay-properties overlay) 'button))) + (when (and (eq (plist-get (cdr field) :eww-form) form) + (equal name (plist-get (cdr field) :name))) + (unless (eq field widget) + (widget-value-set field nil))))) + (widget-value-set widget t)) + (eww-fix-widget-keymap))) + +(defun eww-submit (widget &rest ignore) + (let ((form (plist-get (cdr widget) :eww-form)) + (first-button t) values) - (dolist (overlay (overlays-in (point-min) (point-max))) - (let ((field (getf (overlay-properties overlay) 'field))) - (when (eq (getf (cdr field) :eww-form) form) - (let ((name (getf (cdr field) :name))) + (dolist (overlay (sort (overlays-in (point-min) (point-max)) + (lambda (o1 o2) + (< (overlay-start o1) (overlay-start o2))))) + (let ((field (or (plist-get (overlay-properties overlay) 'field) + (plist-get (overlay-properties overlay) 'button) + (plist-get (overlay-properties overlay) 'eww-hidden)))) + (when (eq (plist-get (cdr field) :eww-form) form) + (let ((name (plist-get (cdr field) :name))) (when name - (push (cons name (widget-value field)) - values)))))) + (cond + ((eq (car field) 'checkbox) + (when (widget-value field) + (push (cons name (plist-get (cdr field) :checkbox-value)) + values))) + ((eq (car field) 'eww-hidden) + (push (cons name (plist-get (cdr field) :value)) + values)) + ((eq (car field) 'push-button) + ;; We want the values from buttons if we hit a button, + ;; or we're submitting something and this is the first + ;; button displayed. + (when (or (and (eq (car widget) 'push-button) + (eq widget field)) + (and (not (eq (car widget) 'push-button)) + (eq (car field) 'push-button) + first-button)) + (setq first-button nil) + (push (cons name (widget-value field)) + values))) + (t + (push (cons name (widget-value field)) + values)))))))) + (dolist (elem form) + (when (and (consp elem) + (eq (car elem) 'hidden)) + (push (cons (plist-get (cdr elem) :name) + (plist-get (cdr elem) :value)) + values))) (let ((shr-base eww-current-url)) - (if (and (stringp (getf form :method)) - (equal (downcase (getf form :method)) "post")) + (if (and (stringp (plist-get form :method)) + (equal (downcase (plist-get form :method)) "post")) (let ((url-request-method "POST") (url-request-data (mm-url-encode-www-form-urlencoded values))) - (eww-browse-url (shr-expand-url (getf form :action)))) + (eww-browse-url (shr-expand-url (plist-get form :action)))) (eww-browse-url (shr-expand-url (concat - (getf form :action) + (cdr (assq :action form)) "?" (mm-url-encode-www-form-urlencoded values)))))))) @@ -217,10 +296,19 @@ (while (setq start (next-single-property-change start 'eww-widget)) (setq widget (get-text-property start 'eww-widget)) (goto-char start) - (delete-region start (next-single-property-change start 'eww-widget)) - (apply 'widget-create widget) - (put-text-property start (point) 'not-read-only t)) - (widget-setup))) + (let ((end (next-single-property-change start 'eww-widget))) + (dolist (overlay (overlays-in start end)) + (when (plist-get (overlay-properties overlay) 'button) + (delete-overlay overlay))) + (delete-region start end)) + (apply 'widget-create widget)) + (widget-setup) + (eww-fix-widget-keymap))) + +(defun eww-fix-widget-keymap () + (dolist (overlay (overlays-in (point-min) (point-max))) + (when (plist-get (overlay-properties overlay) 'button) + (overlay-put overlay 'local-map widget-keymap)))) (provide 'eww) === modified file 'lisp/gnus/shr.el' --- lisp/gnus/shr.el 2013-06-10 14:11:01 +0000 +++ lisp/gnus/shr.el 2013-06-10 22:12:47 +0000 @@ -115,6 +115,7 @@ (defvar shr-base nil) (defvar shr-ignore-cache nil) (defvar shr-external-rendering-functions nil) +(defvar shr-final-table-render nil) (defvar shr-map (let ((map (make-sparse-keymap))) @@ -490,6 +491,7 @@ ;; Absolute URL. url (let ((base shr-base)) + ;; Chop off query string. (when (string-match "^\\([^?]+\\)[?]" base) (setq base (match-string 1 base))) (cond @@ -499,6 +501,9 @@ ((and (not (string-match "/\\'" base)) (not (string-match "\\`/" url))) (concat base "/" url)) + ((and (string-match "\\`/" url) + (string-match "\\(\\`[^:]*://[^/]+\\)/" base)) + (concat (match-string 1 base) url)) (t (concat base url)))))) @@ -1177,7 +1182,8 @@ (frame-width)) (setq truncate-lines t)) ;; Then render the table again with these new "hard" widths. - (shr-insert-table (shr-make-table cont sketch-widths t) sketch-widths)) + (let ((shr-final-table-render t)) + (shr-insert-table (shr-make-table cont sketch-widths t) sketch-widths))) ;; Finally, insert all the images after the table. The Emacs buffer ;; model isn't strong enough to allow us to put the images actually ;; into the tables. ------------------------------------------------------------ revno: 112915 committer: Paul Eggert branch nick: trunk timestamp: Mon 2013-06-10 13:26:20 -0700 message: Documentation fix for 'ls' and hard links. * compile.texi (Compilation Functions): * files.texi (File Attributes, Changing Files): Use current format for GNU 'ls' output. (File Attributes): Fix problem introduced in previous change: the link count is the number of hard links, not the number of hard links + 1. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-06-10 11:19:12 +0000 +++ doc/lispref/ChangeLog 2013-06-10 20:26:20 +0000 @@ -1,3 +1,13 @@ +2013-06-10 Paul Eggert + + Documentation fix for 'ls' and hard links. + * compile.texi (Compilation Functions): + * files.texi (File Attributes, Changing Files): + Use current format for GNU 'ls' output. + (File Attributes): Fix problem introduced in previous change: + the link count is the number of hard links, not the number + of hard links + 1. + 2013-06-10 Xue Fuqiao * files.texi (File Attributes): Fix typo. === modified file 'doc/lispref/compile.texi' --- doc/lispref/compile.texi 2013-03-24 17:55:06 +0000 +++ doc/lispref/compile.texi 2013-06-10 20:26:20 +0000 @@ -181,8 +181,8 @@ @example @group -% ls -l push* --rw-r--r-- 1 lewis 791 Oct 5 20:31 push.el +$ ls -l push* +-rw-r--r-- 1 lewis lewis 791 Oct 5 20:31 push.el @end group @group @@ -191,9 +191,9 @@ @end group @group -% ls -l push* --rw-r--r-- 1 lewis 791 Oct 5 20:31 push.el --rw-rw-rw- 1 lewis 638 Oct 8 20:25 push.elc +$ ls -l push* +-rw-r--r-- 1 lewis lewis 791 Oct 5 20:31 push.el +-rw-rw-rw- 1 lewis lewis 638 Oct 8 20:25 push.elc @end group @end example @end deffn @@ -232,7 +232,7 @@ files that have an up-to-date @samp{.elc} file. @example -% emacs -batch -f batch-byte-compile *.el +$ emacs -batch -f batch-byte-compile *.el @end example @end defun === modified file 'doc/lispref/files.texi' --- doc/lispref/files.texi 2013-06-10 11:19:12 +0000 +++ doc/lispref/files.texi 2013-06-10 20:26:20 +0000 @@ -1139,8 +1139,8 @@ @end group @group -% ls -l diffs - -rw-rw-rw- 1 lewis 0 3063 Oct 30 16:00 diffs +$ ls -l diffs +-rw-rw-rw- 1 lewis lewis 3063 Oct 30 16:00 diffs @end group @end example @@ -1166,17 +1166,17 @@ levels of parent directories. @defun file-nlinks filename -This function returns the number of names (i.e., hard link(s) + 1) -that file @var{filename} has. If the file does not exist, then this -function returns @code{nil}. Note that symbolic links have no effect -on this function, because they are not considered to be names of the -files they link to. +This function returns the number of names (i.e., hard links) that +file @var{filename} has. If the file does not exist, this function +returns @code{nil}. Note that symbolic links have no effect on this +function, because they are not considered to be names of the files +they link to. @example @group -% ls -l foo* --rw-rw-rw- 2 rms 4 Aug 19 01:27 foo --rw-rw-rw- 2 rms 4 Aug 19 01:27 foo1 +$ ls -l foo* +-rw-rw-rw- 2 rms rms 4 Aug 19 01:27 foo +-rw-rw-rw- 2 rms rms 4 Aug 19 01:27 foo1 @end group @group @@ -1477,9 +1477,9 @@ @example @group -% ls -li fo* -81908 -rw-rw-rw- 1 rms 29 Aug 18 20:32 foo -84302 -rw-rw-rw- 1 rms 24 Aug 18 20:31 foo3 +$ ls -li fo* +81908 -rw-rw-rw- 1 rms rms 29 Aug 18 20:32 foo +84302 -rw-rw-rw- 1 rms rms 24 Aug 18 20:31 foo3 @end group @end example @@ -1494,10 +1494,10 @@ @end group @group -% ls -li fo* -81908 -rw-rw-rw- 2 rms 29 Aug 18 20:32 foo -81908 -rw-rw-rw- 2 rms 29 Aug 18 20:32 foo2 -84302 -rw-rw-rw- 1 rms 24 Aug 18 20:31 foo3 +$ ls -li fo* +81908 -rw-rw-rw- 2 rms rms 29 Aug 18 20:32 foo +81908 -rw-rw-rw- 2 rms rms 29 Aug 18 20:32 foo2 +84302 -rw-rw-rw- 1 rms rms 24 Aug 18 20:31 foo3 @end group @end example @@ -1519,10 +1519,10 @@ @end group @group -% ls -li fo* -81908 -rw-rw-rw- 3 rms 29 Aug 18 20:32 foo -81908 -rw-rw-rw- 3 rms 29 Aug 18 20:32 foo2 -81908 -rw-rw-rw- 3 rms 29 Aug 18 20:32 foo3 +$ ls -li fo* +81908 -rw-rw-rw- 3 rms rms 29 Aug 18 20:32 foo +81908 -rw-rw-rw- 3 rms rms 29 Aug 18 20:32 foo2 +81908 -rw-rw-rw- 3 rms rms 29 Aug 18 20:32 foo3 @end group @end example ------------------------------------------------------------ revno: 112914 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2013-06-10 16:58:52 +0200 message: Fix ChangeLog typos and whitespace. diff: === modified file 'ChangeLog' --- ChangeLog 2013-06-09 15:59:30 +0000 +++ ChangeLog 2013-06-10 14:58:52 +0000 @@ -12,8 +12,8 @@ 2013-06-07 Richard Copley (tiny change) * Makefile.in (msys_to_w32): Modify to support d:\foo file names. - (msys_lisppath_to_w32, msys_prefix_subst, msys_sed_sh_escape): New - variables. + (msys_lisppath_to_w32, msys_prefix_subst, msys_sed_sh_escape): + New variables. (epaths-force-w32): Use them. (Bug#14513) 2013-06-03 Michael Albinus @@ -34,7 +34,7 @@ * configure.ac (file-notification): New option, replaces inotify option. (HAVE_W32): Remove w32notify.o. - (with_file_notification): Add checks for glib and w32. Adapt check + (with_file_notification): Add checks for glib and w32. Adapt check for inotify. (Summary): Add entry for file notification. @@ -124,7 +124,7 @@ 2013-05-07 Paul Eggert - Use Gnulib ACL implementation, for benefit of Solaris etc. (Bug#14295) + Use Gnulib ACL implementation, for benefit of Solaris etc. (Bug#14295) * configure.ac: Remove -with-acl option, since Gnulib does that for us now. (LIBACL_LIBS): Remove; no longer needed. @@ -496,7 +496,7 @@ 2012-12-14 Paul Eggert - Fix permissions bugs with setgid directories etc. (Bug#13125) + Fix permissions bugs with setgid directories etc. (Bug#13125) * configure.ac (BSD4_2): Remove; no longer needed. 2012-12-13 Glenn Morris @@ -2186,7 +2186,7 @@ 2012-02-05 Christoph Scholtes - * make-dist (README.W32): Include file in source tarball. (Bug#9750) + * make-dist (README.W32): Include file in source tarball. (Bug#9750) * lib/makefile.w32-in (PRAGMA_SYSTEM_HEADER): Move to platform specific makefiles to support getopt_.h generation with MSVC. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-06-10 14:37:02 +0000 +++ lisp/ChangeLog 2013-06-10 14:58:52 +0000 @@ -6,9 +6,8 @@ 2013-06-10 Aidan Gauland * eshell/em-term.el (eshell-visual-commands) - (eshell-visual-subcommands) - (eshell-visual-options): Add summary line to docstrings. Add - cross-references. + (eshell-visual-subcommands, eshell-visual-options): + Add summary line to docstrings. Add cross-references. 2013-06-10 Glenn Morris @@ -25,8 +24,9 @@ * eshell/em-term.el (eshell-visual-command-p): New function. (eshell-term-initialize): Move long lambda to separate function eshell-visual-command-p. - * eshell/em-dirs.el (eshell-dirs-initialise): Add missing #' to lambda. - * eshell/em-script.el (eshell-script-initialize): Add missing #' to lambda. + * eshell/em-dirs.el (eshell-dirs-initialise): + * eshell/em-script.el (eshell-script-initialize): + Add missing #' to lambda. 2013-06-08 Leo Liu @@ -247,7 +247,7 @@ (auto-revert-notify-event-p, auto-revert-notify-event-file-name) (auto-revert-notify-handler): Handle also gfilenotify. - * subr.el (file-notify-handle-event): New defun. Replacing ... + * subr.el (file-notify-handle-event): New defun. Replacing ... (inotify-event-p, inotify-handle-event, w32notify-handle-event): Remove. @@ -359,10 +359,10 @@ (eshell-find-interpreter): Add new second parameter ARGS. * eshell/em-script.el (eshell-script-initialize): Add second arg - to the function added as MATCH to `eshell-interpreter-alist' + to the function added as MATCH to `eshell-interpreter-alist'. * eshell/em-dirs.el (eshell-dirs-initialize): Add second arg to - the function added as MATCH to `eshell-interpreter-alist' + the function added as MATCH to `eshell-interpreter-alist'. * eshell/em-term.el (eshell-visual-subcommands): New defcustom. (eshell-visual-options): New defcustom. @@ -2267,7 +2267,7 @@ * comint.el (comint-dynamic-complete-functions, comint-mode-map): `comint-dynamic-complete' is obsolete since 24.1, replaced by - `completion-at-point'. (Bug#13774) + `completion-at-point'. (Bug#13774) * startup.el (normal-no-mouse-startup-screen): Bug fix, the default key binding for `describe-distribution' has been moved to @@ -2296,7 +2296,8 @@ * comint.el (comint-redirect-original-filter-function): Remove. (comint-redirect-cleanup, comint-redirect-send-command-to-process): - * vc/vc-cvs.el (vc-cvs-annotate-process-filter,vc-cvs-annotate-command): + * vc/vc-cvs.el (vc-cvs-annotate-process-filter) + (vc-cvs-annotate-command): * progmodes/octave-inf.el (inferior-octave-send-list-and-digest): * progmodes/prolog.el (prolog-consult-compile): * progmodes/gdb-mi.el (gdb, gdb--check-interpreter): @@ -2735,7 +2736,6 @@ * emacs-lisp/package.el (package-pinned-packages): New var. (package--add-to-archive-contents): Obey it (bug#14118). - 2013-04-03 Alan Mackenzie Handle `parse-partial-sexp' landing inside a comment opener (Bug#13244). @@ -4966,7 +4966,7 @@ 2013-01-12 Eli Zaretskii * autorevert.el (auto-revert-notify-handler): Fix filtering of - file notification by ACTION. For filtering by file name, compare + file notification by ACTION. For filtering by file name, compare only the non-directory part of the file name. 2013-01-12 Stefan Monnier @@ -5049,7 +5049,7 @@ 2013-01-11 Julien Danjou * color.el (color-rgb-to-hsv): Fix conversion computing in case min and - max are almost equal. Also return the correct value for V which is + max are almost equal. Also return the correct value for V which is already between 0 and 1. 2013-01-11 Dmitry Antipov @@ -5503,7 +5503,7 @@ 2012-12-31 Jürgen Hötzel * net/tramp-adb.el (tramp-adb-maybe-open-connection): Handle errors - (No device connected, invalid device name). (Bug #13299) + (No device connected, invalid device name). (Bug #13299) 2012-12-31 Martin Rudalics @@ -5888,7 +5888,7 @@ 2012-12-14 Paul Eggert - Fix permissions bugs with setgid directories etc. (Bug#13125) + Fix permissions bugs with setgid directories etc. (Bug#13125) * files.el (backup-buffer): Don't rely on 9th output of file-attributes, as it's now a placeholder. Instead, use the new optional arg of file-ownership-preserved-p. @@ -6346,7 +6346,7 @@ * textmodes/ispell.el (ispell-init-process) (ispell-start-process, ispell-internal-change-dictionary): Make sure personal dictionary name is expanded after initial - `default-directory' value. Use expanded strings for + `default-directory' value. Use expanded strings for keep/restart checks and for value (Bug#13019). 2012-12-03 Jay Belanger @@ -7028,7 +7028,7 @@ * play/gamegrid.el (gamegrid-add-score-with-update-game-score-1): Don't signal an error with a score that is too low to add to the - list of top scores. (Bug#12779) + list of top scores. (Bug#12779) 2012-11-17 Chong Yidong @@ -7097,7 +7097,7 @@ * window.el (record-window-buffer) (display-buffer-record-window): When copying the markers to - window-point preserve window-point-insertion-type. (Bug#12588) + window-point preserve window-point-insertion-type. (Bug#12588) 2012-11-16 Glenn Morris @@ -7185,8 +7185,8 @@ (ad-advice-definition): Redefine as functions. (ad-advice-classes): Move before first use. (ad-make-origname, ad-set-orig-definition, ad-clear-orig-definition) - (ad-make-mapped-call, ad-make-advised-docstring,ad-make-plain-docstring) - (ad--defalias-fset): Remove functions. + (ad-make-mapped-call, ad-make-advised-docstring) + (ad-make-plain-docstring, ad--defalias-fset): Remove functions. (ad-make-advicefunname, ad-clear-advicefunname-definition): New funs. (ad-get-orig-definition): Rewrite. (ad-make-advised-definition-docstring): Change base docstring. @@ -7534,7 +7534,7 @@ buffer and calls `ispell-buffer' with debugging enabled. * textmodes/ispell.el (ispell-region): Do not prefix sent string by - comment in autoconf mode. (Bug#12768) + comment in autoconf mode. (Bug#12768) 2012-11-06 Dmitry Antipov @@ -8679,13 +8679,13 @@ * textmodes/reftex-cite.el (reftex-create-bibtex-file): Make sure that entries with whitespace at various places are found. - Doc fix. Include entries that are cross-referenced from cited entries. + Doc fix. Include entries that are cross-referenced from cited entries. Include @String definitions in the resulting bib file. Add header and footer defined in `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. (reftex-do-citation): Make it possible again to insert non-existent entries. Save match data when asking for optional - arguments. Return all keys, not just the first one. + arguments. Return all keys, not just the first one. (reftex-all-used-citation-keys): Fix regexp to correctly extract all citations in the same line. (reftex-parse-bibtex-entry): Accept additional optional argument @@ -8745,7 +8745,7 @@ * textmodes/reftex-sel.el (reftex-select-cycle-ref-style-internal): Adapt to new structure - of `reftex-ref-style-alist'. Remove code for testing macro type. + of `reftex-ref-style-alist'. Remove code for testing macro type. (reftex-select-toggle-varioref) (reftex-select-toggle-fancyref): Remove. (reftex-select-cycle-ref-style-internal) @@ -9287,7 +9287,7 @@ * textmodes/bibtex.el (bibtex-autokey-transcriptions): Transcribe also LaTeX hyphenation. - (bibtex-reformat): Bug fix. Do not quote twice the elements of + (bibtex-reformat): Bug fix. Do not quote twice the elements of bibtex-reformat-previous-options. 2012-09-23 Roland Winkler @@ -12314,7 +12314,7 @@ (xml-name-start-char-re, xml-name-char-re, xml-name-re) (xml-names-re, xml-nmtoken-re, xml-nmtokens-re, xml-char-ref-re) (xml-entity-ref, xml-pe-reference-re) - (xml-reference-re,xml-att-value-re, xml-tokenized-type-re) + (xml-reference-re, xml-att-value-re, xml-tokenized-type-re) (xml-notation-type-re, xml-enumeration-re, xml-enumerated-type-re) (xml-att-type-re, xml-default-decl-re, xml-att-def-re) (xml-entity-value-re): Use syntax references in regexps where @@ -20699,7 +20699,7 @@ 2011-10-07 Chong Yidong - * bindings.el ([M-left],[M-right]): Bind to left-word and + * bindings.el ([M-left], [M-right]): Bind to left-word and right-word respectively. 2011-10-07 Glenn Morris @@ -26021,15 +26021,15 @@ 2011-05-10 Jim Meyering Fix doubled-word typos. - * international/quail.el (quail-insert-kbd-layout): and and -> and - * kermit.el: and and -> and - * net/ldap.el (ldap-search-internal): to to -> to + * international/quail.el (quail-insert-kbd-layout): and and -> and. + * kermit.el: and and -> and. + * net/ldap.el (ldap-search-internal): to to -> to. * progmodes/vhdl-mode.el (vhdl-offsets-alist): Likewise. - * progmodes/js.el (js-mode): and and -> and - * textmodes/artist.el (artist-move-to-xy): at at -> at - (artist-draw-region-trim-line-endings): if if -> if + * progmodes/js.el (js-mode): and and -> and. + * textmodes/artist.el (artist-move-to-xy): at at -> at. + (artist-draw-region-trim-line-endings): if if -> if. And Safetyc -> Safety. - * textmodes/reftex-dcr.el (reftex-view-crossref): at at -> at a + * textmodes/reftex-dcr.el (reftex-view-crossref): at at -> at a. 2011-05-10 Glenn Morris Stefan Monnier === modified file 'nt/ChangeLog' --- nt/ChangeLog 2013-06-07 08:31:53 +0000 +++ nt/ChangeLog 2013-06-10 14:58:52 +0000 @@ -108,7 +108,7 @@ 2013-05-07 Paul Eggert - Use Gnulib ACL implementation, for benefit of Solaris etc. (Bug#14295) + Use Gnulib ACL implementation, for benefit of Solaris etc. (Bug#14295) * config.nt (HAVE_ACL_SET_FILE): Rename from HAVE_POSIX_ACL. * inc/ms-w32.h (EOPNOTSUPP): New macro. @@ -636,7 +636,7 @@ 2012-09-01 Daniel Colascione - * inc/ms-w32.h (TERM_HEADER): Add for refactoring + * inc/ms-w32.h (TERM_HEADER): Add for refactoring. 2012-08-22 Juanma Barranquero @@ -934,8 +934,8 @@ (install-other-dirs-nmake, install-other-dirs-gmake): Depend on `all'. (install-shortcuts): Depend on $(INSTALL_DIR)/bin. Copy addpm.exe here. - (maybe-copy-distfiles-CMD, maybe-copy-distfiles-SH, dist): Depend - on create-tmp-dist-dir. + (maybe-copy-distfiles-CMD, maybe-copy-distfiles-SH, dist): + Depend on create-tmp-dist-dir. * nmake.defs (DIRNAME): New variable. (IFNOTSAMEDIR): Use $(DIRNAME)_same-dir.tst instead of === modified file 'src/ChangeLog' --- src/ChangeLog 2013-06-10 04:36:06 +0000 +++ src/ChangeLog 2013-06-10 14:58:52 +0000 @@ -24,8 +24,8 @@ * xdisp.c (init_from_display_pos, init_iterator) (handle_single_display_spec, next_overlay_string) (get_overlay_strings_1, reseat_1, reseat_to_string) - (push_prefix_prop, Fcurrent_bidi_paragraph_direction): Set - bidi_it.w member from it->w. + (push_prefix_prop, Fcurrent_bidi_paragraph_direction): + Set bidi_it.w member from it->w. (compute_display_string_pos): Accept additional argument, the window being displayed, and pass it to Fget_char_property. (Bug#14575) @@ -36,7 +36,7 @@ 2013-06-08 Jan Djärv - * xgselect.c: Remove unneeded include xterm.h + * xgselect.c: Remove unneeded include xterm.h. * process.c (wait_reading_process_output): Check for NS before GLIB. GLIB may be linked in due to rsvg, but ns_select must be called. @@ -338,8 +338,8 @@ (update_frame_tool_bar): Update code for GNUStep. (clearAll): New method. (addDisplayItemWithImage:idx:tag:helpText:enabled:): Handle new tag - argument. Call insertItemWithItemIdentifier when NS_IMPL_GNUSTEP. Move - identifierToItem setObject and activeIdentifiers addObject before + argument. Call insertItemWithItemIdentifier when NS_IMPL_GNUSTEP. + Move identifierToItem setObject and activeIdentifiers addObject before call to insertItemWithItemIdentifier. (validateVisibleItems): Fix indentation. (toolbarAllowedItemIdentifiers:): Return activeIdentifiers. @@ -353,7 +353,7 @@ Use F suffix on floats. (ns_char_width): Returns CGFloat. (ns_ascii_average_width): w is CGFloat instead of float. - (nsfont_draw): cbuf and c are unsigned. Cast to char* in call to + (nsfont_draw): cbuf and c are unsigned. Cast to char* in call to DPSxshow. (ns_glyph_metrics): CGFloat instead of float. @@ -648,7 +648,7 @@ 2013-05-07 Paul Eggert - Use Gnulib ACL implementation, for benefit of Solaris etc. (Bug#14295) + Use Gnulib ACL implementation, for benefit of Solaris etc. (Bug#14295) * Makefile.in (LIB_ACL): New macro. (LIBACL_LIBS): Remove. (LIBES): Use LIB_ACL, not LIBACL_LIBS. @@ -3081,11 +3081,10 @@ 2012-12-31 Adam Sjøgren (tiny change) * xterm.c (scroll-bar-adjust-thumb-portion): New variable to - determine whether scroll bar thumb size should be adjusted or - not. Use variable for MOTIF. + determine whether scroll bar thumb size should be adjusted or not. + Use variable for MOTIF. - * gtkutil.c (scroll-bar-adjust-thumb-portion): Use variable for - GTK. + * gtkutil.c (scroll-bar-adjust-thumb-portion): Use variable for GTK. 2013-01-13 Jan Djärv @@ -3630,7 +3629,7 @@ 2012-12-14 Paul Eggert - Fix permissions bugs with setgid directories etc. (Bug#13125) + Fix permissions bugs with setgid directories etc. (Bug#13125) * dired.c (Ffile_attributes): Return t as the 9th attribute, to mark it as a placeholder. The old value was often wrong. The only user of this attribute has been changed to use ------------------------------------------------------------ revno: 112913 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2013-06-10 16:37:02 +0200 message: lisp/allout.el: Fix make-variable-buffer-local call. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-06-10 02:41:49 +0000 +++ lisp/ChangeLog 2013-06-10 14:37:02 +0000 @@ -1,3 +1,8 @@ +2013-06-10 Juanma Barranquero + + * allout.el (allout-encryption-plaintext-sanitization-regexps): + Fix make-variable-buffer-local call to refer to the correct variable. + 2013-06-10 Aidan Gauland * eshell/em-term.el (eshell-visual-commands) === modified file 'lisp/allout.el' --- lisp/allout.el 2013-05-22 07:07:19 +0000 +++ lisp/allout.el 2013-06-10 14:37:02 +0000 @@ -1561,7 +1561,7 @@ substitution string. If it's just a regexp, all its matches are removed before the text is encrypted. If it's a regexp and a substitution, the substitution is used against the regexp matches, a la `replace-match'.") -(make-variable-buffer-local 'allout-encryption-text-removal-regexps) +(make-variable-buffer-local 'allout-encryption-plaintext-sanitization-regexps) ;;;_ = allout-encryption-ciphertext-rejection-regexps (defvar allout-encryption-ciphertext-rejection-regexps nil "Variable for regexps matching plaintext to remove before encryption. ------------------------------------------------------------ revno: 112912 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2013-06-10 14:11:01 +0000 message: lisp/gnus/eww.el: Add form support; Make form submission work; Support POST diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-06-10 11:46:27 +0000 +++ lisp/gnus/ChangeLog 2013-06-10 14:11:01 +0000 @@ -1,6 +1,13 @@ 2013-06-10 Lars Magne Ingebrigtsen + * eww.el (eww-submit): Make form submission work. + + * shr.el (shr-descend): Allow other packages to override (or provide) + rendering of elements. + (shr-expand-url): Strip query strings from URLs before expanding them. + * eww.el: Don't require cl-lib. + (eww-tag-form): Start form support. * eww.el: Start writing a new, tiny web browser. (eww-previous-url): New command. === modified file 'lisp/gnus/eww.el' --- lisp/gnus/eww.el 2013-06-10 11:46:27 +0000 +++ lisp/gnus/eww.el 2013-06-10 14:11:01 +0000 @@ -27,6 +27,7 @@ (eval-when-compile (require 'cl)) (require 'shr) (require 'url) +(require 'mm-url) (defvar eww-current-url nil) (defvar eww-history nil) @@ -82,8 +83,13 @@ (libxml-parse-html-region (point) (point-max))))) (eww-setup-buffer) (setq eww-current-url url) - (let ((inhibit-read-only t)) - (shr-insert-document document)) + (let ((inhibit-read-only t) + (shr-external-rendering-functions + '((form . eww-tag-form) + (input . eww-tag-input) + (submit . eww-tag-submit)))) + (shr-insert-document document) + (eww-convert-widgets)) (goto-char (point-min)))) (defun eww-display-raw (charset) @@ -102,6 +108,8 @@ (defun eww-setup-buffer () (pop-to-buffer (get-buffer-create "*eww*")) + (remove-overlays) + (setq widget-field-list nil) (let ((inhibit-read-only t)) (erase-buffer)) (eww-mode)) @@ -128,7 +136,7 @@ mode-name "eww") (set (make-local-variable 'eww-current-url) 'author) (set (make-local-variable 'browse-url-browser-function) 'eww-browse-url) - (setq buffer-read-only t) + ;;(setq buffer-read-only t) (use-local-map eww-mode-map)) (defun eww-browse-url (url &optional new-window) @@ -150,6 +158,70 @@ (let ((prev (pop eww-history))) (url-retrieve (car prev) 'eww-render (list (car prev) (cadr prev))))) +;; Form support. + +(defvar eww-form nil) + +(defun eww-tag-form (cont) + (let ((eww-form + (list (assq :method cont) + (assq :action cont))) + (start (point))) + (shr-ensure-paragraph) + (shr-generic cont) + (shr-ensure-paragraph) + (put-text-property start (1+ start) + 'eww-form eww-form))) + +(defun eww-tag-input (cont) + (let ((start (point)) + (widget (list + 'editable-field + :size (string-to-number + (or (cdr (assq :size cont)) + "40")) + :value (or (cdr (assq :value cont)) "") + :action 'eww-submit + :name (cdr (assq :name cont)) + :eww-form eww-form))) + (apply 'widget-create widget) + (shr-generic cont) + (put-text-property start (point) 'eww-widget widget))) + +(defun eww-submit (widget dummy) + (let ((form (getf (cdr widget) :eww-form)) + values) + (dolist (overlay (overlays-in (point-min) (point-max))) + (let ((field (getf (overlay-properties overlay) 'field))) + (when (eq (getf (cdr field) :eww-form) form) + (let ((name (getf (cdr field) :name))) + (when name + (push (cons name (widget-value field)) + values)))))) + (let ((shr-base eww-current-url)) + (if (and (stringp (getf form :method)) + (equal (downcase (getf form :method)) "post")) + (let ((url-request-method "POST") + (url-request-data (mm-url-encode-www-form-urlencoded values))) + (eww-browse-url (shr-expand-url (getf form :action)))) + (eww-browse-url + (shr-expand-url + (concat + (getf form :action) + "?" + (mm-url-encode-www-form-urlencoded values)))))))) + +(defun eww-convert-widgets () + (let ((start (point-min)) + widget) + (while (setq start (next-single-property-change start 'eww-widget)) + (setq widget (get-text-property start 'eww-widget)) + (goto-char start) + (delete-region start (next-single-property-change start 'eww-widget)) + (apply 'widget-create widget) + (put-text-property start (point) 'not-read-only t)) + (widget-setup))) + (provide 'eww) ;;; eww.el ends here === modified file 'lisp/gnus/shr.el' --- lisp/gnus/shr.el 2013-06-10 11:46:27 +0000 +++ lisp/gnus/shr.el 2013-06-10 14:11:01 +0000 @@ -114,6 +114,7 @@ (defvar shr-stylesheet nil) (defvar shr-base nil) (defvar shr-ignore-cache nil) +(defvar shr-external-rendering-functions nil) (defvar shr-map (let ((map (make-sparse-keymap))) @@ -291,7 +292,12 @@ (nreverse result))) (defun shr-descend (dom) - (let ((function (intern (concat "shr-tag-" (symbol-name (car dom))) obarray)) + (let ((function + (or + ;; Allow other packages to override (or provide) rendering + ;; of elements. + (cdr (assq (car dom) shr-external-rendering-functions)) + (intern (concat "shr-tag-" (symbol-name (car dom))) obarray))) (style (cdr (assq :style (cdr dom)))) (shr-stylesheet shr-stylesheet) (start (point))) @@ -478,20 +484,23 @@ (not failed))) (defun shr-expand-url (url) - (cond - ;; Absolute URL. - ((or (not url) - (string-match "\\`[a-z]*:" url) - (not shr-base)) - url) - ((and (string-match "\\`//" url) - (string-match "\\`[a-z]*:" shr-base)) - (concat (match-string 0 shr-base) url)) - ((and (not (string-match "/\\'" shr-base)) - (not (string-match "\\`/" url))) - (concat shr-base "/" url)) - (t - (concat shr-base url)))) + (if (or (not url) + (string-match "\\`[a-z]*:" url) + (not shr-base)) + ;; Absolute URL. + url + (let ((base shr-base)) + (when (string-match "^\\([^?]+\\)[?]" base) + (setq base (match-string 1 base))) + (cond + ((and (string-match "\\`//" url) + (string-match "\\`[a-z]*:" base)) + (concat (match-string 0 base) url)) + ((and (not (string-match "/\\'" base)) + (not (string-match "\\`/" url))) + (concat base "/" url)) + (t + (concat base url)))))) (defun shr-ensure-newline () (unless (zerop (current-column)) ------------------------------------------------------------ revno: 112911 author: Albert Krewinkel committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2013-06-10 11:46:27 +0000 message: lisp/gnus/sieve.el: Fix handling of PORT parameter, quitting diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-06-10 11:44:53 +0000 +++ lisp/gnus/ChangeLog 2013-06-10 11:46:27 +0000 @@ -1,3 +1,11 @@ +2013-06-10 Lars Magne Ingebrigtsen + + * eww.el: Don't require cl-lib. + + * eww.el: Start writing a new, tiny web browser. + (eww-previous-url): New command. + (eww-quit): New command. + 2013-06-10 Albert Krewinkel * sieve.el: Put point at beginning of buffer when viewing a script. === added file 'lisp/gnus/eww.el' --- lisp/gnus/eww.el 1970-01-01 00:00:00 +0000 +++ lisp/gnus/eww.el 2013-06-10 11:46:27 +0000 @@ -0,0 +1,155 @@ +;;; eww.el --- Emacs Web Wowser + +;; Copyright (C) 2013 Free Software Foundation, Inc. + +;; Author: Lars Magne Ingebrigtsen +;; Keywords: html + +;; 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 . + +;;; Commentary: + +;;; Code: + +(eval-when-compile (require 'cl)) +(require 'shr) +(require 'url) + +(defvar eww-current-url nil) +(defvar eww-history nil) + +(defun eww (url) + "Fetch URL and render the page." + (interactive "sUrl: ") + (url-retrieve url 'eww-render (list url))) + +(defun eww-render (status url &optional point) + (let* ((headers (eww-parse-headers)) + (content-type + (mail-header-parse-content-type + (or (cdr (assoc "content-type" headers)) + "text/plain"))) + (charset (intern + (downcase + (or (cdr (assq 'charset (cdr content-type))) + "utf8")))) + (data-buffer (current-buffer))) + (unwind-protect + (progn + (cond + ((equal (car content-type) "text/html") + (eww-display-html charset url)) + ((string-match "^image/" (car content-type)) + (eww-display-image)) + (t + (eww-display-raw charset))) + (when point + (goto-char point))) + (kill-buffer data-buffer)))) + +(defun eww-parse-headers () + (let ((headers nil)) + (while (and (not (eobp)) + (not (eolp))) + (when (looking-at "\\([^:]+\\): *\\(.*\\)") + (push (cons (downcase (match-string 1)) + (match-string 2)) + headers)) + (forward-line 1)) + (unless (eobp) + (forward-line 1)) + headers)) + +(defun eww-display-html (charset url) + (unless (eq charset 'utf8) + (decode-coding-region (point) (point-max) charset)) + (let ((document + (list + 'base (list (cons 'href url)) + (libxml-parse-html-region (point) (point-max))))) + (eww-setup-buffer) + (setq eww-current-url url) + (let ((inhibit-read-only t)) + (shr-insert-document document)) + (goto-char (point-min)))) + +(defun eww-display-raw (charset) + (let ((data (buffer-substring (point) (point-max)))) + (eww-setup-buffer) + (let ((inhibit-read-only t)) + (insert data)) + (goto-char (point-min)))) + +(defun eww-display-image () + (let ((data (buffer-substring (point) (point-max)))) + (eww-setup-buffer) + (let ((inhibit-read-only t)) + (shr-put-image data nil)) + (goto-char (point-min)))) + +(defun eww-setup-buffer () + (pop-to-buffer (get-buffer-create "*eww*")) + (let ((inhibit-read-only t)) + (erase-buffer)) + (eww-mode)) + +(defvar eww-mode-map + (let ((map (make-sparse-keymap))) + (suppress-keymap map) + (define-key map "q" 'eww-quit) + (define-key map [tab] 'widget-forward) + (define-key map [backtab] 'widget-backward) + (define-key map [delete] 'scroll-down-command) + (define-key map "\177" 'scroll-down-command) + (define-key map " " 'scroll-up-command) + (define-key map "p" 'eww-previous-url) + ;;(define-key map "n" 'eww-next-url) + map)) + +(defun eww-mode () + "Mode for browsing the web. + +\\{eww-mode-map}" + (interactive) + (setq major-mode 'eww-mode + mode-name "eww") + (set (make-local-variable 'eww-current-url) 'author) + (set (make-local-variable 'browse-url-browser-function) 'eww-browse-url) + (setq buffer-read-only t) + (use-local-map eww-mode-map)) + +(defun eww-browse-url (url &optional new-window) + (push (list eww-current-url (point)) + eww-history) + (eww url)) + +(defun eww-quit () + "Exit the Emacs Web Wowser." + (interactive) + (setq eww-history nil) + (kill-buffer (current-buffer))) + +(defun eww-previous-url () + "Go to the previously displayed page." + (interactive) + (when (zerop (length eww-history)) + (error "No previous page")) + (let ((prev (pop eww-history))) + (url-retrieve (car prev) 'eww-render (list (car prev) (cadr prev))))) + +(provide 'eww) + +;;; eww.el ends here === modified file 'lisp/gnus/shr.el' --- lisp/gnus/shr.el 2013-05-30 03:24:30 +0000 +++ lisp/gnus/shr.el 2013-06-10 11:46:27 +0000 @@ -945,7 +945,8 @@ plist))) (defun shr-tag-base (cont) - (setq shr-base (cdr (assq :href cont)))) + (setq shr-base (cdr (assq :href cont))) + (shr-generic cont)) (defun shr-tag-a (cont) (let ((url (cdr (assq :href cont))) ------------------------------------------------------------ revno: 112910 author: Albert Krewinkel committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2013-06-10 11:44:53 +0000 message: lisp/gnus/sieve.el: Fix handling of PORT parameter, quitting diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-06-10 05:17:51 +0000 +++ lisp/gnus/ChangeLog 2013-06-10 11:44:53 +0000 @@ -1,3 +1,12 @@ +2013-06-10 Albert Krewinkel + + * sieve.el: Put point at beginning of buffer when viewing a script. + (sieve-open-server): respect the PORT parameter. Show the correct port + number in sieve-buffer's header. Fixed code to also work with a string + as port specifier. Properly close the connection on pressing 'q'. Make + sieve-manage-quit close the connection and process buffer. Also, remove + duplicate keybinding for 'q'. + 2013-06-10 Roy Hashimoto (tiny change) * mm-view.el (mm-pkcs7-signed-magic): Allow newline in the regexp and === modified file 'lisp/gnus/sieve.el' --- lisp/gnus/sieve.el 2013-05-24 14:36:12 +0000 +++ lisp/gnus/sieve.el 2013-06-10 11:44:53 +0000 @@ -109,7 +109,6 @@ ;; various (define-key map "?" 'sieve-help) (define-key map "h" 'sieve-help) - (define-key map "q" 'kill-buffer) ;; activating (define-key map "m" 'sieve-activate) (define-key map "u" 'sieve-deactivate) @@ -152,6 +151,8 @@ (defun sieve-manage-quit () "Quit." (interactive) + (sieve-manage-close sieve-manage-buffer) + (kill-buffer sieve-manage-buffer) (kill-buffer (current-buffer))) (defun sieve-activate (&optional pos) @@ -206,6 +207,7 @@ (insert sieve-template)) (sieve-mode) (setq sieve-buffer-script-name name) + (beginning-of-buffer) (message (substitute-command-keys "Press \\[sieve-upload] to upload script to server.")))) @@ -256,10 +258,9 @@ (setq buffer-read-only nil) (erase-buffer) (buffer-disable-undo) - (insert "\ -Server : " server ":" (or port sieve-manage-default-port) " - -") + (let* ((port (or port sieve-manage-default-port)) + (header (format "Server : %s:%s\n\n" server port))) + (insert header)) (set (make-local-variable 'sieve-buffer-header-end) (point-max))) @@ -305,7 +306,7 @@ (with-current-buffer (or ;; open server (set (make-local-variable 'sieve-manage-buffer) - (sieve-manage-open server)) + (sieve-manage-open server port)) (error "Error opening server %s" server)) (sieve-manage-authenticate))) ------------------------------------------------------------ revno: 112909 committer: Xue Fuqiao branch nick: trunk timestamp: Mon 2013-06-10 19:19:12 +0800 message: * doc/lispref/files.texi (File Attributes): Fix typo. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-05-29 00:24:50 +0000 +++ doc/lispref/ChangeLog 2013-06-10 11:19:12 +0000 @@ -1,3 +1,7 @@ +2013-06-10 Xue Fuqiao + + * files.texi (File Attributes): Fix typo. + 2013-05-29 Stefan Monnier * functions.texi (Lambda Expressions): Lambda expressions don't === modified file 'doc/lispref/files.texi' --- doc/lispref/files.texi 2013-02-24 19:45:17 +0000 +++ doc/lispref/files.texi 2013-06-10 11:19:12 +0000 @@ -1166,11 +1166,11 @@ levels of parent directories. @defun file-nlinks filename -This functions returns the number of names (i.e., hard links) that -file @var{filename} has. If the file does not exist, then this function -returns @code{nil}. Note that symbolic links have no effect on this -function, because they are not considered to be names of the files they -link to. +This function returns the number of names (i.e., hard link(s) + 1) +that file @var{filename} has. If the file does not exist, then this +function returns @code{nil}. Note that symbolic links have no effect +on this function, because they are not considered to be names of the +files they link to. @example @group ------------------------------------------------------------ revno: 112908 committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2013-06-10 05:22:52 +0000 message: doc/misc/epa.texi: Revert last bogus change diff: === modified file 'doc/misc/epa.texi' --- doc/misc/epa.texi 2013-06-10 05:17:51 +0000 +++ doc/misc/epa.texi 2013-06-10 05:22:52 +0000 @@ -240,8 +240,9 @@ @node Cryptographic operations on files @section Cryptographic operations on files -@deffn Command epa-decrypt-file file -Decrypt @var{file}. +@deffn Command epa-decrypt-file file &optional output +Decrypt @var{file}. If you do not specify the name @var{output} to +use for the decrypted file, this function prompts for the value to use. @end deffn @deffn Command epa-verify-file file