aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2014-03-27 18:34:22 +0100
committerJuanma Barranquero2014-03-27 18:34:22 +0100
commit1e757eb0a5bab2bdd26de8a6553ee5c2b2e2a381 (patch)
tree01db12aa0584e566f44f32c062a67f98ea836837
parentb9b37dd04e6f60ef16738efe1b396a9e0a461d86 (diff)
parent0c4e715c98919593413a76a0ab1458b0d10ea287 (diff)
downloademacs-1e757eb0a5bab2bdd26de8a6553ee5c2b2e2a381.tar.gz
emacs-1e757eb0a5bab2bdd26de8a6553ee5c2b2e2a381.zip
Merge from emacs-24; up to 2014-03-24T03:06:35Z!dancol@dancol.org
-rw-r--r--lisp/ChangeLog17
-rw-r--r--lisp/emacs-lisp/package-x.el18
-rw-r--r--lisp/frameset.el8
-rw-r--r--lisp/progmodes/ruby-mode.el24
-rw-r--r--src/ChangeLog12
-rw-r--r--src/editfns.c20
-rw-r--r--src/w32term.c16
-rw-r--r--test/indent/ruby.rb5
8 files changed, 88 insertions, 32 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 613108fc015..fc83e157d18 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,20 @@
12014-03-27 Dmitry Gutov <dgutov@yandex.ru>
2
3 * progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight
4 special globals with font-lock-builtin-face. (Bug#17057)
5
6 * progmodes/ruby-mode.el (ruby-syntax-propertize-function):
7 Don't propertize `?' or `!' as symbol constituent when after
8 colon. (Bug#17097)
9
102014-03-27 Juanma Barranquero <lekktu@gmail.com>
11
12 * frameset.el (frameset--restore-frame): Remove workaround for bug#14795
13 which is no longer needed and causes trouble in GTK builds (bug#17046).
14
15 * emacs-lisp/package-x.el (package--archive-contents-from-url):
16 Use url-insert-file-contents; package-handle-response no longer exists.
17
12014-03-26 Daniel Colascione <dancol@dancol.org> 182014-03-26 Daniel Colascione <dancol@dancol.org>
2 19
3 * simple.el (process-menu-mode-map): New variable. 20 * simple.el (process-menu-mode-map): New variable.
diff --git a/lisp/emacs-lisp/package-x.el b/lisp/emacs-lisp/package-x.el
index 6a6a62dc916..1d9d1a04668 100644
--- a/lisp/emacs-lisp/package-x.el
+++ b/lisp/emacs-lisp/package-x.el
@@ -114,18 +114,12 @@ inserted after its first occurrence in the file."
114(defun package--archive-contents-from-url (archive-url) 114(defun package--archive-contents-from-url (archive-url)
115 "Parse archive-contents file at ARCHIVE-URL. 115 "Parse archive-contents file at ARCHIVE-URL.
116Return the file contents, as a string, or nil if unsuccessful." 116Return the file contents, as a string, or nil if unsuccessful."
117 (ignore-errors 117 (when archive-url
118 (when archive-url 118 (with-temp-buffer
119 (let* ((buffer (url-retrieve-synchronously 119 (ignore-errors
120 (concat archive-url "archive-contents")))) 120 (url-insert-file-contents (concat archive-url "archive-contents"))
121 (set-buffer buffer) 121 (package-read-from-string
122 (package-handle-response) 122 (buffer-substring-no-properties (point-min) (point-max)))))))
123 (re-search-forward "^$" nil 'move)
124 (forward-char)
125 (delete-region (point-min) (point))
126 (prog1 (package-read-from-string
127 (buffer-substring-no-properties (point-min) (point-max)))
128 (kill-buffer buffer))))))
129 123
130(defun package--archive-contents-from-file () 124(defun package--archive-contents-from-file ()
131 "Parse the archive-contents at `package-archive-upload-base'" 125 "Parse the archive-contents at `package-archive-upload-base'"
diff --git a/lisp/frameset.el b/lisp/frameset.el
index 2f1453f2a19..b943d47e7bf 100644
--- a/lisp/frameset.el
+++ b/lisp/frameset.el
@@ -950,15 +950,10 @@ PARAMETERS is the frame's parameter alist; WINDOW-STATE is its window state.
950For the meaning of FILTERS and FORCE-ONSCREEN, see `frameset-restore'. 950For the meaning of FILTERS and FORCE-ONSCREEN, see `frameset-restore'.
951Internal use only." 951Internal use only."
952 (let* ((fullscreen (cdr (assq 'fullscreen parameters))) 952 (let* ((fullscreen (cdr (assq 'fullscreen parameters)))
953 (lines (assq 'tool-bar-lines parameters))
954 (filtered-cfg (frameset-filter-params parameters filters nil)) 953 (filtered-cfg (frameset-filter-params parameters filters nil))
955 (display (cdr (assq 'display filtered-cfg))) ;; post-filtering 954 (display (cdr (assq 'display filtered-cfg))) ;; post-filtering
956 alt-cfg frame) 955 alt-cfg frame)
957 956
958 ;; This works around bug#14795 (or feature#14795, if not a bug :-)
959 (setq filtered-cfg (assq-delete-all 'tool-bar-lines filtered-cfg))
960 (push '(tool-bar-lines . 0) filtered-cfg)
961
962 (when fullscreen 957 (when fullscreen
963 ;; Currently Emacs has the limitation that it does not record the size 958 ;; Currently Emacs has the limitation that it does not record the size
964 ;; and position of a frame before maximizing it, so we cannot save & 959 ;; and position of a frame before maximizing it, so we cannot save &
@@ -1009,8 +1004,7 @@ Internal use only."
1009 (not (eq (frame-parameter frame 'visibility) 'icon))) 1004 (not (eq (frame-parameter frame 'visibility) 'icon)))
1010 (frameset-move-onscreen frame force-onscreen)) 1005 (frameset-move-onscreen frame force-onscreen))
1011 1006
1012 ;; Let's give the finishing touches (visibility, tool-bar, maximization). 1007 ;; Let's give the finishing touches (visibility, maximization).
1013 (when lines (push lines alt-cfg))
1014 (when alt-cfg (modify-frame-parameters frame alt-cfg)) 1008 (when alt-cfg (modify-frame-parameters frame alt-cfg))
1015 ;; Now restore window state. 1009 ;; Now restore window state.
1016 (window-state-put window-state (frame-root-window frame) 'safe) 1010 (window-state-put window-state (frame-root-window frame) 'safe)
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index 2b8f2fa6868..6c6cdd3427d 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -1812,6 +1812,7 @@ It will be properly highlighted even when the call omits parens.")
1812 ("[!?]" 1812 ("[!?]"
1813 (0 (unless (save-excursion 1813 (0 (unless (save-excursion
1814 (or (nth 8 (syntax-ppss (match-beginning 0))) 1814 (or (nth 8 (syntax-ppss (match-beginning 0)))
1815 (eq (char-before) ?:)
1815 (let (parse-sexp-lookup-properties) 1816 (let (parse-sexp-lookup-properties)
1816 (zerop (skip-syntax-backward "w_"))) 1817 (zerop (skip-syntax-backward "w_")))
1817 (memq (preceding-char) '(?@ ?$)))) 1818 (memq (preceding-char) '(?@ ?$))))
@@ -2108,13 +2109,28 @@ See `font-lock-syntax-table'.")
2108 1 font-lock-variable-name-face) 2109 1 font-lock-variable-name-face)
2109 ;; Keywords that evaluate to certain values. 2110 ;; Keywords that evaluate to certain values.
2110 ("\\_<__\\(?:LINE\\|ENCODING\\|FILE\\)__\\_>" 2111 ("\\_<__\\(?:LINE\\|ENCODING\\|FILE\\)__\\_>"
2111 (0 font-lock-variable-name-face)) 2112 (0 font-lock-builtin-face))
2112 ;; Symbols. 2113 ;; Symbols.
2113 ("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|@?\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)" 2114 ("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|@?\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)"
2114 2 font-lock-constant-face) 2115 2 font-lock-constant-face)
2115 ;; Variables. 2116 ;; Special globals.
2116 ("\\$[^a-zA-Z \n]" 2117 (,(concat "\\$\\(?:[:\"!@;,/\\._><\\$?~=*&`'+0-9]\\|-[0adFiIlpvw]\\|"
2117 0 font-lock-variable-name-face) 2118 (regexp-opt '("LOAD_PATH" "LOADED_FEATURES" "PROGRAM_NAME"
2119 "ERROR_INFO" "ERROR_POSITION"
2120 "FS" "FIELD_SEPARATOR"
2121 "OFS" "OUTPUT_FIELD_SEPARATOR"
2122 "RS" "INPUT_RECORD_SEPARATOR"
2123 "ORS" "OUTPUT_RECORD_SEPARATOR"
2124 "NR" "INPUT_LINE_NUMBER"
2125 "LAST_READ_LINE" "DEFAULT_OUTPUT" "DEFAULT_INPUT"
2126 "PID" "PROCESS_ID" "CHILD_STATUS"
2127 "LAST_MATCH_INFO" "IGNORECASE"
2128 "ARGV" "MATCH" "PREMATCH" "POSTMATCH"
2129 "LAST_PAREN_MATCH" "stdin" "stdout" "stderr"
2130 "DEBUG" "FILENAME" "VERBOSE" "SAFE" "CLASSPATH"
2131 "JRUBY_VERSION" "JRUBY_REVISION" "ENV_JAVA"))
2132 "\\_>\\)")
2133 0 font-lock-builtin-face)
2118 ("\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+" 2134 ("\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+"
2119 0 font-lock-variable-name-face) 2135 0 font-lock-variable-name-face)
2120 ;; Constants. 2136 ;; Constants.
diff --git a/src/ChangeLog b/src/ChangeLog
index 10cc66aceed..eb5db45534f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,15 @@
12014-03-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2
3 * w32term.c (x_draw_image_glyph_string): Fix computation of height
4 and width of image background when it is displayed with a 'box'
5 face. (Bug#17115)
6
72014-03-27 Paul Eggert <eggert@penguin.cs.ucla.edu>
8
9 More backward-compatible fix to char-equal core dump (Bug#17011).
10 * editfns.c (Fchar_equal): In unibyte buffers, assume values in
11 range 128-255 are raw bytes. Suggested by Eli Zaretskii.
12
12014-03-27 Juanma Barranquero <lekktu@gmail.com> 132014-03-27 Juanma Barranquero <lekktu@gmail.com>
2 14
3 * image.c (init_svg_functions): When loading SVG-related libraries, 15 * image.c (init_svg_functions): When loading SVG-related libraries,
diff --git a/src/editfns.c b/src/editfns.c
index 1986ee53d23..9c1fcb0b790 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -4377,13 +4377,23 @@ Case is ignored if `case-fold-search' is non-nil in the current buffer. */)
4377 if (NILP (BVAR (current_buffer, case_fold_search))) 4377 if (NILP (BVAR (current_buffer, case_fold_search)))
4378 return Qnil; 4378 return Qnil;
4379 4379
4380 /* FIXME: When enable-multibyte-characters is nil, it's still possible
4381 to manipulate multibyte chars, which means there is a bug for chars
4382 in the range 128-255 as we can't tell whether they are eight-bit
4383 bytes or Latin-1 chars. For now, assume the latter. See Bug#17011.
4384 Also see casefiddle.c's casify_object, which has a similar problem. */
4385 i1 = XFASTINT (c1); 4380 i1 = XFASTINT (c1);
4386 i2 = XFASTINT (c2); 4381 i2 = XFASTINT (c2);
4382
4383 /* FIXME: It is possible to compare multibyte characters even when
4384 the current buffer is unibyte. Unfortunately this is ambiguous
4385 for characters between 128 and 255, as they could be either
4386 eight-bit raw bytes or Latin-1 characters. Assume the former for
4387 now. See Bug#17011, and also see casefiddle.c's casify_object,
4388 which has a similar problem. */
4389 if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
4390 {
4391 if (SINGLE_BYTE_CHAR_P (i1))
4392 i1 = UNIBYTE_TO_CHAR (i1);
4393 if (SINGLE_BYTE_CHAR_P (i2))
4394 i2 = UNIBYTE_TO_CHAR (i2);
4395 }
4396
4387 return (downcase (i1) == downcase (i2) ? Qt : Qnil); 4397 return (downcase (i1) == downcase (i2) ? Qt : Qnil);
4388} 4398}
4389 4399
diff --git a/src/w32term.c b/src/w32term.c
index e8ec99e762d..256d7506a3a 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -2085,10 +2085,14 @@ x_draw_image_glyph_string (struct glyph_string *s)
2085 int x, y; 2085 int x, y;
2086 int box_line_hwidth = eabs (s->face->box_line_width); 2086 int box_line_hwidth = eabs (s->face->box_line_width);
2087 int box_line_vwidth = max (s->face->box_line_width, 0); 2087 int box_line_vwidth = max (s->face->box_line_width, 0);
2088 int height; 2088 int height, width;
2089 HBITMAP pixmap = 0; 2089 HBITMAP pixmap = 0;
2090 2090
2091 height = s->height - 2 * box_line_vwidth; 2091 height = s->height;
2092 if (s->slice.y == 0)
2093 height -= box_line_vwidth;
2094 if (s->slice.y + s->slice.height >= s->img->height)
2095 height -= box_line_vwidth;
2092 2096
2093 /* Fill background with face under the image. Do it only if row is 2097 /* Fill background with face under the image. Do it only if row is
2094 taller than image or if image has a clip mask to reduce 2098 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)
2101 || s->img->pixmap == 0 2105 || s->img->pixmap == 0
2102 || s->width != s->background_width) 2106 || s->width != s->background_width)
2103 { 2107 {
2108 width = s->background_width;
2104 x = s->x; 2109 x = s->x;
2105 if (s->first_glyph->left_box_line_p 2110 if (s->first_glyph->left_box_line_p
2106 && s->slice.x == 0) 2111 && s->slice.x == 0)
2107 x += box_line_hwidth; 2112 {
2113 x += box_line_hwidth;
2114 width -= box_line_hwidth;
2115 }
2108 2116
2109 y = s->y; 2117 y = s->y;
2110 if (s->slice.y == 0) 2118 if (s->slice.y == 0)
@@ -2150,7 +2158,7 @@ x_draw_image_glyph_string (struct glyph_string *s)
2150 } 2158 }
2151 else 2159 else
2152#endif 2160#endif
2153 x_draw_glyph_string_bg_rect (s, x, y, s->background_width, height); 2161 x_draw_glyph_string_bg_rect (s, x, y, width, height);
2154 2162
2155 s->background_filled_p = 1; 2163 s->background_filled_p = 1;
2156 } 2164 }
diff --git a/test/indent/ruby.rb b/test/indent/ruby.rb
index 99482433145..fb341ee7ba6 100644
--- a/test/indent/ruby.rb
+++ b/test/indent/ruby.rb
@@ -148,6 +148,11 @@ if something == :==
148 ) 148 )
149end 149end
150 150
151# Bug#17097
152if x == :!=
153 something
154end
155
151# Example from http://www.ruby-doc.org/docs/ProgrammingRuby/html/language.html 156# Example from http://www.ruby-doc.org/docs/ProgrammingRuby/html/language.html
152d = 4 + 5 + # no '\' needed 157d = 4 + 5 + # no '\' needed
153 6 + 7 158 6 + 7