commit 931e7babcb81d74709825580192f9ad58d595b63 (HEAD, refs/remotes/origin/master) Author: Tassilo Horn Date: Mon Feb 23 09:36:06 2015 +0000 lisp/gnus/mailcap.el: Support PDF Tools for PDF viewing of attachments * mailcap.el (mailcap-mime-data): Support `pdf-view-mode' (from PDF Tools: https://github.com/politza/pdf-tools) for viewing PDF attachments in emacs. diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 5f8b092..7a4c463 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,9 @@ +2015-02-23 Tassilo Horn + + * mailcap.el (mailcap-mime-data): Support `pdf-view-mode' (from PDF + Tools: https://github.com/politza/pdf-tools) for viewing PDF + attachments in emacs. + 2015-02-23 Katsumi Yamaoka * gnus-art.el (gnus-mime-display-single): Avoid "End of buffer" error. diff --git a/lisp/gnus/mailcap.el b/lisp/gnus/mailcap.el index 01d8587..9f84413 100644 --- a/lisp/gnus/mailcap.el +++ b/lisp/gnus/mailcap.el @@ -153,6 +153,11 @@ This is a compatibility function for different Emacsen." (type . "application/zip") ("copiousoutput")) ("pdf" + (viewer . pdf-view-mode) + (type . "application/pdf") + (test . (and (fboundp 'pdf-view-mode) + (eq window-system 'x)))) + ("pdf" (viewer . doc-view-mode) (type . "application/pdf") (test . (eq window-system 'x))) commit 80e50144d82e271dccd7716703c2f4390463a753 Author: Magnus Henoch Date: Mon Feb 23 09:09:46 2015 +0000 Fix SCRAM-SHA-1 SASL mechanism The symbol used in sasl-mechanism-alist needs to match the name that can be required. Move sasl-make-mechanism call to end of file, to ensure that it can refer to the specified step functions. * net/sasl.el (sasl-mechanism-alist): Refer to sasl-scram-rfc instead of sasl-scram-sha-1, as the former is the name that can be required. * net/sasl-scram-rfc.el (sasl-scram-sha-1-steps) (sasl-scram-sha-1-client-final-message) (sasl-scram-sha-1-authenticate-server): Move to end of file. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c1fb869..af8845b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2015-02-23 Magnus Henoch + + * net/sasl.el (sasl-mechanism-alist): Refer to sasl-scram-rfc + instead of sasl-scram-sha-1, as the former is the name that can be + required. + + * net/sasl-scram-rfc.el (sasl-scram-sha-1-steps) + (sasl-scram-sha-1-client-final-message) + (sasl-scram-sha-1-authenticate-server): Move to end of file. + 2015-02-23 Paul Eggert Fix the desired binding for comment-line diff --git a/lisp/net/sasl-scram-rfc.el b/lisp/net/sasl-scram-rfc.el index 6c8c009..18d7a6b 100644 --- a/lisp/net/sasl-scram-rfc.el +++ b/lisp/net/sasl-scram-rfc.el @@ -39,31 +39,9 @@ (require 'cl-lib) (require 'sasl) - -;;; SCRAM-SHA-1 - (require 'hex-util) (require 'rfc2104) -(defconst sasl-scram-sha-1-steps - '(sasl-scram-client-first-message - sasl-scram-sha-1-client-final-message - sasl-scram-sha-1-authenticate-server)) - -(defun sasl-scram-sha-1-client-final-message (client step) - (sasl-scram--client-final-message - ;; HMAC-SHA1 uses block length 64 and hash length 20; see RFC 2104. - 'sha1 64 20 client step)) - -(defun sasl-scram-sha-1-authenticate-server (client step) - (sasl-scram--authenticate-server - 'sha1 64 20 client step)) - -(put 'sasl-scram-sha-1 'sasl-mechanism - (sasl-make-mechanism "SCRAM-SHA-1" sasl-scram-sha-1-steps)) - -(provide 'sasl-scram-sha-1) - ;;; Generic for SCRAM-* (defun sasl-scram-client-first-message (client _step) @@ -156,5 +134,30 @@ (t (sasl-error "Invalid response from server")))) +;;; SCRAM-SHA-1 + +(defconst sasl-scram-sha-1-steps + '(sasl-scram-client-first-message + sasl-scram-sha-1-client-final-message + sasl-scram-sha-1-authenticate-server)) + +(defun sasl-scram-sha-1-client-final-message (client step) + (sasl-scram--client-final-message + ;; HMAC-SHA1 uses block length 64 and hash length 20; see RFC 2104. + 'sha1 64 20 client step)) + +(defun sasl-scram-sha-1-authenticate-server (client step) + (sasl-scram--authenticate-server + 'sha1 64 20 client step)) + +;; This needs to be at the end, because of how `sasl-make-mechanism' +;; handles step function names. +(put 'sasl-scram-sha-1 'sasl-mechanism + (sasl-make-mechanism "SCRAM-SHA-1" sasl-scram-sha-1-steps)) + +(put 'sasl-scram-rfc 'sasl-mechanism (get 'sasl-scram-sha-1 'sasl-mechanism)) + +(provide 'sasl-scram-sha-1) + (provide 'sasl-scram-rfc) ;;; sasl-scram-rfc.el ends here diff --git a/lisp/net/sasl.el b/lisp/net/sasl.el index e59ed5d..9321efd 100644 --- a/lisp/net/sasl.el +++ b/lisp/net/sasl.el @@ -45,7 +45,7 @@ ("LOGIN" sasl-login) ("ANONYMOUS" sasl-anonymous) ("NTLM" sasl-ntlm) - ("SCRAM-SHA-1" sasl-scram-sha-1))) + ("SCRAM-SHA-1" sasl-scram-rfc))) (defvar sasl-unique-id-function #'sasl-unique-id-function) commit 34871865de0452cd251e92d76ab12c2ac237e783 Author: Paul Eggert Date: Sun Feb 22 22:00:01 2015 -0800 Fix the desired binding for comment-line * bindings.el (ctl-x-map): Use [?\C-\;] to get the desired binding. Fixes: bug#19826 diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6352d77..c1fb869 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2015-02-23 Paul Eggert + + Fix the desired binding for comment-line + * bindings.el (ctl-x-map): Use [?\C-\;] to get the desired binding. + Fixes: bug#19826 + 2015-02-23 Stefan Monnier * emacs-lisp/macroexp.el (macroexp-parse-body): Handle cl-declare diff --git a/lisp/bindings.el b/lisp/bindings.el index a1f0d98..b658914 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -1130,7 +1130,7 @@ if `inhibit-field-text-motion' is non-nil." (define-key esc-map "j" 'indent-new-comment-line) (define-key esc-map "\C-j" 'indent-new-comment-line) (define-key ctl-x-map ";" 'comment-set-column) -(define-key ctl-x-map "\M-;" 'comment-line) +(define-key ctl-x-map [?\C-\;] 'comment-line) (define-key ctl-x-map "f" 'set-fill-column) (define-key ctl-x-map "$" 'set-selective-display) commit e846bbf360d1bcee3a35dd05a57bc76cbb22a6f0 Author: Stefan Monnier Date: Sun Feb 22 23:50:03 2015 -0500 * lisp/emacs-lisp/macroexp.el (macroexp-parse-body): Handle cl-declare and :documentation. Change return value format accordingly. * lisp/emacs-lisp/cl-generic.el (cl--generic-lambda): * lisp/emacs-lisp/pcase.el (pcase-lambda): Adjust accordingly. * lisp/emacs-lisp/cl-macs.el (cl--transform-lambda): Use macroexp-parse-body. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ced342b..6352d77 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2015-02-23 Stefan Monnier + + * emacs-lisp/macroexp.el (macroexp-parse-body): Handle cl-declare + and :documentation. Change return value format accordingly. + * emacs-lisp/cl-generic.el (cl--generic-lambda): + * emacs-lisp/pcase.el (pcase-lambda): Adjust accordingly. + * emacs-lisp/cl-macs.el (cl--transform-lambda): Use macroexp-parse-body. + 2015-02-23 Dmitry Gutov Introduce `xref-etags-mode'. diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index ccd5bec..99924ba 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -278,7 +278,7 @@ This macro can only be used within the lexical scope of a cl-generic method." (uses-cnm (cl--generic-fgrep (list cnm nmp) nbody))) (cons (not (not uses-cnm)) `#'(lambda (,@(if uses-cnm (list cnm)) ,@args) - ,@(delq nil (car parsed-body)) + ,@(car parsed-body) ,(if (not (memq nmp uses-cnm)) nbody `(let ((,nmp (lambda () diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index c5f49b0..c3da091 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -234,10 +234,9 @@ FORM is of the form (ARGS . BODY)." (let* ((args (car form)) (body (cdr form)) (orig-args args) (cl--bind-block bind-block) (cl--bind-defs nil) (cl--bind-enquote nil) (cl--bind-lets nil) (cl--bind-forms nil) - (header nil) (simple-args nil)) - (while (or (stringp (car body)) - (memq (car-safe (car body)) '(interactive declare cl-declare))) - (push (pop body) header)) + (parsed-body (macroexp-parse-body body)) + (header (car parsed-body)) (simple-args nil)) + (setq body (cdr parsed-body)) (setq args (if (listp args) (cl-copy-list args) (list '&rest args))) (let ((p (last args))) (if (cdr p) (setcdr p (list '&rest (cdr p))))) (if (setq cl--bind-defs (cadr (memq '&cl-defs args))) @@ -258,7 +257,7 @@ FORM is of the form (ARGS . BODY)." (or (eq cl--bind-block 'cl-none) (setq body (list `(cl-block ,cl--bind-block ,@body)))) (if (null args) - (cl-list* nil (nreverse simple-args) (nconc (nreverse header) body)) + (cl-list* nil (nreverse simple-args) (nconc header body)) (if (memq '&optional simple-args) (push '&optional args)) (cl--do-arglist args nil (- (length simple-args) (if (memq '&optional simple-args) 1 0))) @@ -266,20 +265,18 @@ FORM is of the form (ARGS . BODY)." (cl-list* nil (nconc (nreverse simple-args) (list '&rest (car (pop cl--bind-lets)))) - (nconc (let ((hdr (nreverse header))) - ;; Macro expansion can take place in the middle of - ;; apparently harmless computation, so it should not - ;; touch the match-data. - (save-match-data - (require 'help-fns) - (cons (help-add-fundoc-usage - (if (stringp (car hdr)) (pop hdr)) - ;; Be careful with make-symbol and (back)quote, - ;; see bug#12884. - (let ((print-gensym nil) (print-quoted t)) - (format "%S" (cons 'fn (cl--make-usage-args - orig-args))))) - hdr))) + (nconc (save-match-data ;; Macro expansion can take place in the + ;; middle of apparently harmless computation, so it + ;; should not touch the match-data. + (require 'help-fns) + (cons (help-add-fundoc-usage + (if (stringp (car header)) (pop header)) + ;; Be careful with make-symbol and (back)quote, + ;; see bug#12884. + (let ((print-gensym nil) (print-quoted t)) + (format "%S" (cons 'fn (cl--make-usage-args + orig-args))))) + header)) (list `(let* ,cl--bind-lets ,@(nreverse cl--bind-forms) ,@body))))))) diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index b75c8cc..68bf4f6 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el @@ -297,15 +297,16 @@ definitions to shadow the loaded ones for use in file byte-compilation." ;;; Handy functions to use in macros. -(defun macroexp-parse-body (exps) - "Parse EXPS into ((DOC DECLARE-FORM INTERACTIVE-FORM) . BODY)." - `((,(and (stringp (car exps)) - (pop exps)) - ,(and (eq (car-safe (car exps)) 'declare) - (pop exps)) - ,(and (eq (car-safe (car exps)) 'interactive) - (pop exps))) - ,@exps)) +(defun macroexp-parse-body (body) + "Parse a function BODY into (DECLARATIONS . EXPS)." + (let ((decls ())) + (while (and (cdr body) + (let ((e (car body))) + (or (stringp e) + (memq (car-safe e) + '(:documentation declare interactive cl-declare))))) + (push (pop body) decls)) + (cons (nreverse decls) body))) (defun macroexp-progn (exps) "Return an expression equivalent to `(progn ,@EXPS)." diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el index 057b128..4706be5 100644 --- a/lisp/emacs-lisp/pcase.el +++ b/lisp/emacs-lisp/pcase.el @@ -180,7 +180,7 @@ like `(,a . ,(pred (< a))) or, with more checks: (when (eq nil (car (last pats 2))) (setq pats (append (butlast pats 2) (car (last pats))))) `(lambda (&rest ,args) - ,@(remq nil (car body)) + ,@(car body) (pcase ,args (,(list '\` pats) . ,(cdr body)))))) commit 3f006e1d47c25a8282fd41fb0df01fd80f486b9e Author: Katsumi Yamaoka Date: Mon Feb 23 02:40:12 2015 +0000 lisp/gnus/gnus-art.el (gnus-mime-display-single): Avoid "End of buffer" error diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 07d1d47..5f8b092 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,7 @@ +2015-02-23 Katsumi Yamaoka + + * gnus-art.el (gnus-mime-display-single): Avoid "End of buffer" error. + 2015-02-18 Eric Abrahamsen * nnimap.el (nnimap-get-groups): Correctly read unquoted group names diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 8503095..83a2f94 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -6101,7 +6101,7 @@ If nil, don't show those extra buttons." (gnus-article-insert-newline) (if (prog1 (= (skip-chars-backward "\n") -1) - (forward-char 1)) + (unless (eobp) (forward-char 1))) (gnus-article-insert-newline) (put-text-property (point) (point-max) 'gnus-undeletable t)) (goto-char (point-max))) commit f6bb2ccb9b4b3c50049512d2d0664b44fc7bcc70 Author: Dmitry Gutov Date: Mon Feb 23 04:00:01 2015 +0200 Introduce `xref-etags-mode' Fixes: debbugs:19466 * lisp/progmodes/xref.el (xref-etags-mode--saved): New variable. (xref-etags-mode): New minor mode. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b4c6d0b..ced342b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2015-02-23 Dmitry Gutov + + Introduce `xref-etags-mode'. + * progmodes/xref.el (xref-etags-mode--saved): New variable. + (xref-etags-mode): New minor mode. (Bug#19466) + 2015-02-22 Lars Magne Ingebrigtsen * dom.el (dom-previous-sibling): New function. diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 55405b6..fe72b3f 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -628,6 +628,29 @@ The argument has the same meaning as in `apropos'." ;;;###autoload (define-key ctl-x-5-map "." #'xref-find-definitions-other-frame) +;;; Helper functions + +(defvar xref-etags-mode--saved nil) + +(define-minor-mode xref-etags-mode + "Minor mode to make xref use etags again. + +Certain major modes install their own mechanisms for listing +identifiers and navigation. Turn this on to undo those settings +and just use etags." + :lighter "" + (if xref-etags-mode + (progn + (setq xref-etags-mode--saved + (cons xref-find-function + xref-identifier-completion-table-function)) + (kill-local-variable 'xref-find-function) + (kill-local-variable 'xref-identifier-completion-table-function)) + (setq-local xref-find-function (car xref-etags-mode--saved)) + (setq-local xref-identifier-completion-table-function + (cdr xref-etags-mode--saved)))) + + (provide 'xref) ;;; xref.el ends here commit c7cdc8ed5bd80a80e0660e953da1497996ba284d Author: Michael Albinus Date: Sun Feb 22 19:58:05 2015 +0100 Suppress localized settings in Tramp test. * automated/tramp-tests.el (tramp-test17-insert-directory): Suppress localized settings in order to have a proper check for the summary line. diff --git a/test/ChangeLog b/test/ChangeLog index 87425a6..abc582c 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,9 @@ +2015-02-22 Michael Albinus + + * automated/tramp-tests.el (tramp-test17-insert-directory): + Suppress localized settings in order to have a proper check for + the summary line. + 2015-02-16 Stefan Monnier * automated/eieio-test-methodinvoke.el (make-instance): Add methods diff --git a/test/automated/tramp-tests.el b/test/automated/tramp-tests.el index 2c4610c..3b72da8 100644 --- a/test/automated/tramp-tests.el +++ b/test/automated/tramp-tests.el @@ -927,7 +927,10 @@ This tests also `file-directory-p' and `file-accessible-directory-p'." (skip-unless (tramp--test-enabled)) (let* ((tmp-name1 (tramp--test-make-temp-name)) - (tmp-name2 (expand-file-name "foo" tmp-name1))) + (tmp-name2 (expand-file-name "foo" tmp-name1)) + ;; We test for the summary line. Keyword "total" could be localized. + (process-environment + (append '("LANG=C" "LANGUAGE=C" "LC_ALL=C") process-environment))) (unwind-protect (progn (make-directory tmp-name1) commit 9f5a24a6fda0653cc1f60dc674bc06ec9aad1907 Author: Jan D Date: Sun Feb 22 17:24:32 2015 +0100 Implement x-frame-geometry for NS. * src/nsfns.m (Fx_frame_geometry): New function. (syms_of_nsfns): Defsubr Sx_frame_geometry. diff --git a/src/ChangeLog b/src/ChangeLog index 5e4dbb7..6ef5746 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2015-02-22 Jan Djärv + + * nsfns.m (Fx_frame_geometry): New function. + (syms_of_nsfns): Defsubr Sx_frame_geometry. + 2015-02-22 Paul Eggert Spelling fixes diff --git a/src/nsfns.m b/src/nsfns.m index 9e379e2..f8863e6 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -2806,6 +2806,87 @@ Value is t if tooltip was open, nil otherwise. */) return Qt; } +DEFUN ("x-frame-geometry", Fx_frame_geometry, Sx_frame_geometry, 0, 1, 0, + doc: /* Return geometric attributes of frame FRAME. + +FRAME must be a live frame and defaults to the selected one. + +The return value is an association list containing the following +elements (all size values are in pixels). + +- `frame-outer-size' is a cons of the outer width and height of FRAME. + The outer size include the title bar and the external borders as well + as any menu and/or tool bar of frame. + +- `border' is a cons of the horizontal and vertical width of FRAME's + external borders. + +- `title-bar-height' is the height of the title bar of FRAME. + +- `menu-bar-external' if `t' means the menu bar is external (not + included in the inner edges of FRAME). + +- `menu-bar-size' is a cons of the width and height of the menu bar of + FRAME. + +- `tool-bar-external' if `t' means the tool bar is external (not + included in the inner edges of FRAME). + +- `tool-bar-side' tells tells on which side the tool bar on FRAME is and + can be one of `left', `top', `right' or `bottom'. + +- `tool-bar-size' is a cons of the width and height of the tool bar of + FRAME. + +- `frame-inner-size' is a cons of the inner width and height of FRAME. + This excludes FRAME's title bar and external border as well as any + external menu and/or tool bar. */) + (Lisp_Object frame) +{ + struct frame *f = decode_live_frame (frame); + int inner_width = FRAME_PIXEL_WIDTH (f); + int inner_height = FRAME_PIXEL_HEIGHT (f); + Lisp_Object fullscreen = Fframe_parameter (frame, Qfullscreen); + int border = f->border_width; + int title = FRAME_NS_TITLEBAR_HEIGHT (f); + int outer_width = FRAME_PIXEL_WIDTH (f) + 2 * border; + int outer_height = FRAME_PIXEL_HEIGHT (f) + 2 * border; + int tool_bar_height = FRAME_TOOLBAR_HEIGHT (f); + int tool_bar_width = tool_bar_height > 0 + ? outer_width - 2 * FRAME_INTERNAL_BORDER_WIDTH (f) + : 0; + // Always 0 on NS. + int menu_bar_height = 0; + int menu_bar_width = 0; + + return + listn (CONSTYPE_HEAP, 10, + Fcons (Qframe_position, + Fcons (make_number (f->left_pos), make_number (f->top_pos))), + Fcons (Qframe_outer_size, + Fcons (make_number (outer_width), make_number (outer_height))), + Fcons (Qexternal_border_size, + ((EQ (fullscreen, Qfullboth) || EQ (fullscreen, Qfullscreen)) + ? Fcons (make_number (0), make_number (0)) + : Fcons (make_number (border), make_number (border)))), + Fcons (Qtitle_height, + ((EQ (fullscreen, Qfullboth) || EQ (fullscreen, Qfullscreen)) + ? make_number (0) + : make_number (title))), + Fcons (Qmenu_bar_external, FRAME_EXTERNAL_MENU_BAR (f) ? Qt : Qnil), + Fcons (Qmenu_bar_size, + Fcons (make_number (menu_bar_width), + make_number (menu_bar_height))), + Fcons (Qtool_bar_external, FRAME_EXTERNAL_TOOL_BAR (f) ? Qt : Qnil), + Fcons (Qtool_bar_position, FRAME_TOOL_BAR_POSITION (f)), + Fcons (Qtool_bar_size, + Fcons (make_number (tool_bar_width), + make_number (tool_bar_height))), + Fcons (Qframe_inner_size, + Fcons (make_number (inner_width), + make_number (inner_height)))); +} + /* ========================================================================== @@ -2989,6 +3070,7 @@ be used as the image of the icon representing the frame. */); defsubr (&Sx_display_pixel_width); defsubr (&Sx_display_pixel_height); defsubr (&Sns_display_monitor_attributes_list); + defsubr (&Sx_frame_geometry); defsubr (&Sx_display_mm_width); defsubr (&Sx_display_mm_height); defsubr (&Sx_display_screens); commit 32af8a39c46c01a1fe113a676a31e8f8123b1c2f Author: Lars Magne Ingebrigtsen Date: Sun Feb 22 13:09:47 2015 +0100 * lisp/dom.el (dom-previous-sibling): New function. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 04aaed6..b4c6d0b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2015-02-22 Lars Magne Ingebrigtsen + + * dom.el (dom-previous-sibling): New function. + 2015-02-21 Paul Eggert * bindings.el (ctl-x-map): There is no 'C-;'. commit f113707a071b5b35224861ddba3db881d74a164e Author: Lars Magne Ingebrigtsen Date: Sun Feb 22 13:09:30 2015 +0100 * lisp/dom.el (dom-previous-sibling): New function. diff --git a/lisp/dom.el b/lisp/dom.el index 11357e8..4213107 100644 --- a/lisp/dom.el +++ b/lisp/dom.el @@ -149,6 +149,16 @@ ATTRIBUTE would typically be `class', `id' or the like." (setq result (dom-parent elem node)))) result))) +(defun dom-previous-sibling (dom node) + (when-let (parent (dom-parent dom node)) + (let ((siblings (dom-children parent)) + (previous nil)) + (while siblings + (when (eq (cadr siblings) node) + (setq previous (car siblings))) + (pop siblings)) + previous))) + (defun dom-node (tag &optional attributes &rest children) "Return a DOM node with TAG and ATTRIBUTES." (if children commit 4a5190ff48f0ec376b014f00bf3171e08ed55a25 Author: Michael Albinus Date: Sun Feb 22 11:07:17 2015 +0100 Fix ChangeLog. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a583d7c..04aaed6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -7,14 +7,13 @@ 2015-02-21 Artur Malabarba - * bindings.el (ctl-x-map): Fix `comment-line' binding. - (Bug#19826) + * bindings.el (ctl-x-map): Fix `comment-line' binding. (Bug#19826) 2015-02-21 Michael Albinus * autorevert.el (auto-revert-notify-add-watch) (auto-revert-notify-handler, auto-revert-buffers): Handle also - buffers without an associated file, like dired buffers. + buffers without an associated file, like dired buffers. (Bug#16112) 2015-02-21 Dima Kogan