Merge from emacs-24; up to 2014-03-24T03:06:35Z!dancol@dancol.org

This commit is contained in:
Juanma Barranquero 2014-03-27 18:34:22 +01:00
commit 1e757eb0a5
8 changed files with 88 additions and 32 deletions

View file

@ -1,3 +1,20 @@
2014-03-27 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight
special globals with font-lock-builtin-face. (Bug#17057)
* progmodes/ruby-mode.el (ruby-syntax-propertize-function):
Don't propertize `?' or `!' as symbol constituent when after
colon. (Bug#17097)
2014-03-27 Juanma Barranquero <lekktu@gmail.com>
* frameset.el (frameset--restore-frame): Remove workaround for bug#14795
which is no longer needed and causes trouble in GTK builds (bug#17046).
* emacs-lisp/package-x.el (package--archive-contents-from-url):
Use url-insert-file-contents; package-handle-response no longer exists.
2014-03-26 Daniel Colascione <dancol@dancol.org>
* simple.el (process-menu-mode-map): New variable.

View file

@ -114,18 +114,12 @@ inserted after its first occurrence in the file."
(defun package--archive-contents-from-url (archive-url)
"Parse archive-contents file at ARCHIVE-URL.
Return the file contents, as a string, or nil if unsuccessful."
(ignore-errors
(when archive-url
(let* ((buffer (url-retrieve-synchronously
(concat archive-url "archive-contents"))))
(set-buffer buffer)
(package-handle-response)
(re-search-forward "^$" nil 'move)
(forward-char)
(delete-region (point-min) (point))
(prog1 (package-read-from-string
(buffer-substring-no-properties (point-min) (point-max)))
(kill-buffer buffer))))))
(when archive-url
(with-temp-buffer
(ignore-errors
(url-insert-file-contents (concat archive-url "archive-contents"))
(package-read-from-string
(buffer-substring-no-properties (point-min) (point-max)))))))
(defun package--archive-contents-from-file ()
"Parse the archive-contents at `package-archive-upload-base'"

View file

@ -950,15 +950,10 @@ PARAMETERS is the frame's parameter alist; WINDOW-STATE is its window state.
For the meaning of FILTERS and FORCE-ONSCREEN, see `frameset-restore'.
Internal use only."
(let* ((fullscreen (cdr (assq 'fullscreen parameters)))
(lines (assq 'tool-bar-lines parameters))
(filtered-cfg (frameset-filter-params parameters filters nil))
(display (cdr (assq 'display filtered-cfg))) ;; post-filtering
alt-cfg frame)
;; This works around bug#14795 (or feature#14795, if not a bug :-)
(setq filtered-cfg (assq-delete-all 'tool-bar-lines filtered-cfg))
(push '(tool-bar-lines . 0) filtered-cfg)
(when fullscreen
;; Currently Emacs has the limitation that it does not record the size
;; and position of a frame before maximizing it, so we cannot save &
@ -1009,8 +1004,7 @@ Internal use only."
(not (eq (frame-parameter frame 'visibility) 'icon)))
(frameset-move-onscreen frame force-onscreen))
;; Let's give the finishing touches (visibility, tool-bar, maximization).
(when lines (push lines alt-cfg))
;; Let's give the finishing touches (visibility, maximization).
(when alt-cfg (modify-frame-parameters frame alt-cfg))
;; Now restore window state.
(window-state-put window-state (frame-root-window frame) 'safe)

View file

@ -1812,6 +1812,7 @@ It will be properly highlighted even when the call omits parens.")
("[!?]"
(0 (unless (save-excursion
(or (nth 8 (syntax-ppss (match-beginning 0)))
(eq (char-before) ?:)
(let (parse-sexp-lookup-properties)
(zerop (skip-syntax-backward "w_")))
(memq (preceding-char) '(?@ ?$))))
@ -2108,13 +2109,28 @@ See `font-lock-syntax-table'.")
1 font-lock-variable-name-face)
;; Keywords that evaluate to certain values.
("\\_<__\\(?:LINE\\|ENCODING\\|FILE\\)__\\_>"
(0 font-lock-variable-name-face))
(0 font-lock-builtin-face))
;; Symbols.
("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|@?\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)"
2 font-lock-constant-face)
;; Variables.
("\\$[^a-zA-Z \n]"
0 font-lock-variable-name-face)
;; Special globals.
(,(concat "\\$\\(?:[:\"!@;,/\\._><\\$?~=*&`'+0-9]\\|-[0adFiIlpvw]\\|"
(regexp-opt '("LOAD_PATH" "LOADED_FEATURES" "PROGRAM_NAME"
"ERROR_INFO" "ERROR_POSITION"
"FS" "FIELD_SEPARATOR"
"OFS" "OUTPUT_FIELD_SEPARATOR"
"RS" "INPUT_RECORD_SEPARATOR"
"ORS" "OUTPUT_RECORD_SEPARATOR"
"NR" "INPUT_LINE_NUMBER"
"LAST_READ_LINE" "DEFAULT_OUTPUT" "DEFAULT_INPUT"
"PID" "PROCESS_ID" "CHILD_STATUS"
"LAST_MATCH_INFO" "IGNORECASE"
"ARGV" "MATCH" "PREMATCH" "POSTMATCH"
"LAST_PAREN_MATCH" "stdin" "stdout" "stderr"
"DEBUG" "FILENAME" "VERBOSE" "SAFE" "CLASSPATH"
"JRUBY_VERSION" "JRUBY_REVISION" "ENV_JAVA"))
"\\_>\\)")
0 font-lock-builtin-face)
("\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+"
0 font-lock-variable-name-face)
;; Constants.

