summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--admin/grammars/python.wy3
-rw-r--r--admin/grammars/wisent-grammar.el4
-rw-r--r--etc/NEWS.2314
-rw-r--r--lisp/cedet/semantic/wisent/js-wy.el2
-rw-r--r--lisp/cedet/semantic/wisent/python-wy.el3
-rw-r--r--src/ChangeLog6
-rw-r--r--src/character.c67
7 files changed, 54 insertions, 45 deletions
diff --git a/admin/grammars/python.wy b/admin/grammars/python.wy
index 65f317145a0..f7808fd20b8 100644
--- a/admin/grammars/python.wy
+++ b/admin/grammars/python.wy
@@ -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>
diff --git a/admin/grammars/wisent-grammar.el b/admin/grammars/wisent-grammar.el
index be014a56906..714b5211127 100644
--- a/admin/grammars/wisent-grammar.el
+++ b/admin/grammars/wisent-grammar.el
@@ -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 ()
diff --git a/etc/NEWS.23 b/etc/NEWS.23
index f9dbfa8adef..77ba82c15ad 100644
--- a/etc/NEWS.23
+++ b/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.
diff --git a/lisp/cedet/semantic/wisent/js-wy.el b/lisp/cedet/semantic/wisent/js-wy.el
index b8d3240aef1..05346b02c8d 100644
--- a/lisp/cedet/semantic/wisent/js-wy.el
+++ b/lisp/cedet/semantic/wisent/js-wy.el
@@ -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.
diff --git a/lisp/cedet/semantic/wisent/python-wy.el b/lisp/cedet/semantic/wisent/python-wy.el
index cb0f37c8f16..e8229dcd9ea 100644
--- a/lisp/cedet/semantic/wisent/python-wy.el
+++ b/lisp/cedet/semantic/wisent/python-wy.el
@@ -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.
diff --git a/src/ChangeLog b/src/ChangeLog
index aa4e92b4134..3a6e31eede4 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -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.
diff --git a/src/character.c b/src/character.c
index a2cb416d770..593fbcece0b 100644
--- a/src/character.c
+++ b/src/character.c
@@ -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)