commit 0b914bada39e4577cd9e9209a15c44cc1f83294d (HEAD, refs/remotes/origin/master) Author: Dmitry Gutov Date: Fri Apr 3 07:13:14 2015 +0300 ; Tweak the previous change diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index f6cfa2e..62f19f4 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -2003,8 +2003,8 @@ indentation is aligned to that column." (save-excursion (syntax-ppss (point-at-bol)))) (offset (- (point) (save-excursion (back-to-indentation) (point))))) (unless (nth 3 parse-status) - (indent-line-to (js--proper-indentation parse-status))) - (when (> offset 0) (forward-char offset)))) + (indent-line-to (js--proper-indentation parse-status)) + (when (> offset 0) (forward-char offset))))) ;;; Filling commit f2fbd4b71236ca5559b93eb2baf1a7671442eef9 Author: Dmitry Gutov Date: Fri Apr 3 06:37:12 2015 +0300 js-mode: Don't indent inside a multiline string literal * lisp/progmodes/js.el (js-indent-line): Do nothing when bol is inside a string (https://github.com/mooz/js2-mode/issues/227). diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 38e45d0..b004a2b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2015-04-03 Dmitry Gutov + + * progmodes/js.el (js-indent-line): Do nothing when bol is inside + a string (https://github.com/mooz/js2-mode/issues/227). + 2015-04-02 Stefan Monnier * abbrev.el (define-abbrev-table): Treat a non-string "docstring" as diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index ff00298..f6cfa2e 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -2002,7 +2002,8 @@ indentation is aligned to that column." (let* ((parse-status (save-excursion (syntax-ppss (point-at-bol)))) (offset (- (point) (save-excursion (back-to-indentation) (point))))) - (indent-line-to (js--proper-indentation parse-status)) + (unless (nth 3 parse-status) + (indent-line-to (js--proper-indentation parse-status))) (when (> offset 0) (forward-char offset)))) ;;; Filling diff --git a/test/indent/js.js b/test/indent/js.js index ad7cb56..2120233 100644 --- a/test/indent/js.js +++ b/test/indent/js.js @@ -64,6 +64,11 @@ b += baz(`http://foo.bar/${tee}`) .qux(); +`multiline string + contents + are kept + unchanged!` + // Local Variables: // indent-tabs-mode: nil // js-indent-level: 2 commit 839decd9ecbfa4ec4183ac69037f5aa882bdc47c Author: Katsumi Yamaoka Date: Fri Apr 3 03:18:52 2015 +0000 lisp/gnus/gnus-art.el (gnus-article-browse-html-parts): Make external links absolute and cid file names relative diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 95ead23..14734e3 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,10 @@ +2015-04-03 Katsumi Yamaoka + + * gnus-art.el (gnus-article-browse-html-save-cid-content): + Always return relative file name. + (gnus-article-browse-html-parts): + Make external links absolute and cid file names relative. + 2015-04-01 Eric Abrahamsen * registry.el (registry-prune): Re-use `registry-full' in diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 19da2cc..5ec1268 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -50,6 +50,7 @@ (autoload 'ansi-color-apply-on-region "ansi-color") (autoload 'mm-url-insert-file-contents-external "mm-url") (autoload 'mm-extern-cache-contents "mm-extern") +(autoload 'url-expand-file-name "url-expand") (defgroup gnus-article nil "Article display." @@ -2792,10 +2793,9 @@ summary buffer." (setq gnus-article-browse-html-temp-list nil)) gnus-article-browse-html-temp-list) -(defun gnus-article-browse-html-save-cid-content (cid handles directory abs) +(defun gnus-article-browse-html-save-cid-content (cid handles directory) "Find CID content in HANDLES and save it in a file in DIRECTORY. -Return absolute file name if ABS is non-nil, otherwise relative to -the parent of DIRECTORY." +Return file name relative to the parent of DIRECTORY." (save-match-data (let (file afile) (catch 'found @@ -2807,7 +2807,7 @@ the parent of DIRECTORY." ((not (or (bufferp (car handle)) (stringp (car handle))))) ((equal (mm-handle-media-supertype handle) "multipart") (when (setq file (gnus-article-browse-html-save-cid-content - cid handle directory abs)) + cid handle directory)) (throw 'found file))) ((equal (concat "<" cid ">") (mm-handle-id handle)) (setq file (or (mm-handle-filename handle) @@ -2817,11 +2817,9 @@ the parent of DIRECTORY." mailcap-mime-extensions)))) afile (expand-file-name file directory)) (mm-save-part-to-file handle afile) - (throw 'found (if abs - afile - (concat (file-name-nondirectory - (directory-file-name directory)) - "/" file)))))))))) + (throw 'found (concat (file-name-nondirectory + (directory-file-name directory)) + "/" file))))))))) (defun gnus-article-browse-html-parts (list &optional header) "View all \"text/html\" parts from LIST. @@ -2857,13 +2855,32 @@ message header will be added to the bodies of the \"text/html\" parts." (insert content) ;; resolve cid contents (let ((case-fold-search t) - abs st cid-file) + st base regexp cid-file) (goto-char (point-min)) - (when (re-search-forward "]" nil t) - (setq st (match-end 0) - abs (or - (not (re-search-forward "]" nil t)) - (re-search-backward "]" st t)))) + (when (and (re-search-forward "]" nil t) + (progn + (setq st (match-end 0)) + (re-search-forward "]" nil t)) + (re-search-backward "]+\\)*[\t\n ]+href=\"\\([^\"]+\\)\"[^>]*>" st t)) + (setq base (match-string 1)) + (replace-match "") + (setq st (point)) + (dolist (tag '(("a" . "href") ("form" . "action") + ("img" . "src"))) + (setq regexp (concat "<" (car tag) + "\\(?:[\t\n ]+[^\t\n >]+\\)*[\t\n ]+" + (cdr tag) "=\"\\([^\"]+\\)")) + (while (re-search-forward regexp nil t) + (insert (prog1 + (condition-case nil + (save-match-data + (url-expand-file-name (match-string 1) + base)) + (error (match-string 1))) + (delete-region (match-beginning 1) + (match-end 1))))) + (goto-char st))) (while (re-search-forward "\ ]+[\t\n ]+\\)*src=\"\\(cid:\\([^\"]+\\)\\)\"" nil t) @@ -2877,18 +2894,7 @@ message header will be added to the bodies of the \"text/html\" parts." (match-string 2) (with-current-buffer gnus-article-buffer gnus-article-mime-handles) - cid-dir abs)) - (when abs - (setq cid-file - (if (eq system-type 'cygwin) - (concat "file:///" - (substring - (with-output-to-string - (call-process "cygpath" nil - standard-output - nil "-m" cid-file)) - 0 -1)) - (concat "file://" cid-file)))) + cid-dir)) (replace-match cid-file nil nil nil 1)))) (unless content (setq content (buffer-string)))) (when (or charset header (not file)) commit 0c2ea36d2032ef47a0d6520b3e513459e072a553 Author: Stefan Monnier Date: Thu Apr 2 10:00:48 2015 -0400 * lisp/abbrev.el (define-abbrev-table): Treat a non-string "docstring" as part of the "props" arguments rather than silently ignoring it. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 96732ec..38e45d0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2015-04-02 Stefan Monnier + * abbrev.el (define-abbrev-table): Treat a non-string "docstring" as + part of the "props" arguments rather than silently ignoring it. + * emacs-lisp/lisp-mnt.el (lm-version): Don't burp in a non-file buffer. 2015-04-01 Alan Mackenzie diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 7aa46e0..424d9c4 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -976,7 +976,8 @@ Properties with special meaning: ;; We used to manually add the docstring, but we also want to record this ;; location as the definition of the variable (in load-history), so we may ;; as well just use `defvar'. - (eval `(defvar ,tablename nil ,@(if (stringp docstring) (list docstring)))) + (eval `(defvar ,tablename nil ,@(if (stringp docstring) (list docstring) + (when props (push docstring props) nil)))) (let ((table (if (boundp tablename) (symbol-value tablename)))) (unless table (setq table (make-abbrev-table)) @@ -987,6 +988,7 @@ Properties with special meaning: ;; if the table was pre-existing as is the case if it was created by ;; loading the user's abbrev file. (while (consp props) + (unless (cdr props) (error "Missing value for property %S" (car props))) (abbrev-table-put table (pop props) (pop props))) (dolist (elt definitions) (apply 'define-abbrev table elt)))) commit 5e41a51e5cc45ca7289fc120f26ad90f45eb2682 Author: Stefan Monnier Date: Thu Apr 2 09:59:47 2015 -0400 * lisp/emacs-lisp/lisp-mnt.el (lm-version): Don't burp in a non-file buffer. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2092447..96732ec 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,9 +1,13 @@ +2015-04-02 Stefan Monnier + + * emacs-lisp/lisp-mnt.el (lm-version): Don't burp in a non-file buffer. + 2015-04-01 Alan Mackenzie Fix the CC Mode fixes from 2015-03-30. Fixes debbugs#20240. - * progmodes/cc-mode.el (c-extend-after-change-region): Widen - before applying text properties. + * progmodes/cc-mode.el (c-extend-after-change-region): + Widen before applying text properties. * progmodes/cc-langs.el (c-before-font-lock-functions): Update an entry to a new function name. diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el index f9874d8..fec172d 100644 --- a/lisp/emacs-lisp/lisp-mnt.el +++ b/lisp/emacs-lisp/lisp-mnt.el @@ -436,8 +436,10 @@ This can be found in an RCS or SCCS header." ;; Look for an SCCS header ((re-search-forward (concat - (regexp-quote "@(#)") - (regexp-quote (file-name-nondirectory (buffer-file-name))) + "@(#)" + (if buffer-file-name + (regexp-quote (file-name-nondirectory buffer-file-name)) + "[^\t\n]*") "\t\\([012345679.]*\\)") header-max t) (match-string-no-properties 1)))))))