diff options
| author | Dmitry Antipov | 2012-07-20 11:29:04 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2012-07-20 11:29:04 +0400 |
| commit | d7ea76b4f34c4e2c43bf0b1deeedde354ca540f7 (patch) | |
| tree | ac3cb2ab6d00e89542afc9a5290191e549ce1d81 /src/xfns.c | |
| parent | 765e61e391ee0937ff6b30510b6c4651064fe38e (diff) | |
| download | emacs-d7ea76b4f34c4e2c43bf0b1deeedde354ca540f7.tar.gz emacs-d7ea76b4f34c4e2c43bf0b1deeedde354ca540f7.zip | |
Simple wrapper for make_unibyte_string, adjust font_open_by_name.
* src/lisp.h (build_unibyte_string): New function.
* src/dosfns.c, src/fileio.c, src/fns.c, src/ftfont.c, src/process.c:
* src/sysdep.c, src/w32fns.c, src/xfns.c: Use it.
* src/font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
of type Lisp_Object to avoid redundant calls to make_unibyte_string.
Adjust users accordingly.
* src/font.h (font_open_by_name): Adjust prototype.
* admin/coccinelle/unibyte_string.cocci: Semantic patch to convert from
make_unibyte_string to build_unibyte_string where appropriate.
Diffstat (limited to 'src/xfns.c')
| -rw-r--r-- | src/xfns.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xfns.c b/src/xfns.c index a0229919aa0..e431651d93a 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -2956,7 +2956,7 @@ x_default_font_parameter (struct frame *f, Lisp_Object parms) | |||
| 2956 | read yet. */ | 2956 | read yet. */ |
| 2957 | const char *system_font = xsettings_get_system_font (); | 2957 | const char *system_font = xsettings_get_system_font (); |
| 2958 | if (system_font) | 2958 | if (system_font) |
| 2959 | font = font_open_by_name (f, system_font, strlen (system_font)); | 2959 | font = font_open_by_name (f, build_unibyte_string (system_font)); |
| 2960 | } | 2960 | } |
| 2961 | 2961 | ||
| 2962 | if (NILP (font)) | 2962 | if (NILP (font)) |
| @@ -2986,7 +2986,7 @@ x_default_font_parameter (struct frame *f, Lisp_Object parms) | |||
| 2986 | 2986 | ||
| 2987 | for (i = 0; names[i]; i++) | 2987 | for (i = 0; names[i]; i++) |
| 2988 | { | 2988 | { |
| 2989 | font = font_open_by_name (f, names[i], strlen (names[i])); | 2989 | font = font_open_by_name (f, build_unibyte_string (names[i])); |
| 2990 | if (! NILP (font)) | 2990 | if (! NILP (font)) |
| 2991 | break; | 2991 | break; |
| 2992 | } | 2992 | } |