View file

@ -1,3 +1,15 @@
2014-03-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* w32term.c (x_draw_image_glyph_string): Fix computation of height
and width of image background when it is displayed with a 'box'
face. (Bug#17115)
2014-03-27 Paul Eggert <eggert@penguin.cs.ucla.edu>
More backward-compatible fix to char-equal core dump (Bug#17011).
* editfns.c (Fchar_equal): In unibyte buffers, assume values in
range 128-255 are raw bytes. Suggested by Eli Zaretskii.
2014-03-27 Juanma Barranquero <lekktu@gmail.com>
* image.c (init_svg_functions): When loading SVG-related libraries,

View file

@ -4377,13 +4377,23 @@ Case is ignored if `case-fold-search' is non-nil in the current buffer. */)
if (NILP (BVAR (current_buffer, case_fold_search)))
return Qnil;
/* FIXME: When enable-multibyte-characters is nil, it's still possible
to manipulate multibyte chars, which means there is a bug for chars
in the range 128-255 as we can't tell whether they are eight-bit
bytes or Latin-1 chars. For now, assume the latter. See Bug#17011.
Also see casefiddle.c's casify_object, which has a similar problem. */
i1 = XFASTINT (c1);
i2 = XFASTINT (c2);
/* FIXME: It is possible to compare multibyte characters even when
the current buffer is unibyte. Unfortunately this is ambiguous
for characters between 128 and 255, as they could be either
eight-bit raw bytes or Latin-1 characters. Assume the former for
now. See Bug#17011, and also see casefiddle.c's casify_object,
which has a similar problem. */
if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
{
if (SINGLE_BYTE_CHAR_P (i1))
i1 = UNIBYTE_TO_CHAR (i1);
if (SINGLE_BYTE_CHAR_P (i2))
i2 = UNIBYTE_TO_CHAR (i2);
}
return (downcase (i1) == downcase (i2) ? Qt : Qnil);
}

View file

@ -2085,10 +2085,14 @@ x_draw_image_glyph_string (struct glyph_string *s)
int x, y;
int box_line_hwidth = eabs (s->face->box_line_width);
int box_line_vwidth = max (s->face->box_line_width, 0);
int height;
int height, width;
HBITMAP pixmap = 0;
height = s->height - 2 * box_line_vwidth;
height = s->height;
if (s->slice.y == 0)
height -= box_line_vwidth;
if (s->slice.y + s->slice.height >= s->img->height)
height -= box_line_vwidth;
/* Fill background with face under the image. Do it only if row is
taller than image or if image has a clip mask to reduce
@ -2101,10 +2105,14 @@ x_draw_image_glyph_string (struct glyph_string *s)
|| s->img->pixmap == 0
|| s->width != s->background_width)
{
width = s->background_width;
x = s->x;
if (s->first_glyph->left_box_line_p
&& s->slice.x == 0)
x += box_line_hwidth;
{
x += box_line_hwidth;
width -= box_line_hwidth;
}
y = s->y;
if (s->slice.y == 0)
@ -2150,7 +2158,7 @@ x_draw_image_glyph_string (struct glyph_string *s)
}
else
#endif
x_draw_glyph_string_bg_rect (s, x, y, s->background_width, height);
x_draw_glyph_string_bg_rect (s, x, y, width, height);
s->background_filled_p = 1;
}

View file

@ -148,6 +148,11 @@ def test2 (arg)
)
end
# Bug#17097
if x == :!=
something
end
# Example from http://www.ruby-doc.org/docs/ProgrammingRuby/html/language.html
d = 4 + 5 + # no '\' needed
6 + 7