commit c0a0351249c1e6a9307224d8337ff8916f4cf138 (HEAD, refs/remotes/origin/master) Author: Robert Pluim Date: Thu May 24 17:28:11 2018 +0200 Obsolete image-jpeg-p * lisp/image.el (image-jpeg-p): Declare obsolete. diff --git a/lisp/image.el b/lisp/image.el index e084fe329a..8d12b680ea 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -248,6 +248,7 @@ compatibility with versions of Emacs that lack the variable ;; Used to be in image-type-header-regexps, but now not used anywhere ;; (since 2009-08-28). (defun image-jpeg-p (data) + (declare (obsolete "It is unused inside Emacs and will be removed." "27.1")) "Value is non-nil if DATA, a string, consists of JFIF image data. We accept the tag Exif because that is the same format." (setq data (ignore-errors (string-to-unibyte data))) commit 8ca42283939d458e30f74dce2bb1908257ea776f Author: Lars Ingebrigtsen Date: Thu May 31 13:51:45 2018 +0200 Fdirectory_files_and_attributes doc string clarification * src/dired.c (Fdirectory_files_and_attributes): Clarify what data is returned. diff --git a/src/dired.c b/src/dired.c index c446223a0b..115413dd6b 100644 --- a/src/dired.c +++ b/src/dired.c @@ -358,6 +358,16 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable. DEFUN ("directory-files-and-attributes", Fdirectory_files_and_attributes, Sdirectory_files_and_attributes, 1, 5, 0, doc: /* Return a list of names of files and their attributes in DIRECTORY. +The list returned has elements that contain the data from +`file-attributes' for each file -- with the file name prepended. So +the structure of each element is +`(FILE-NAME FILE-ATTRIBUTE1 FILE-ATTRIBUTE2 ...)'. + +For instance, to get the size of the fourth element in a directory, +you could say: + + (file-attribute-size (cdr (nth 3 (directory-files-and-attributes "/")))) + There are four optional arguments: If FULL is non-nil, return absolute file names. Otherwise return names that are relative to the specified directory. commit e50634c3543facde0ab5891548ae54aa1cd30caf Author: Alan Mackenzie Date: Thu May 31 11:32:15 2018 +0000 Amend c-before-change-check-unbalanced-strings to handle a quote at EOB. * lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings): Before going back a sexp from the \n marked with a string-fence syntax-table text property, check that it is indeed a \n. If not, simply delete that text property from the isolated quote, not the quote and the \n which otherwise delimit an unterminated string. Should we encounter a double quote marked with a string-fence syntax-table text property at the end of the last line, remove that property. diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 2427191eae..49c917160c 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -1121,7 +1121,8 @@ Note that the style variables are always made local to the buffer." ;; If BEG or END is inside an unbalanced string, remove the syntax-table ;; text property from respectively the start or end of the string. Also ;; extend the region (c-new-BEG c-new-END) as necessary to cope with the - ;; change being the insertion of an odd number of quotes. + ;; coming change involving the insertion or deletion of an odd number of + ;; quotes. ;; ;; POINT is undefined both at entry to and exit from this function, the ;; buffer will have been widened, and match data will have been saved. @@ -1169,31 +1170,37 @@ Note that the style variables are always made local to the buffer." (c-clear-char-property (1- (point)) 'syntax-table) (not (eq (char-before) ?\"))))) (eq (char-before) ?\")) - (if (eq (char-before (1- (point))) - c-multiline-string-start-char) - (progn - (c-pps-to-string-delim (point-max)) - (< (point) (point-max))) - (c-pps-to-string-delim (c-point 'eoll)) - (< (point) (c-point 'eoll)))))) + (progn + (c-pps-to-string-delim (point-max)) + (< (point) (point-max)))))) (setq c-new-END (max (point) c-new-END))) ((< c-new-END (point-max)) (goto-char (1+ c-new-END)) ; might be a newline. ;; In the following regexp, the initial \n caters for a newline getting ;; joined to a preceding \ by the removal of what comes between. - (re-search-forward "\n?\\(\\\\\\(.\\|\n\\|\r\\)\\|[^\\\n\r]\\)*" nil t) + (re-search-forward "[\n\r]?\\(\\\\\\(.\\|\n\\|\r\\)\\|[^\\\n\r]\\)*" + nil t) ;; We're at an EOLL or point-max. (setq c-new-END (min (1+ (point)) (point-max))) ;; FIXME!!! Write a clever comment here. (goto-char c-new-END) - (when (equal (c-get-char-property (1- (point)) 'syntax-table) '(15)) - (backward-sexp) - (c-clear-char-property (1- c-new-END) 'syntax-table) - (c-clear-char-property (point) 'syntax-table))) - - (t (if (memq (char-before c-new-END) c-string-delims) - (c-clear-char-property (1- c-new-END) 'syntax-table)))) + (if (equal (c-get-char-property (1- (point)) 'syntax-table) '(15)) + (if (memq (char-before) '(?\n ?\r)) + ;; Normally terminated invalid string. + (progn + (backward-sexp) + (c-clear-char-property (1- c-new-END) 'syntax-table) + (c-clear-char-property (point) 'syntax-table)) + ;; Opening " at EOB. + (c-clear-char-property (1- (point)) 'syntax-table)) + (if (c-search-backward-char-property 'syntax-table '(15) c-new-BEG) + ;; Opening " on last line of text (without EOL). + (c-clear-char-property (point) 'syntax-table)))) + + (t (goto-char c-new-END) + (if (c-search-backward-char-property 'syntax-table '(15) c-new-BEG) + (c-clear-char-property (point) 'syntax-table)))) (when (eq end-literal-type 'string) (c-clear-char-property (1- (cdr end-limits)) 'syntax-table))