Merge from emacs-23; up to 2012-01-19T07:15:48Z!rgm@gnu.org.
This commit is contained in:
commit
1259009aa1
7 changed files with 54 additions and 45 deletions
|
@ -1,7 +1,8 @@
|
|||
;;; python.wy -- LALR grammar for Python
|
||||
|
||||
;; Copyright (C) 2002-2012 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2001-2010 Python Software Foundation
|
||||
;; Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
|
||||
;; 2009, 2010 Python Software Foundation; All Rights Reserved
|
||||
|
||||
;; Author: Richard Kim <ryk@dspwiz.com>
|
||||
;; Maintainer: Richard Kim <ryk@dspwiz.com>
|
||||
|
|
|
@ -470,13 +470,13 @@ Menu items are appended to the common grammar menu.")
|
|||
"srecode/srt-wy")
|
||||
("wisent-javascript-jv-wy.el"
|
||||
"semantic/wisent/js-wy"
|
||||
"Copyright (C) 1998-2011 Ecma International"
|
||||
"Copyright (C) 1998-2011 Ecma International."
|
||||
,wisent-make-parsers--ecmascript-license)
|
||||
("wisent-java-tags-wy.el"
|
||||
"semantic/wisent/javat-wy")
|
||||
("wisent-python-wy.el"
|
||||
"semantic/wisent/python-wy"
|
||||
"Copyright (C) 2001-2010 Python Software Foundation"
|
||||
"Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Python Software Foundation; All Rights Reserved."
|
||||
,wisent-make-parsers--python-license)))
|
||||
|
||||
(defun wisent-make-parsers ()
|
||||
|
|
14
etc/NEWS.23
14
etc/NEWS.23
|
@ -24,12 +24,22 @@ require version 1.14 or later. See README.W32 and nt/INSTALL for
|
|||
details and pointers to URLs where the latest libpng can be
|
||||
downloaded.
|
||||
|
||||
|
||||
* Changes in Specialized Modes and Packages in Emacs 23.4
|
||||
|
||||
** EDE
|
||||
|
||||
*** New variable `ede-project-directories'.
|
||||
EDE now refuses to automatically load a project file (Project.ede)
|
||||
unless the file is in one of the directories specified by this
|
||||
variable. This reduces the risk of inadvertently loading malicious
|
||||
project files. The commands `M-x ede-new' and `M-x ede' now offer to
|
||||
save directories to `ede-project-directories'.
|
||||
|
||||
* Changes in Emacs 23.4 on non-free operating systems
|
||||
|
||||
** The MS-Windows port can now use more than 500MB of heap.
|
||||
Depending on the available virtual memory, Emacs on Windows can now
|
||||
have up to 2GB of heap space. This allows, e.g., to visit several
|
||||
have up to 2GB of heap space. This allows, e.g., visiting several
|
||||
large (> 256MB) files in the same session.
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;;; semantic/wisent/js-wy.el --- Generated parser support file
|
||||
|
||||
;; Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 1998-2011 Ecma International
|
||||
;; Copyright (C) 1998-2011 Ecma International.
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
;;; semantic/wisent/python-wy.el --- Generated parser support file
|
||||
|
||||
;; Copyright (C) 2002-2004, 2007, 2010-2012 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2001-2010 Python Software Foundation
|
||||
;; Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
|
||||
;; 2009, 2010 Python Software Foundation; All Rights Reserved
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2012-01-19 Kenichi Handa <handa@m17n.org>
|
||||
|
||||
* character.c (char_width): New function.
|
||||
(Fchar_width, c_string_width, lisp_string_width):
|
||||
Use char_width (Bug#9496).
|
||||
|
||||
2012-01-16 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* window.c (Vwindow_persistent_parameters): New variable.
|
||||
|
|
|
@ -308,6 +308,31 @@ If the multibyte character does not represent a byte, return -1. */)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/* Return width (columns) of C considering the buffer display table DP. */
|
||||
|
||||
static int
|
||||
char_width (int c, struct Lisp_Char_Table *dp)
|
||||
{
|
||||
int width = CHAR_WIDTH (c);
|
||||
|
||||
if (dp)
|
||||
{
|
||||
Lisp_Object disp = DISP_CHAR_VECTOR (dp, c), ch;
|
||||
int i;
|
||||
|
||||
if (VECTORP (disp))
|
||||
for (i = 0, width = 0; i < ASIZE (disp); i++)
|
||||
{
|
||||
ch = AREF (disp, i);
|
||||
if (CHARACTERP (ch))
|
||||
width += CHAR_WIDTH (XFASTINT (ch));
|
||||
}
|
||||
}
|
||||
return width;
|
||||
}
|
||||
|
||||
|
||||
DEFUN ("char-width", Fchar_width, Schar_width, 1, 1, 0,
|
||||
doc: /* Return width of CHAR when displayed in the current buffer.
|
||||
The width is measured by how many columns it occupies on the screen.
|
||||
|
@ -315,21 +340,11 @@ Tab is taken to occupy `tab-width' columns.
|
|||
usage: (char-width CHAR) */)
|
||||
(Lisp_Object ch)
|
||||
{
|
||||
Lisp_Object disp;
|
||||
int c, width;
|
||||
struct Lisp_Char_Table *dp = buffer_display_table ();
|
||||
|
||||
CHECK_CHARACTER (ch);
|
||||
c = XINT (ch);
|
||||
|
||||
/* Get the way the display table would display it. */
|
||||
disp = dp ? DISP_CHAR_VECTOR (dp, c) : Qnil;
|
||||
|
||||
if (VECTORP (disp))
|
||||
width = sanitize_char_width (ASIZE (disp));
|
||||
else
|
||||
width = CHAR_WIDTH (c);
|
||||
|
||||
width = char_width (c, buffer_display_table ());
|
||||
return make_number (width);
|
||||
}
|
||||
|
||||
|
@ -350,22 +365,9 @@ c_string_width (const unsigned char *str, EMACS_INT len, int precision,
|
|||
|
||||
while (i_byte < len)
|
||||
{
|
||||
int bytes, thiswidth;
|
||||
Lisp_Object val;
|
||||
int bytes;
|
||||
int c = STRING_CHAR_AND_LENGTH (str + i_byte, bytes);
|
||||
|
||||
if (dp)
|
||||
{
|
||||
val = DISP_CHAR_VECTOR (dp, c);
|
||||
if (VECTORP (val))
|
||||
thiswidth = sanitize_char_width (ASIZE (val));
|
||||
else
|
||||
thiswidth = CHAR_WIDTH (c);
|
||||
}
|
||||
else
|
||||
{
|
||||
thiswidth = CHAR_WIDTH (c);
|
||||
}
|
||||
int thiswidth = char_width (c, dp);
|
||||
|
||||
if (precision > 0
|
||||
&& (width + thiswidth > precision))
|
||||
|
@ -447,18 +449,7 @@ lisp_string_width (Lisp_Object string, EMACS_INT precision,
|
|||
else
|
||||
c = str[i_byte], bytes = 1;
|
||||
chars = 1;
|
||||
if (dp)
|
||||
{
|
||||
val = DISP_CHAR_VECTOR (dp, c);
|
||||
if (VECTORP (val))
|
||||
thiswidth = sanitize_char_width (ASIZE (val));
|
||||
else
|
||||
thiswidth = CHAR_WIDTH (c);
|
||||
}
|
||||
else
|
||||
{
|
||||
thiswidth = CHAR_WIDTH (c);
|
||||
}
|
||||
thiswidth = char_width (c, dp);
|
||||
}
|
||||
|
||||
if (precision <= 0)
|
||||
|
|
Loading…
Add table
Reference in a new issue