diff options
| author | Kenichi Handa | 2010-09-02 11:00:18 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2010-09-02 11:00:18 +0900 |
| commit | 56524ce00eaf104b1f59288ef219c8edb4ef311d (patch) | |
| tree | ac35fd89c65a2d2cf1e3ae8b9792e49dbd047b29 | |
| parent | ae682ff5aeacc6e99a76d567b487cd2fa0d9a4a9 (diff) | |
| parent | 2333c84afd9263abd5c71b4503435c5db1292f94 (diff) | |
| download | emacs-56524ce00eaf104b1f59288ef219c8edb4ef311d.tar.gz emacs-56524ce00eaf104b1f59288ef219c8edb4ef311d.zip | |
merge changes in emacs-23 branch
| -rw-r--r-- | doc/man/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/man/emacs.1 | 5 | ||||
| -rw-r--r-- | doc/misc/ChangeLog | 13 | ||||
| -rw-r--r-- | etc/ChangeLog | 4 | ||||
| -rw-r--r-- | etc/emacs3.py | 11 | ||||
| -rw-r--r-- | leim/ChangeLog | 5 | ||||
| -rw-r--r-- | leim/quail/japanese.el | 15 | ||||
| -rw-r--r-- | lisp/ChangeLog | 280 | ||||
| -rw-r--r-- | lisp/disp-table.el | 27 | ||||
| -rw-r--r-- | lisp/international/mule-cmds.el | 4 | ||||
| -rw-r--r-- | lisp/net/rcirc.el | 31 | ||||
| -rw-r--r-- | lisp/play/cookie1.el | 2 | ||||
| -rw-r--r-- | lisp/progmodes/python.el | 2 | ||||
| -rw-r--r-- | lisp/simple.el | 22 | ||||
| -rw-r--r-- | src/ChangeLog | 35 | ||||
| -rw-r--r-- | src/dispextern.h | 10 | ||||
| -rw-r--r-- | src/term.c | 45 | ||||
| -rw-r--r-- | src/xdisp.c | 319 |
18 files changed, 543 insertions, 291 deletions
diff --git a/doc/man/ChangeLog b/doc/man/ChangeLog index 2b2cbb90a9e..47f059e7d3c 100644 --- a/doc/man/ChangeLog +++ b/doc/man/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-08-26 Sven Joachim <svenjoac@gmx.de> | ||
| 2 | |||
| 3 | * emacs.1: Mention "maximized" value for the "fullscreen" X resource. | ||
| 4 | |||
| 1 | 2010-05-07 Chong Yidong <cyd@stupidchicken.com> | 5 | 2010-05-07 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 6 | ||
| 3 | * Version 23.2 released. | 7 | * Version 23.2 released. |
diff --git a/doc/man/emacs.1 b/doc/man/emacs.1 index 15b7a73259b..2ad9e2c543a 100644 --- a/doc/man/emacs.1 +++ b/doc/man/emacs.1 | |||
| @@ -403,11 +403,12 @@ sets the window's text color. | |||
| 403 | The desired fullscreen size. | 403 | The desired fullscreen size. |
| 404 | The value can be one of | 404 | The value can be one of |
| 405 | .IR fullboth , | 405 | .IR fullboth , |
| 406 | .IR maximized , | ||
| 406 | .IR fullwidth , | 407 | .IR fullwidth , |
| 407 | or | 408 | or |
| 408 | .IR fullheight , | 409 | .IR fullheight , |
| 409 | which correspond to the command-line options `\-fs', `\-fw', and | 410 | which correspond to the command-line options `\-fs', `-mm', `\-fw', |
| 410 | `\-fh', respectively. | 411 | and `\-fh', respectively. |
| 411 | Note that this applies to the initial frame only. | 412 | Note that this applies to the initial frame only. |
| 412 | .TP | 413 | .TP |
| 413 | .BR geometry " (class " Geometry ) | 414 | .BR geometry " (class " Geometry ) |
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 2890af57f1a..d811c3b7e43 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -34,6 +34,19 @@ | |||
| 34 | 34 | ||
| 35 | Sync with Tramp 2.1.19. | 35 | Sync with Tramp 2.1.19. |
| 36 | 36 | ||
| 37 | * tramp.texi (Inline methods, Default Method): Mention | ||
| 38 | `tramp-inline-compress-start-size'. Remove "kludgy" phrase. Remove | ||
| 39 | remark about doubled "-t" argument. | ||
| 40 | (Auto-save and Backup): Remove reference to Emacs 21. | ||
| 41 | (Filename Syntax): Describe port numbers. | ||
| 42 | (Frequently Asked Questions): Adapt supported (X)Emacs versions. Adapt | ||
| 43 | supported MS Windows versions. Remove obsolete URL. Recommend "sshx" | ||
| 44 | and "scpx" for echoing shells. Use the $() syntax, texi2dvi reports | ||
| 45 | errors with the backquotes. | ||
| 46 | (External packages): File attributes cache flushing for asynchronous | ||
| 47 | processes. | ||
| 48 | (Traces and Profiles): Describe verbose level 9. | ||
| 49 | |||
| 37 | * trampver.texi: Update release number. | 50 | * trampver.texi: Update release number. |
| 38 | 51 | ||
| 39 | 2010-08-23 Michael Albinus <michael.albinus@gmx.de> | 52 | 2010-08-23 Michael Albinus <michael.albinus@gmx.de> |
diff --git a/etc/ChangeLog b/etc/ChangeLog index dcb73156d7e..70e002f0f9e 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -6,6 +6,10 @@ | |||
| 6 | 6 | ||
| 7 | * NEWS: dbus.el supports alternative buses. | 7 | * NEWS: dbus.el supports alternative buses. |
| 8 | 8 | ||
| 9 | 2010-08-22 Alex Harsanyi <harsanyi@mac.com> (tiny change) | ||
| 10 | |||
| 11 | * emacs3.py: Import imp module and use it (Bug#5756). | ||
| 12 | |||
| 9 | 2010-08-14 Eli Zaretskii <eliz@gnu.org> | 13 | 2010-08-14 Eli Zaretskii <eliz@gnu.org> |
| 10 | 14 | ||
| 11 | * tutorials/TUTORIAL.he: Use MAQAF instead of hyphen where appropriate. | 15 | * tutorials/TUTORIAL.he: Use MAQAF instead of hyphen where appropriate. |
diff --git a/etc/emacs3.py b/etc/emacs3.py index fd2e7c97c53..de81848e5c3 100644 --- a/etc/emacs3.py +++ b/etc/emacs3.py | |||
| @@ -1,10 +1,3 @@ | |||
| 1 | """ | ||
| 2 | Warning: This file is automatically generated from emacs2.py with the | ||
| 3 | 2to3 script. Do not hand edit. | ||
| 4 | """ | ||
| 5 | |||
| 6 | """Definitions used by commands sent to inferior Python in python.el.""" | ||
| 7 | |||
| 8 | # Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | 1 | # Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
| 9 | # Author: Dave Love <fx@gnu.org> | 2 | # Author: Dave Love <fx@gnu.org> |
| 10 | 3 | ||
| @@ -23,7 +16,7 @@ Warning: This file is automatically generated from emacs2.py with the | |||
| 23 | # You should have received a copy of the GNU General Public License | 16 | # You should have received a copy of the GNU General Public License |
| 24 | # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | 17 | # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
| 25 | 18 | ||
| 26 | import os, sys, traceback, inspect, __main__ | 19 | import os, sys, traceback, inspect, imp, __main__ |
| 27 | 20 | ||
| 28 | try: | 21 | try: |
| 29 | set | 22 | set |
| @@ -216,7 +209,7 @@ def eimport (mod, dir): | |||
| 216 | try: | 209 | try: |
| 217 | try: | 210 | try: |
| 218 | if mod in __dict__ and inspect.ismodule (__dict__[mod]): | 211 | if mod in __dict__ and inspect.ismodule (__dict__[mod]): |
| 219 | reload (__dict__[mod]) | 212 | imp.reload (__dict__[mod]) |
| 220 | else: | 213 | else: |
| 221 | __dict__[mod] = __import__ (mod) | 214 | __dict__[mod] = __import__ (mod) |
| 222 | except: | 215 | except: |
diff --git a/leim/ChangeLog b/leim/ChangeLog index 36788bbd5e7..1233aaf3062 100644 --- a/leim/ChangeLog +++ b/leim/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-08-28 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * quail/japanese.el (quail-japanese-update-translation): Fix | ||
| 4 | handling of invalid key. | ||
| 5 | |||
| 1 | 2010-08-15 Andreas Schwab <schwab@linux-m68k.org> | 6 | 2010-08-15 Andreas Schwab <schwab@linux-m68k.org> |
| 2 | 7 | ||
| 3 | * quail/vntelex.el ("vietnamese-telex"): Doc fix. | 8 | * quail/vntelex.el ("vietnamese-telex"): Doc fix. |
diff --git a/leim/quail/japanese.el b/leim/quail/japanese.el index e1f7e74e030..42d83c6b806 100644 --- a/leim/quail/japanese.el +++ b/leim/quail/japanese.el | |||
| @@ -43,20 +43,25 @@ | |||
| 43 | (or quail-current-str quail-current-key) | 43 | (or quail-current-str quail-current-key) |
| 44 | "")) | 44 | "")) |
| 45 | (if (integerp control-flag) | 45 | (if (integerp control-flag) |
| 46 | (if (= control-flag 0) | 46 | (let ((keylen (length quail-current-key))) |
| 47 | (setq quail-current-str (aref quail-current-key 0)) | 47 | (cond ((= control-flag 0) |
| 48 | (cond ((= (aref quail-current-key 0) ?n) | 48 | (setq quail-current-str (aref quail-current-key 0) |
| 49 | control-flag t)) | ||
| 50 | ((= (aref quail-current-key 0) ?n) | ||
| 49 | (setq quail-current-str ?$B$s(B) | 51 | (setq quail-current-str ?$B$s(B) |
| 50 | (if (and quail-japanese-use-double-n | 52 | (if (and quail-japanese-use-double-n |
| 53 | (> keylen 0) | ||
| 51 | (= (aref quail-current-key 1) ?n)) | 54 | (= (aref quail-current-key 1) ?n)) |
| 52 | (setq control-flag t))) | 55 | (setq control-flag t))) |
| 53 | ((= (aref quail-current-key 0) (aref quail-current-key 1)) | 56 | ((and (> keylen 1) |
| 57 | (= (aref quail-current-key 0) (aref quail-current-key 1))) | ||
| 54 | (setq quail-current-str ?$B$C(B)) | 58 | (setq quail-current-str ?$B$C(B)) |
| 55 | (t | 59 | (t |
| 56 | (setq quail-current-str (aref quail-current-key 0)))) | 60 | (setq quail-current-str (aref quail-current-key 0)))) |
| 57 | (if (integerp control-flag) | 61 | (if (integerp control-flag) |
| 58 | (setq unread-command-events | 62 | (setq unread-command-events |
| 59 | (list (aref quail-current-key control-flag))))))) | 63 | (string-to-list |
| 64 | (substring quail-current-key control-flag))))))) | ||
| 60 | control-flag) | 65 | control-flag) |
| 61 | 66 | ||
| 62 | ;; Convert Hiragana <-> Katakana in the current translation region. | 67 | ;; Convert Hiragana <-> Katakana in the current translation region. |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7ea8d3aa116..cd86f9d20e4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -8,6 +8,17 @@ | |||
| 8 | Fix overenthusiastic optimisation. | 8 | Fix overenthusiastic optimisation. |
| 9 | (pcase-u1): Handle the case of a lambda pred. | 9 | (pcase-u1): Handle the case of a lambda pred. |
| 10 | 10 | ||
| 11 | 2010-08-31 Kenichi Handa <handa@m17n.org> | ||
| 12 | |||
| 13 | * international/mule-cmds.el (standard-display-european-internal): | ||
| 14 | Setup standard-display-table for 8-bit characters by storing 8-bit | ||
| 15 | characters in the element vector. | ||
| 16 | |||
| 17 | * disp-table.el (standard-display-8bit): Setup | ||
| 18 | standard-display-table for 8-bit characters by storing 8-bit | ||
| 19 | characters in the element vector. | ||
| 20 | (standard-display-european): Likewise. | ||
| 21 | |||
| 11 | 2010-08-31 Masatake YAMATO <yamato@redhat.com> | 22 | 2010-08-31 Masatake YAMATO <yamato@redhat.com> |
| 12 | 23 | ||
| 13 | * textmodes/nroff-mode.el (nroff-view): New command. | 24 | * textmodes/nroff-mode.el (nroff-view): New command. |
| @@ -167,6 +178,57 @@ | |||
| 167 | 178 | ||
| 168 | * whitespace.el (whitespace-style): Adjust type declaration. | 179 | * whitespace.el (whitespace-style): Adjust type declaration. |
| 169 | 180 | ||
| 181 | 2010-08-26 Magnus Henoch <magnus.henoch@gmail.com> | ||
| 182 | |||
| 183 | * net/tramp-gvfs.el (tramp-gvfs-handle-copy-file): Do not pass | ||
| 184 | empty argument to gvfs-copy. | ||
| 185 | |||
| 186 | 2010-08-26 Chong Yidong <cyd@stupidchicken.com> | ||
| 187 | |||
| 188 | * net/tramp-compat.el (tramp-compat-delete-file): Rewrite to | ||
| 189 | handle new TRASH arg of `delete-file'. | ||
| 190 | |||
| 191 | 2010-08-26 Christian Lynbech <christian.lynbech@tieto.com> (tiny change) | ||
| 192 | |||
| 193 | * net/tramp.el (tramp-handle-insert-directory): Don't use | ||
| 194 | `forward-word', its default syntax could be changed. | ||
| 195 | |||
| 196 | 2010-08-26 Toru TSUNEYOSHI <t_tuneyosi@hotmail.com> | ||
| 197 | Michael Albinus <michael.albinus@gmx.de> | ||
| 198 | |||
| 199 | Implement compression for inline methods. | ||
| 200 | |||
| 201 | * net/tramp.el (tramp-inline-compress-start-size): New defcustom. | ||
| 202 | (tramp-copy-size-limit): Allow also nil. | ||
| 203 | (tramp-inline-compress-commands): New defconst. | ||
| 204 | (tramp-find-inline-compress, tramp-get-inline-compress) | ||
| 205 | (tramp-get-inline-coding): New defuns. | ||
| 206 | (tramp-get-remote-coding, tramp-get-local-coding): Remove, | ||
| 207 | replaced by `tramp-get-inline-coding'. | ||
| 208 | (tramp-handle-file-local-copy, tramp-handle-write-region) | ||
| 209 | (tramp-method-out-of-band-p): Use `tramp-get-inline-coding'. | ||
| 210 | |||
| 211 | 2010-08-26 Noah Lavine <noah549@gmail.com> (tiny change) | ||
| 212 | |||
| 213 | Detect ssh 'ControlMaster' argument automatically in some cases. | ||
| 214 | |||
| 215 | * net/tramp.el (tramp-detect-ssh-controlmaster): New defun. | ||
| 216 | (tramp-default-method): Use it. | ||
| 217 | |||
| 218 | 2010-08-26 Karel Klíč <kklic@redhat.com> | ||
| 219 | |||
| 220 | * net/tramp.el (tramp-file-name-for-operation): | ||
| 221 | Add file-selinux-context. | ||
| 222 | |||
| 223 | 2010-08-26 Łukasz Stelmach <lukasz.stelmach@iem.pw.edu.pl> (tiny change) | ||
| 224 | |||
| 225 | * play/cookie1.el (read-cookie): Fix off-by-one error (bug#6921). | ||
| 226 | |||
| 227 | 2010-08-26 Chong Yidong <cyd@stupidchicken.com> | ||
| 228 | |||
| 229 | * simple.el (beginning-of-buffer, end-of-buffer): Doc fix | ||
| 230 | (Bug#6907). | ||
| 231 | |||
| 170 | 2010-08-26 Nathan Weizenbaum <nweiz@cressida.sea.corp.google.com> (tiny change) | 232 | 2010-08-26 Nathan Weizenbaum <nweiz@cressida.sea.corp.google.com> (tiny change) |
| 171 | 233 | ||
| 172 | * progmodes/js.el: Make indentation more customizable (Bug#6914). | 234 | * progmodes/js.el: Make indentation more customizable (Bug#6914). |
| @@ -190,6 +252,211 @@ | |||
| 190 | 252 | ||
| 191 | Sync with Tramp 2.1.19. | 253 | Sync with Tramp 2.1.19. |
| 192 | 254 | ||
| 255 | * net/tramp-cmds.el (tramp-cleanup-all-connections) | ||
| 256 | (tramp-reporter-dump-variable, tramp-load-report-modules) | ||
| 257 | (tramp-append-tramp-buffers): Use `tramp-compat-funcall'. | ||
| 258 | (tramp-bug): Recommend setting of `tramp-verbose' to 9. | ||
| 259 | |||
| 260 | * net/tramp-compat.el (top): Do not autoload | ||
| 261 | `tramp-handle-file-remote-p'. Load tramp-util.el and tramp-vc.el | ||
| 262 | only when `start-file-process' is not bound. | ||
| 263 | (byte-compile-not-obsolete-vars): Define if not bound. | ||
| 264 | (tramp-compat-funcall): New defmacro. | ||
| 265 | (tramp-compat-line-beginning-position) | ||
| 266 | (tramp-compat-line-end-position) | ||
| 267 | (tramp-compat-temporary-file-directory) | ||
| 268 | (tramp-compat-make-temp-file, tramp-compat-file-attributes) | ||
| 269 | (tramp-compat-copy-file, tramp-compat-copy-directory) | ||
| 270 | (tramp-compat-delete-file, tramp-compat-delete-directory) | ||
| 271 | (tramp-compat-number-sequence, tramp-compat-process-running-p): | ||
| 272 | Use it. | ||
| 273 | (tramp-advice-file-expand-wildcards): Do not use | ||
| 274 | `tramp-handle-file-remote-p'. | ||
| 275 | (tramp-compat-make-temp-file): Simplify fallback implementation. | ||
| 276 | (tramp-compat-copy-file): Add PRESERVE-SELINUX-CONTEXT. | ||
| 277 | (tramp-compat-copy-tree): Remove function. | ||
| 278 | (tramp-compat-delete-file): New defun. | ||
| 279 | (tramp-compat-delete-directory): Provide implementation for older | ||
| 280 | Emacsen. | ||
| 281 | (tramp-compat-file-attributes): Handle only | ||
| 282 | `wrong-number-of-arguments' error. | ||
| 283 | |||
| 284 | * net/tramp-fish.el (tramp-fish-handle-copy-file): Add | ||
| 285 | PRESERVE_SELINUX_CONTEXT. | ||
| 286 | (tramp-fish-handle-delete-file): Add TRASH arg. | ||
| 287 | (tramp-fish-handle-directory-files-and-attributes): | ||
| 288 | Do not use `tramp-fish-handle-file-attributes. | ||
| 289 | (tramp-fish-handle-file-local-copy) | ||
| 290 | (tramp-fish-handle-insert-file-contents) | ||
| 291 | (tramp-fish-maybe-open-connection): Use `with-progress-reporter'. | ||
| 292 | |||
| 293 | * net/tramp-gvfs.el (top): Require url-util. | ||
| 294 | (tramp-gvfs-mount-point): Remove. | ||
| 295 | (tramp-gvfs-file-name-handler-alist): Add `file-selinux-context' | ||
| 296 | and `set-file-selinux-context'. | ||
| 297 | (tramp-gvfs-stringify-dbus-message, tramp-gvfs-send-command) | ||
| 298 | (tramp-gvfs-handle-file-selinux-context) | ||
| 299 | (tramp-gvfs-handle-set-file-selinux-context): New defuns. | ||
| 300 | (with-tramp-dbus-call-method): Format trace message. | ||
| 301 | (tramp-gvfs-handle-copy-file): Handle PRESERVE-SELINUX-CONTEXT. | ||
| 302 | (tramp-gvfs-handle-copy-file, tramp-gvfs-handle-rename-file): | ||
| 303 | Implement backup call, when operation on local files fails. Use | ||
| 304 | progress reporter. Flush properties of changed files. | ||
| 305 | (tramp-gvfs-handle-delete-file): Add TRASH arg. Use | ||
| 306 | `tramp-compat-delete-file'. | ||
| 307 | (tramp-gvfs-handle-expand-file-name): Expand "~/". | ||
| 308 | (tramp-gvfs-handle-make-directory): Make more traces. | ||
| 309 | (tramp-gvfs-handle-write-region): Protect deleting tmpfile. | ||
| 310 | (tramp-gvfs-url-file-name): Hexify file name in url. | ||
| 311 | (tramp-gvfs-fuse-file-name): Take also prefix (like dav shares) | ||
| 312 | into account for the resulting file name. | ||
| 313 | (tramp-gvfs-handler-askquestion): Preserve current message, in | ||
| 314 | order to let progress reporter continue afterwards. (Bug#6257) | ||
| 315 | Return dummy mountpoint, when the answer is "no". See | ||
| 316 | `tramp-gvfs-maybe-open-connection'. | ||
| 317 | (tramp-gvfs-handler-mounted-unmounted) | ||
| 318 | (tramp-gvfs-connection-mounted-p): Test also for new mountspec | ||
| 319 | attribute "default_location". Set "prefix" property. Handle | ||
| 320 | default-location. | ||
| 321 | (tramp-gvfs-mount-spec): Return both prefix and mountspec. | ||
| 322 | (tramp-gvfs-maybe-open-connection): Test, whether mountpoint | ||
| 323 | exists. Raise an error, if not (due to a corresponding answer | ||
| 324 | "no" in interactive questions, for example). Use | ||
| 325 | `tramp-compat-funcall'. | ||
| 326 | |||
| 327 | * net/tramp-imap.el (top): Autoload `epg-make-context'. | ||
| 328 | (tramp-imap-handle-copy-file): Add PRESERVE-SELINUX-CONTEXT. | ||
| 329 | (tramp-imap-do-copy-or-rename-file) | ||
| 330 | (tramp-imap-handle-insert-file-contents) | ||
| 331 | (tramp-imap-handle-file-local-copy): Use `with-progress-reporter'. | ||
| 332 | (tramp-imap-handle-delete-file): Add TRASH arg. | ||
| 333 | |||
| 334 | * net/tramp-smb.el (tramp-smb-handle-copy-file): Add | ||
| 335 | PRESERVE-SELINUX-CONTEXT. | ||
| 336 | (tramp-smb-handle-copy-file) | ||
| 337 | (tramp-smb-handle-file-local-copy, tramp-smb-handle-rename-file) | ||
| 338 | (tramp-smb-handle-write-region, tramp-smb-maybe-open-connection): | ||
| 339 | Use `with-progress-reporter'. | ||
| 340 | (tramp-smb-handle-delete-file): Add TRASH arg. | ||
| 341 | |||
| 342 | * net/tramp.el (tramp-methods): Move hostname to the end in all | ||
| 343 | ssh `tramp-login-args'. Add `tramp-async-args' attribute where | ||
| 344 | appropriate. | ||
| 345 | (tramp-verbose): Describe verbose level 9. | ||
| 346 | (tramp-completion-function-alist) | ||
| 347 | (tramp-file-name-regexp, tramp-chunksize) | ||
| 348 | (tramp-local-coding-commands, tramp-remote-coding-commands) | ||
| 349 | (with-connection-property, tramp-completion-mode-p) | ||
| 350 | (tramp-action-process-alive, tramp-action-out-of-band) | ||
| 351 | (tramp-check-for-regexp, tramp-file-name-p, tramp-equal-remote) | ||
| 352 | (tramp-exists-file-name-handler): Fix docstring. | ||
| 353 | (tramp-remote-process-environment): Use `format' instead of | ||
| 354 | `concat'. Protect version string by apostroph. | ||
| 355 | (tramp-shell-prompt-pattern): Do not use a shy group in case of | ||
| 356 | XEmacs. | ||
| 357 | (tramp-file-name-regexp-unified) | ||
| 358 | (tramp-completion-file-name-regexp-unified): On W32 systems, do | ||
| 359 | not regard the volume letter as remote filename. (Bug#5447) | ||
| 360 | (tramp-perl-file-attributes) | ||
| 361 | (tramp-perl-directory-files-and-attributes): Don't pass "$3". | ||
| 362 | (tramp-vc-registered-read-file-names): Read input as | ||
| 363 | here-document, otherwise the command could exceed maximum length | ||
| 364 | of command line. | ||
| 365 | (tramp-file-name-handler-alist): Add `file-selinux-context' and | ||
| 366 | `set-file-selinux-context'. | ||
| 367 | (tramp-debug-message): Add `tramp-compat-funcall' to ignored | ||
| 368 | backtrace functions. | ||
| 369 | (tramp-error-with-buffer): Don't show the connection buffer when | ||
| 370 | we are in completion mode. | ||
| 371 | (tramp-progress-reporter-update, tramp-remote-selinux-p) | ||
| 372 | (tramp-handle-file-selinux-context) | ||
| 373 | (tramp-handle-set-file-selinux-context, tramp-process-sentinel) | ||
| 374 | (tramp-connectable-p, tramp-open-shell, tramp-get-remote-trash): | ||
| 375 | New defuns. | ||
| 376 | (with-progress-reporter): New defmacro. | ||
| 377 | (tramp-debug-outline-regexp): New defconst. | ||
| 378 | (top, tramp-rfn-eshadow-setup-minibuffer) | ||
| 379 | (tramp-rfn-eshadow-update-overlay, tramp-handle-set-file-times) | ||
| 380 | (tramp-handle-dired-compress-file, tramp-handle-shell-command) | ||
| 381 | (tramp-completion-mode-p, tramp-check-for-regexp) | ||
| 382 | (tramp-open-connection-setup-interactive-shell) | ||
| 383 | (tramp-compute-multi-hops, tramp-read-passwd, tramp-clear-passwd) | ||
| 384 | (tramp-time-diff, tramp-coding-system-change-eol-conversion) | ||
| 385 | (tramp-set-process-query-on-exit-flag, tramp-unload-tramp): | ||
| 386 | Use `tramp-compat-funcall'. | ||
| 387 | (tramp-handle-make-symbolic-link): Flush file properties. | ||
| 388 | (tramp-handle-load, tramp-handle-file-local-copy) | ||
| 389 | (tramp-handle-insert-file-contents, tramp-handle-write-region) | ||
| 390 | (tramp-handle-vc-registered, tramp-maybe-send-script) | ||
| 391 | (tramp-find-shell): Use `with-progress-reporter'. | ||
| 392 | (tramp-do-file-attributes-with-stat): Add space in format string, | ||
| 393 | in order to work around a bug in pdksh. Reported by Gilles Pion | ||
| 394 | <gpion@lfdj.com>. | ||
| 395 | (tramp-handle-verify-visited-file-modtime): Do not send a command | ||
| 396 | when the connection is not established. | ||
| 397 | (tramp-handle-set-file-times): Simplify the check for utc. | ||
| 398 | (tramp-handle-directory-files-and-attributes) | ||
| 399 | (tramp-get-remote-path): Use `copy-tree'. | ||
| 400 | (tramp-completion-handle-file-name-all-completions): Ensure, that | ||
| 401 | non remote files are still checked. Oops. | ||
| 402 | (tramp-handle-copy-file, tramp-do-copy-or-rename-file): Handle | ||
| 403 | PRESERVE-SELINUX-CONTEXT. | ||
| 404 | (tramp-do-copy-or-rename-file): Add progress reporter. | ||
| 405 | (tramp-do-copy-or-rename-file-directly): Do not use | ||
| 406 | `tramp-handle-file-remote-p'. | ||
| 407 | (tramp-do-copy-or-rename-file-out-of-band): | ||
| 408 | Use `tramp-compat-delete-directory'. | ||
| 409 | (tramp-do-copy-or-rename-file-out-of-band) | ||
| 410 | (tramp-compute-multi-hops, tramp-maybe-open-connection): | ||
| 411 | Use `format-spec-make'. | ||
| 412 | (tramp-handle-delete-file): Add TRASH arg. | ||
| 413 | (tramp-handle-dired-uncache): Flush directory cache, not only file | ||
| 414 | cache. | ||
| 415 | (tramp-handle-expand-file-name) | ||
| 416 | (tramp-completion-handle-file-name-all-completions) | ||
| 417 | (tramp-completion-handle-file-name-completion): Use | ||
| 418 | `tramp-connectable-p'. | ||
| 419 | (tramp-handle-start-file-process): Set connection property "vec". | ||
| 420 | Use it, in order to invalidate file caches. Check only for | ||
| 421 | `remote-tty' process property. | ||
| 422 | Implement tty setting. (Bug#4604, Bug#6360) | ||
| 423 | (tramp-file-name-for-operation): Add `call-process-region' and | ||
| 424 | `set-file-selinux-context'. | ||
| 425 | (tramp-find-foreign-file-name-handler) | ||
| 426 | (tramp-advice-make-auto-save-file-name) | ||
| 427 | (tramp-set-auto-save-file-modes): Remove superfluous check for | ||
| 428 | `stringp'. This is done inside `tramp-tramp-file-p'. | ||
| 429 | (tramp-file-name-handler): Trace 'quit. Catch the error for some | ||
| 430 | operations when we are in completion mode. This gives the user | ||
| 431 | the chance to correct the file name in the minibuffer. | ||
| 432 | (tramp-completion-mode-p): Use `non-essential'. | ||
| 433 | (tramp-handle-file-name-all-completions): Backward/ XEmacs | ||
| 434 | compatibility: Use `completion-ignore-case' if | ||
| 435 | `read-file-name-completion-ignore-case' does not exist. | ||
| 436 | (tramp-get-debug-buffer): Use `tramp-debug-outline-regexp'. | ||
| 437 | (tramp-find-shell, tramp-open-connection-setup-interactive-shell): | ||
| 438 | `tramp-open-shell'. | ||
| 439 | (tramp-action-password): Hide password prompt before next run. | ||
| 440 | (tramp-process-actions): Widen connection buffer for the trace. | ||
| 441 | (tramp-open-connection-setup-interactive-shell): Set `remote-tty' | ||
| 442 | process property. Trace stty settings if `tramp-verbose' >= 9. | ||
| 443 | Apply workaround for IRIX64 bug. Move argument of last | ||
| 444 | `tramp-send-command' where it belongs to. | ||
| 445 | (tramp-maybe-open-connection): Use `async-args' and `gw-args' in | ||
| 446 | front of `login-args'. | ||
| 447 | (tramp-get-ls-command, tramp-get-ls-command-with-dired): Run tests | ||
| 448 | on "/dev/null" instead of "/". | ||
| 449 | (tramp-get-ls-command-with-dired): Make test for "--dired" | ||
| 450 | stronger. | ||
| 451 | (tramp-set-auto-save-file-modes): Adapt version check. | ||
| 452 | (tramp-set-process-query-on-exit-flag): Fix wrong parentheses. | ||
| 453 | (tramp-handle-process-file): Call the program in a subshell, in | ||
| 454 | order to preserve working directory. | ||
| 455 | (tramp-handle-shell-command): Don't use hard-wired "/bin/sh" but | ||
| 456 | `tramp-remote-sh' from `tramp-methods'. | ||
| 457 | (tramp-get-ls-command): Make test for "--color=never" stronger. | ||
| 458 | (tramp-check-for-regexp): Use (forward-line 1). | ||
| 459 | |||
| 193 | * net/trampver.el: Update release number. | 460 | * net/trampver.el: Update release number. |
| 194 | 461 | ||
| 195 | 2010-08-26 Chong Yidong <cyd@stupidchicken.com> | 462 | 2010-08-26 Chong Yidong <cyd@stupidchicken.com> |
| @@ -275,6 +542,11 @@ | |||
| 275 | * mouse.el (mouse-yank-primary): Avoid setting primary when | 542 | * mouse.el (mouse-yank-primary): Avoid setting primary when |
| 276 | deactivating the mark (Bug#6872). | 543 | deactivating the mark (Bug#6872). |
| 277 | 544 | ||
| 545 | 2010-08-23 Chris Foote <chris@foote.com.au> (tiny change) | ||
| 546 | |||
| 547 | * progmodes/python.el (python-block-pairs): Allow use of "finally" | ||
| 548 | with "else" (Bug#3991). | ||
| 549 | |||
| 278 | 2010-08-23 Michael Albinus <michael.albinus@gmx.de> | 550 | 2010-08-23 Michael Albinus <michael.albinus@gmx.de> |
| 279 | 551 | ||
| 280 | * net/dbus.el: Accept UNIX domain sockets as bus address. | 552 | * net/dbus.el: Accept UNIX domain sockets as bus address. |
| @@ -301,13 +573,19 @@ | |||
| 301 | * startup.el (command-line-1): Issue warning for ignored arguments | 573 | * startup.el (command-line-1): Issue warning for ignored arguments |
| 302 | --unibyte, etc (Bug#6886). | 574 | --unibyte, etc (Bug#6886). |
| 303 | 575 | ||
| 576 | 2010-08-22 Leo <sdl.web@gmail.com> | ||
| 577 | |||
| 578 | * net/rcirc.el (rcirc-add-or-remove): Accept a list of elements. | ||
| 579 | (ignore, bright, dim, keyword): Split list of nicknames before | ||
| 580 | passing to rcirc-add-or-remove (Bug#6894). | ||
| 581 | |||
| 304 | 2010-08-22 Chong Yidong <cyd@stupidchicken.com> | 582 | 2010-08-22 Chong Yidong <cyd@stupidchicken.com> |
| 305 | 583 | ||
| 306 | * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix (Bug#6880). | 584 | * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix (Bug#6880). |
| 307 | 585 | ||
| 308 | 2010-08-22 Leo <sdl.web@gmail.com> | 586 | 2010-08-22 Leo <sdl.web@gmail.com> |
| 309 | 587 | ||
| 310 | Fix buffer-list rename&refresh after after killing a buffer in ido. | 588 | Fix buffer-list rename&refresh after killing a buffer in ido. |
| 311 | * lisp/ido.el: Revert Óscar's. | 589 | * lisp/ido.el: Revert Óscar's. |
| 312 | (ido-kill-buffer-at-head): Exit the minibuffer with ido-exit=refresh. | 590 | (ido-kill-buffer-at-head): Exit the minibuffer with ido-exit=refresh. |
| 313 | Remember the buffers at head, rather than their name. | 591 | Remember the buffers at head, rather than their name. |
diff --git a/lisp/disp-table.el b/lisp/disp-table.el index e0d2d790f6c..e9bdd3d9be3 100644 --- a/lisp/disp-table.el +++ b/lisp/disp-table.el | |||
| @@ -110,11 +110,27 @@ Valid symbols are `truncation', `wrap', `escape', `control', | |||
| 110 | 110 | ||
| 111 | ;;;###autoload | 111 | ;;;###autoload |
| 112 | (defun standard-display-8bit (l h) | 112 | (defun standard-display-8bit (l h) |
| 113 | "Display characters in the range L to H literally." | 113 | "Display characters representing raw bytes in the range L to H literally. |
| 114 | |||
| 115 | On a terminal display, each character in the range is displayed | ||
| 116 | by sending the corresponding byte directly to the terminal. | ||
| 117 | |||
| 118 | On a graphic display, each character in the range is displayed | ||
| 119 | using the default font by a glyph whose code is the corresponding | ||
| 120 | byte. | ||
| 121 | |||
| 122 | Note that ASCII printable characters (SPC to TILDA) are displayed | ||
| 123 | in the default way after this call." | ||
| 114 | (or standard-display-table | 124 | (or standard-display-table |
| 115 | (setq standard-display-table (make-display-table))) | 125 | (setq standard-display-table (make-display-table))) |
| 126 | (if (> h 255) | ||
| 127 | (setq h 255)) | ||
| 116 | (while (<= l h) | 128 | (while (<= l h) |
| 117 | (aset standard-display-table l (if (or (< l ?\s) (>= l 127)) (vector l))) | 129 | (if (< l 128) |
| 130 | (aset standard-display-table l | ||
| 131 | (if (or (< l ?\s) (= l 127)) (vector l))) | ||
| 132 | (let ((c (unibyte-char-to-multibyte l))) | ||
| 133 | (aset standard-display-table c (vector c)))) | ||
| 118 | (setq l (1+ l)))) | 134 | (setq l (1+ l)))) |
| 119 | 135 | ||
| 120 | ;;;###autoload | 136 | ;;;###autoload |
| @@ -236,9 +252,12 @@ in `.emacs'." | |||
| 236 | (and (null arg) | 252 | (and (null arg) |
| 237 | (char-table-p standard-display-table) | 253 | (char-table-p standard-display-table) |
| 238 | ;; Test 161, because 160 displays as a space. | 254 | ;; Test 161, because 160 displays as a space. |
| 239 | (equal (aref standard-display-table 161) [161]))) | 255 | (equal (aref standard-display-table |
| 256 | (unibyte-char-to-multibyte 161)) | ||
| 257 | (vector (unibyte-char-to-multibyte 161))))) | ||
| 240 | (progn | 258 | (progn |
| 241 | (standard-display-default 160 255) | 259 | (standard-display-default |
| 260 | (unibyte-char-to-multibyte 160) (unibyte-char-to-multibyte 255)) | ||
| 242 | (unless (or (memq window-system '(x w32 ns))) | 261 | (unless (or (memq window-system '(x w32 ns))) |
| 243 | (and (terminal-coding-system) | 262 | (and (terminal-coding-system) |
| 244 | (set-terminal-coding-system nil)))) | 263 | (set-terminal-coding-system nil)))) |
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 91b4e42807d..a3609c0ccfc 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el | |||
| @@ -1952,7 +1952,7 @@ See `set-language-info-alist' for use in programs." | |||
| 1952 | (> (aref (number-to-string (nth 2 (x-server-version))) 0) | 1952 | (> (aref (number-to-string (nth 2 (x-server-version))) 0) |
| 1953 | ?3)) | 1953 | ?3)) |
| 1954 | ;; Make non-line-break space display as a plain space. | 1954 | ;; Make non-line-break space display as a plain space. |
| 1955 | (aset standard-display-table 160 [32])) | 1955 | (aset standard-display-table (unibyte-char-to-multibyte 160) [32])) |
| 1956 | ;; Most Windows programs send out apostrophes as \222. Most X fonts | 1956 | ;; Most Windows programs send out apostrophes as \222. Most X fonts |
| 1957 | ;; don't contain a character at that position. Map it to the ASCII | 1957 | ;; don't contain a character at that position. Map it to the ASCII |
| 1958 | ;; apostrophe. [This is actually RIGHT SINGLE QUOTATION MARK, | 1958 | ;; apostrophe. [This is actually RIGHT SINGLE QUOTATION MARK, |
| @@ -1960,7 +1960,7 @@ See `set-language-info-alist' for use in programs." | |||
| 1960 | ;; fonts probably have the appropriate glyph at this position, | 1960 | ;; fonts probably have the appropriate glyph at this position, |
| 1961 | ;; so they could use standard-display-8bit. It's better to use a | 1961 | ;; so they could use standard-display-8bit. It's better to use a |
| 1962 | ;; proper windows-1252 coding system. --fx] | 1962 | ;; proper windows-1252 coding system. --fx] |
| 1963 | (aset standard-display-table 146 [39])))) | 1963 | (aset standard-display-table (unibyte-char-to-multibyte 146) [39])))) |
| 1964 | 1964 | ||
| 1965 | (defun set-language-environment-coding-systems (language-name) | 1965 | (defun set-language-environment-coding-systems (language-name) |
| 1966 | "Do various coding system setups for language environment LANGUAGE-NAME." | 1966 | "Do various coding system setups for language environment LANGUAGE-NAME." |
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index b4a7b3118d2..9af6057c20c 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el | |||
| @@ -1085,7 +1085,7 @@ Create the buffer if it doesn't exist." | |||
| 1085 | (goto-char (point-max)) | 1085 | (goto-char (point-max)) |
| 1086 | (when (not (equal 0 (- (point) rcirc-prompt-end-marker))) | 1086 | (when (not (equal 0 (- (point) rcirc-prompt-end-marker))) |
| 1087 | ;; delete a trailing newline | 1087 | ;; delete a trailing newline |
| 1088 | (when (bolp) | 1088 | (when (eq (point) (point-at-bol)) |
| 1089 | (delete-char -1)) | 1089 | (delete-char -1)) |
| 1090 | (let ((input (buffer-substring-no-properties | 1090 | (let ((input (buffer-substring-no-properties |
| 1091 | rcirc-prompt-end-marker (point)))) | 1091 | rcirc-prompt-end-marker (point)))) |
| @@ -2151,12 +2151,13 @@ With a prefix arg, prompt for new topic." | |||
| 2151 | (rcirc-send-string process (format "PRIVMSG %s :\C-aACTION %s\C-a" | 2151 | (rcirc-send-string process (format "PRIVMSG %s :\C-aACTION %s\C-a" |
| 2152 | target args))) | 2152 | target args))) |
| 2153 | 2153 | ||
| 2154 | (defun rcirc-add-or-remove (set &optional elt) | 2154 | (defun rcirc-add-or-remove (set &rest elements) |
| 2155 | (if (and elt (not (string= "" elt))) | 2155 | (dolist (elt elements) |
| 2156 | (if (member-ignore-case elt set) | 2156 | (if (and elt (not (string= "" elt))) |
| 2157 | (delete elt set) | 2157 | (setq set (if (member-ignore-case elt set) |
| 2158 | (cons elt set)) | 2158 | (delete elt set) |
| 2159 | set)) | 2159 | (cons elt set))))) |
| 2160 | set) | ||
| 2160 | 2161 | ||
| 2161 | (defun-rcirc-command ignore (nick) | 2162 | (defun-rcirc-command ignore (nick) |
| 2162 | "Manage the ignore list. | 2163 | "Manage the ignore list. |
| @@ -2164,7 +2165,9 @@ Ignore NICK, unignore NICK if already ignored, or list ignored | |||
| 2164 | nicks when no NICK is given. When listing ignored nicks, the | 2165 | nicks when no NICK is given. When listing ignored nicks, the |
| 2165 | ones added to the list automatically are marked with an asterisk." | 2166 | ones added to the list automatically are marked with an asterisk." |
| 2166 | (interactive "sToggle ignoring of nick: ") | 2167 | (interactive "sToggle ignoring of nick: ") |
| 2167 | (setq rcirc-ignore-list (rcirc-add-or-remove rcirc-ignore-list nick)) | 2168 | (setq rcirc-ignore-list |
| 2169 | (apply #'rcirc-add-or-remove rcirc-ignore-list | ||
| 2170 | (split-string nick nil t))) | ||
| 2168 | (rcirc-print process nil "IGNORE" target | 2171 | (rcirc-print process nil "IGNORE" target |
| 2169 | (mapconcat | 2172 | (mapconcat |
| 2170 | (lambda (nick) | 2173 | (lambda (nick) |
| @@ -2176,14 +2179,18 @@ ones added to the list automatically are marked with an asterisk." | |||
| 2176 | (defun-rcirc-command bright (nick) | 2179 | (defun-rcirc-command bright (nick) |
| 2177 | "Manage the bright nick list." | 2180 | "Manage the bright nick list." |
| 2178 | (interactive "sToggle emphasis of nick: ") | 2181 | (interactive "sToggle emphasis of nick: ") |
| 2179 | (setq rcirc-bright-nicks (rcirc-add-or-remove rcirc-bright-nicks nick)) | 2182 | (setq rcirc-bright-nicks |
| 2183 | (apply #'rcirc-add-or-remove rcirc-bright-nicks | ||
| 2184 | (split-string nick nil t))) | ||
| 2180 | (rcirc-print process nil "BRIGHT" target | 2185 | (rcirc-print process nil "BRIGHT" target |
| 2181 | (mapconcat 'identity rcirc-bright-nicks " "))) | 2186 | (mapconcat 'identity rcirc-bright-nicks " "))) |
| 2182 | 2187 | ||
| 2183 | (defun-rcirc-command dim (nick) | 2188 | (defun-rcirc-command dim (nick) |
| 2184 | "Manage the dim nick list." | 2189 | "Manage the dim nick list." |
| 2185 | (interactive "sToggle deemphasis of nick: ") | 2190 | (interactive "sToggle deemphasis of nick: ") |
| 2186 | (setq rcirc-dim-nicks (rcirc-add-or-remove rcirc-dim-nicks nick)) | 2191 | (setq rcirc-dim-nicks |
| 2192 | (apply #'rcirc-add-or-remove rcirc-dim-nicks | ||
| 2193 | (split-string nick nil t))) | ||
| 2187 | (rcirc-print process nil "DIM" target | 2194 | (rcirc-print process nil "DIM" target |
| 2188 | (mapconcat 'identity rcirc-dim-nicks " "))) | 2195 | (mapconcat 'identity rcirc-dim-nicks " "))) |
| 2189 | 2196 | ||
| @@ -2192,7 +2199,9 @@ ones added to the list automatically are marked with an asterisk." | |||
| 2192 | Mark KEYWORD, unmark KEYWORD if already marked, or list marked | 2199 | Mark KEYWORD, unmark KEYWORD if already marked, or list marked |
| 2193 | keywords when no KEYWORD is given." | 2200 | keywords when no KEYWORD is given." |
| 2194 | (interactive "sToggle highlighting of keyword: ") | 2201 | (interactive "sToggle highlighting of keyword: ") |
| 2195 | (setq rcirc-keywords (rcirc-add-or-remove rcirc-keywords keyword)) | 2202 | (setq rcirc-keywords |
| 2203 | (apply #'rcirc-add-or-remove rcirc-keywords | ||
| 2204 | (split-string keyword nil t))) | ||
| 2196 | (rcirc-print process nil "KEYWORD" target | 2205 | (rcirc-print process nil "KEYWORD" target |
| 2197 | (mapconcat 'identity rcirc-keywords " "))) | 2206 | (mapconcat 'identity rcirc-keywords " "))) |
| 2198 | 2207 | ||
diff --git a/lisp/play/cookie1.el b/lisp/play/cookie1.el index 75c0d9b2b06..e786c6cc5c1 100644 --- a/lisp/play/cookie1.el +++ b/lisp/play/cookie1.el | |||
| @@ -138,7 +138,7 @@ Optional fifth arg REQUIRE-MATCH non-nil forces a matching cookie." | |||
| 138 | (vec (cookie-snarf phrase-file | 138 | (vec (cookie-snarf phrase-file |
| 139 | startmsg endmsg)) | 139 | startmsg endmsg)) |
| 140 | (i (length vec))) | 140 | (i (length vec))) |
| 141 | (while (> (setq i (1- i)) 0) | 141 | (while (>= (setq i (1- i)) 0) |
| 142 | (setq alist (cons (list (aref vec i)) alist))) | 142 | (setq alist (cons (list (aref vec i)) alist))) |
| 143 | (put sym 'completion-alist alist)))) | 143 | (put sym 'completion-alist alist)))) |
| 144 | nil require-match nil nil)) | 144 | nil require-match nil nil)) |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 2690d399411..2f65ffa1e17 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -782,7 +782,7 @@ Set `python-indent' locally to the value guessed." | |||
| 782 | '(("else" "if" "elif" "while" "for" "try" "except") | 782 | '(("else" "if" "elif" "while" "for" "try" "except") |
| 783 | ("elif" "if" "elif") | 783 | ("elif" "if" "elif") |
| 784 | ("except" "try" "except") | 784 | ("except" "try" "except") |
| 785 | ("finally" "try" "except")) | 785 | ("finally" "else" "try" "except")) |
| 786 | "Alist of keyword matches. | 786 | "Alist of keyword matches. |
| 787 | The car of an element is a keyword introducing a statement which | 787 | The car of an element is a keyword introducing a statement which |
| 788 | can close a block opened by a keyword in the cdr.") | 788 | can close a block opened by a keyword in the cdr.") |
diff --git a/lisp/simple.el b/lisp/simple.el index 610698cc09b..3cdac1e19f0 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -804,15 +804,16 @@ If BACKWARD-ONLY is non-nil, only delete them before point." | |||
| 804 | (constrain-to-field nil orig-pos t))))) | 804 | (constrain-to-field nil orig-pos t))))) |
| 805 | 805 | ||
| 806 | (defun beginning-of-buffer (&optional arg) | 806 | (defun beginning-of-buffer (&optional arg) |
| 807 | "Move point to the beginning of the buffer; leave mark at previous position. | 807 | "Move point to the beginning of the buffer. |
| 808 | With \\[universal-argument] prefix, do not set mark at previous position. | ||
| 809 | With numeric arg N, put point N/10 of the way from the beginning. | 808 | With numeric arg N, put point N/10 of the way from the beginning. |
| 809 | If the buffer is narrowed, this command uses the beginning of the | ||
| 810 | accessible part of the buffer. | ||
| 810 | 811 | ||
| 811 | If the buffer is narrowed, this command uses the beginning and size | 812 | If Transient Mark mode is disabled, leave mark at previous |
| 812 | of the accessible part of the buffer. | 813 | position, unless a \\[universal-argument] prefix is supplied. |
| 813 | 814 | ||
| 814 | Don't use this command in Lisp programs! | 815 | Don't use this command in Lisp programs! |
| 815 | \(goto-char (point-min)) is faster and avoids clobbering the mark." | 816 | \(goto-char (point-min)) is faster." |
| 816 | (interactive "^P") | 817 | (interactive "^P") |
| 817 | (or (consp arg) | 818 | (or (consp arg) |
| 818 | (region-active-p) | 819 | (region-active-p) |
| @@ -829,15 +830,16 @@ Don't use this command in Lisp programs! | |||
| 829 | (if (and arg (not (consp arg))) (forward-line 1))) | 830 | (if (and arg (not (consp arg))) (forward-line 1))) |
| 830 | 831 | ||
| 831 | (defun end-of-buffer (&optional arg) | 832 | (defun end-of-buffer (&optional arg) |
| 832 | "Move point to the end of the buffer; leave mark at previous position. | 833 | "Move point to the end of the buffer. |
| 833 | With \\[universal-argument] prefix, do not set mark at previous position. | ||
| 834 | With numeric arg N, put point N/10 of the way from the end. | 834 | With numeric arg N, put point N/10 of the way from the end. |
| 835 | If the buffer is narrowed, this command uses the end of the | ||
| 836 | accessible part of the buffer. | ||
| 835 | 837 | ||
| 836 | If the buffer is narrowed, this command uses the beginning and size | 838 | If Transient Mark mode is disabled, leave mark at previous |
| 837 | of the accessible part of the buffer. | 839 | position, unless a \\[universal-argument] prefix is supplied. |
| 838 | 840 | ||
| 839 | Don't use this command in Lisp programs! | 841 | Don't use this command in Lisp programs! |
| 840 | \(goto-char (point-max)) is faster and avoids clobbering the mark." | 842 | \(goto-char (point-max)) is faster." |
| 841 | (interactive "^P") | 843 | (interactive "^P") |
| 842 | (or (consp arg) (region-active-p) (push-mark)) | 844 | (or (consp arg) (region-active-p) (push-mark)) |
| 843 | (let ((size (- (point-max) (point-min)))) | 845 | (let ((size (- (point-max) (point-min)))) |
diff --git a/src/ChangeLog b/src/ChangeLog index db8cc1186a5..8e656b525ef 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -6,6 +6,36 @@ | |||
| 6 | (Fself_insert_command): Adjust accordingly. | 6 | (Fself_insert_command): Adjust accordingly. |
| 7 | (syms_of_cmds): Don't declare blink-paren-function. | 7 | (syms_of_cmds): Don't declare blink-paren-function. |
| 8 | 8 | ||
| 9 | 2010-08-31 Kenichi Handa <handa@m17n.org> | ||
| 10 | |||
| 11 | * dispextern.h (FACE_FOR_CHAR): Use an ASCII face for 8-bit | ||
| 12 | characters. | ||
| 13 | |||
| 14 | * term.c (encode_terminal_code): Fix the previous change. | ||
| 15 | (produce_glyphs): Don't set it->char_to_display here. Don't | ||
| 16 | handle unibyte-display-via-language-environment here. | ||
| 17 | (produce_special_glyphs): Set temp_it.char_to_display before | ||
| 18 | calling produce_glyphs. | ||
| 19 | |||
| 20 | * xdisp.c (get_next_display_element): Set it->char_to_display | ||
| 21 | here. Convert all 8-bit bytes from unibyte buffer/string to 8-bit | ||
| 22 | characters. | ||
| 23 | (get_overlay_arrow_glyph_row): Set it.char_to_display too before | ||
| 24 | calling PRODUCE_GLYPHS. | ||
| 25 | (append_space_for_newline): Save and store it->char_to_display. | ||
| 26 | Set it->char_to_display before calling PRODUCE_GLYPHS. | ||
| 27 | (extend_face_to_end_of_line): Set it->char_to_display before | ||
| 28 | calling PRODUCE_GLYPHS. | ||
| 29 | (get_glyph_face_and_encoding): Set the glyph code an 8-bit | ||
| 30 | character to its byte value. | ||
| 31 | (get_char_glyph_code): New function. | ||
| 32 | (produce_stretch_glyph): Set it2.char_to_display too before | ||
| 33 | calling x_produce_glyphs. | ||
| 34 | (x_produce_glyphs): Simplify by using the same code for ASCII and | ||
| 35 | non-ASCII characters. Don't set it->char_to_display here. Don't | ||
| 36 | handle unibyte-display-via-language-environment here. For a | ||
| 37 | charater of no glyph, use font->space_width instead of FONT_WIDTH. | ||
| 38 | |||
| 9 | 2010-08-31 Stefan Monnier <monnier@iro.umontreal.ca> | 39 | 2010-08-31 Stefan Monnier <monnier@iro.umontreal.ca> |
| 10 | 40 | ||
| 11 | * keyboard.c (Fwindow_system): Fix compilation for USE_LISP_UNION_TYPE. | 41 | * keyboard.c (Fwindow_system): Fix compilation for USE_LISP_UNION_TYPE. |
| @@ -23,6 +53,11 @@ | |||
| 23 | * composite.c (composition_update_it): Fix computing of | 53 | * composite.c (composition_update_it): Fix computing of |
| 24 | cmp_it->width. | 54 | cmp_it->width. |
| 25 | 55 | ||
| 56 | 2010-08-29 Kenichi Handa <handa@m17n.org> | ||
| 57 | |||
| 58 | * term.c (encode_terminal_code): Encode byte chars to the | ||
| 59 | correspnding bytes. | ||
| 60 | |||
| 26 | 2010-08-29 Jan Djärv <jan.h.d@swipnet.se> | 61 | 2010-08-29 Jan Djärv <jan.h.d@swipnet.se> |
| 27 | 62 | ||
| 28 | * nsterm.m (ns_draw_window_cursor): Draw BAR_CURSOR correct for R2L. | 63 | * nsterm.m (ns_draw_window_cursor): Draw BAR_CURSOR correct for R2L. |
diff --git a/src/dispextern.h b/src/dispextern.h index c36db91ea02..5138958b6db 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -1718,7 +1718,7 @@ struct face_cache | |||
| 1718 | This macro is only meaningful for multibyte character CHAR. */ | 1718 | This macro is only meaningful for multibyte character CHAR. */ |
| 1719 | 1719 | ||
| 1720 | #define FACE_FOR_CHAR(F, FACE, CHAR, POS, OBJECT) \ | 1720 | #define FACE_FOR_CHAR(F, FACE, CHAR, POS, OBJECT) \ |
| 1721 | (ASCII_CHAR_P (CHAR) \ | 1721 | ((ASCII_CHAR_P (CHAR) || CHAR_BYTE8_P (CHAR)) \ |
| 1722 | ? (FACE)->ascii_face->id \ | 1722 | ? (FACE)->ascii_face->id \ |
| 1723 | : face_for_char ((F), (FACE), (CHAR), (POS), (OBJECT))) | 1723 | : face_for_char ((F), (FACE), (CHAR), (POS), (OBJECT))) |
| 1724 | 1724 | ||
| @@ -2275,9 +2275,11 @@ struct it | |||
| 2275 | composition. */ | 2275 | composition. */ |
| 2276 | struct composition_it cmp_it; | 2276 | struct composition_it cmp_it; |
| 2277 | 2277 | ||
| 2278 | /* The character to display, possibly translated to multibyte | 2278 | /* The character to display, possibly translated to multibyte if |
| 2279 | if unibyte_display_via_language_environment is set. This | 2279 | multibyte_p is zero or unibyte_display_via_language_environment |
| 2280 | is set after produce_glyphs has been called. */ | 2280 | is set. This is set after get_next_display_element has been |
| 2281 | called. If we are setting it->C directly before calling | ||
| 2282 | PRODUCE_GLYPHS, this should be set beforehand too. */ | ||
| 2281 | int char_to_display; | 2283 | int char_to_display; |
| 2282 | 2284 | ||
| 2283 | /* If what == IT_IMAGE, the id of the image to display. */ | 2285 | /* If what == IT_IMAGE, the id of the image to display. */ |
diff --git a/src/term.c b/src/term.c index d1279498060..f090cdd2792 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -689,7 +689,8 @@ encode_terminal_code (struct glyph *src, int src_len, struct coding_system *codi | |||
| 689 | encode_terminal_src_size); | 689 | encode_terminal_src_size); |
| 690 | buf = encode_terminal_src + nbytes; | 690 | buf = encode_terminal_src + nbytes; |
| 691 | } | 691 | } |
| 692 | if (char_charset (c, charset_list, NULL)) | 692 | if (CHAR_BYTE8_P (c) |
| 693 | || char_charset (c, charset_list, NULL)) | ||
| 693 | { | 694 | { |
| 694 | /* Store the multibyte form of C at BUF. */ | 695 | /* Store the multibyte form of C at BUF. */ |
| 695 | buf += CHAR_STRING (c, buf); | 696 | buf += CHAR_STRING (c, buf); |
| @@ -1614,18 +1615,15 @@ produce_glyphs (struct it *it) | |||
| 1614 | goto done; | 1615 | goto done; |
| 1615 | } | 1616 | } |
| 1616 | 1617 | ||
| 1617 | /* Maybe translate single-byte characters to multibyte. */ | 1618 | if (it->char_to_display >= 040 && it->char_to_display < 0177) |
| 1618 | it->char_to_display = it->c; | ||
| 1619 | |||
| 1620 | if (it->c >= 040 && it->c < 0177) | ||
| 1621 | { | 1619 | { |
| 1622 | it->pixel_width = it->nglyphs = 1; | 1620 | it->pixel_width = it->nglyphs = 1; |
| 1623 | if (it->glyph_row) | 1621 | if (it->glyph_row) |
| 1624 | append_glyph (it); | 1622 | append_glyph (it); |
| 1625 | } | 1623 | } |
| 1626 | else if (it->c == '\n') | 1624 | else if (it->char_to_display == '\n') |
| 1627 | it->pixel_width = it->nglyphs = 0; | 1625 | it->pixel_width = it->nglyphs = 0; |
| 1628 | else if (it->c == '\t') | 1626 | else if (it->char_to_display == '\t') |
| 1629 | { | 1627 | { |
| 1630 | int absolute_x = (it->current_x | 1628 | int absolute_x = (it->current_x |
| 1631 | + it->continuation_lines_width); | 1629 | + it->continuation_lines_width); |
| @@ -1656,32 +1654,19 @@ produce_glyphs (struct it *it) | |||
| 1656 | it->pixel_width = nspaces; | 1654 | it->pixel_width = nspaces; |
| 1657 | it->nglyphs = nspaces; | 1655 | it->nglyphs = nspaces; |
| 1658 | } | 1656 | } |
| 1659 | else if (CHAR_BYTE8_P (it->c)) | 1657 | else if (CHAR_BYTE8_P (it->char_to_display)) |
| 1660 | { | 1658 | { |
| 1661 | if (unibyte_display_via_language_environment | 1659 | /* Coming here means that we must send the raw 8-bit byte as is |
| 1662 | && (it->c >= 0240)) | 1660 | to the terminal. Although there's no way to know how many |
| 1663 | { | 1661 | columns it occupies on a screen, it is a good assumption that |
| 1664 | it->char_to_display = BYTE8_TO_CHAR (it->c); | 1662 | a single byte code has 1-column width. */ |
| 1665 | it->pixel_width = CHAR_WIDTH (it->char_to_display); | 1663 | it->pixel_width = it->nglyphs = 1; |
| 1666 | it->nglyphs = it->pixel_width; | 1664 | if (it->glyph_row) |
| 1667 | if (it->glyph_row) | 1665 | append_glyph (it); |
| 1668 | append_glyph (it); | ||
| 1669 | } | ||
| 1670 | else | ||
| 1671 | { | ||
| 1672 | /* Coming here means that it->c is from display table, thus | ||
| 1673 | we must send the raw 8-bit byte as is to the terminal. | ||
| 1674 | Although there's no way to know how many columns it | ||
| 1675 | occupies on a screen, it is a good assumption that a | ||
| 1676 | single byte code has 1-column width. */ | ||
| 1677 | it->pixel_width = it->nglyphs = 1; | ||
| 1678 | if (it->glyph_row) | ||
| 1679 | append_glyph (it); | ||
| 1680 | } | ||
| 1681 | } | 1666 | } |
| 1682 | else | 1667 | else |
| 1683 | { | 1668 | { |
| 1684 | it->pixel_width = CHAR_WIDTH (it->c); | 1669 | it->pixel_width = CHAR_WIDTH (it->char_to_display); |
| 1685 | it->nglyphs = it->pixel_width; | 1670 | it->nglyphs = it->pixel_width; |
| 1686 | 1671 | ||
| 1687 | if (it->glyph_row) | 1672 | if (it->glyph_row) |
| @@ -1917,7 +1902,7 @@ produce_special_glyphs (struct it *it, enum display_element_type what) | |||
| 1917 | else | 1902 | else |
| 1918 | abort (); | 1903 | abort (); |
| 1919 | 1904 | ||
| 1920 | temp_it.c = GLYPH_CHAR (glyph); | 1905 | temp_it.c = temp_it.char_to_display = GLYPH_CHAR (glyph); |
| 1921 | temp_it.face_id = GLYPH_FACE (glyph); | 1906 | temp_it.face_id = GLYPH_FACE (glyph); |
| 1922 | temp_it.len = CHAR_BYTES (temp_it.c); | 1907 | temp_it.len = CHAR_BYTES (temp_it.c); |
| 1923 | 1908 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index 07078a199a3..2ec271cdb6b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -5762,10 +5762,23 @@ get_next_display_element (struct it *it) | |||
| 5762 | struct charset *unibyte = CHARSET_FROM_ID (charset_unibyte); | 5762 | struct charset *unibyte = CHARSET_FROM_ID (charset_unibyte); |
| 5763 | enum { char_is_other = 0, char_is_nbsp, char_is_soft_hyphen } | 5763 | enum { char_is_other = 0, char_is_nbsp, char_is_soft_hyphen } |
| 5764 | nbsp_or_shy = char_is_other; | 5764 | nbsp_or_shy = char_is_other; |
| 5765 | int decoded = it->c; | 5765 | int c = it->c; /* This is the character to display. */ |
| 5766 | |||
| 5767 | if (! it->multibyte_p && ! ASCII_CHAR_P (c)) | ||
| 5768 | { | ||
| 5769 | xassert (SINGLE_BYTE_CHAR_P (c)); | ||
| 5770 | if (unibyte_display_via_language_environment) | ||
| 5771 | { | ||
| 5772 | c = DECODE_CHAR (unibyte, c); | ||
| 5773 | if (c < 0) | ||
| 5774 | c = BYTE8_TO_CHAR (it->c); | ||
| 5775 | } | ||
| 5776 | else | ||
| 5777 | c = BYTE8_TO_CHAR (it->c); | ||
| 5778 | } | ||
| 5766 | 5779 | ||
| 5767 | if (it->dp | 5780 | if (it->dp |
| 5768 | && (dv = DISP_CHAR_VECTOR (it->dp, it->c), | 5781 | && (dv = DISP_CHAR_VECTOR (it->dp, c), |
| 5769 | VECTORP (dv))) | 5782 | VECTORP (dv))) |
| 5770 | { | 5783 | { |
| 5771 | struct Lisp_Vector *v = XVECTOR (dv); | 5784 | struct Lisp_Vector *v = XVECTOR (dv); |
| @@ -5791,21 +5804,10 @@ get_next_display_element (struct it *it) | |||
| 5791 | goto get_next; | 5804 | goto get_next; |
| 5792 | } | 5805 | } |
| 5793 | 5806 | ||
| 5794 | if (unibyte_display_via_language_environment | 5807 | if (! ASCII_CHAR_P (c) && ! NILP (Vnobreak_char_display)) |
| 5795 | && !ASCII_CHAR_P (it->c)) | 5808 | nbsp_or_shy = (c == 0xA0 ? char_is_nbsp |
| 5796 | decoded = DECODE_CHAR (unibyte, it->c); | 5809 | : c == 0xAD ? char_is_soft_hyphen |
| 5797 | 5810 | : char_is_other); | |
| 5798 | if (it->c >= 0x80 && ! NILP (Vnobreak_char_display)) | ||
| 5799 | { | ||
| 5800 | if (it->multibyte_p) | ||
| 5801 | nbsp_or_shy = (it->c == 0xA0 ? char_is_nbsp | ||
| 5802 | : it->c == 0xAD ? char_is_soft_hyphen | ||
| 5803 | : char_is_other); | ||
| 5804 | else if (unibyte_display_via_language_environment) | ||
| 5805 | nbsp_or_shy = (decoded == 0xA0 ? char_is_nbsp | ||
| 5806 | : decoded == 0xAD ? char_is_soft_hyphen | ||
| 5807 | : char_is_other); | ||
| 5808 | } | ||
| 5809 | 5811 | ||
| 5810 | /* Translate control characters into `\003' or `^C' form. | 5812 | /* Translate control characters into `\003' or `^C' form. |
| 5811 | Control characters coming from a display table entry are | 5813 | Control characters coming from a display table entry are |
| @@ -5813,27 +5815,23 @@ get_next_display_element (struct it *it) | |||
| 5813 | the translation. This could easily be changed but I | 5815 | the translation. This could easily be changed but I |
| 5814 | don't believe that it is worth doing. | 5816 | don't believe that it is worth doing. |
| 5815 | 5817 | ||
| 5816 | If it->multibyte_p is nonzero, non-printable non-ASCII | 5818 | NBSP and SOFT-HYPEN are property translated too. |
| 5817 | characters are also translated to octal form. | ||
| 5818 | 5819 | ||
| 5819 | If it->multibyte_p is zero, eight-bit characters that | 5820 | Non-printable characters and raw-byte characters are also |
| 5820 | don't have corresponding multibyte char code are also | ||
| 5821 | translated to octal form. */ | 5821 | translated to octal form. */ |
| 5822 | if ((it->c < ' ' | 5822 | if (((c < ' ' || c == 127) /* ASCII control chars */ |
| 5823 | ? (it->area != TEXT_AREA | 5823 | ? (it->area != TEXT_AREA |
| 5824 | /* In mode line, treat \n, \t like other crl chars. */ | 5824 | /* In mode line, treat \n, \t like other crl chars. */ |
| 5825 | || (it->c != '\t' | 5825 | || (c != '\t' |
| 5826 | && it->glyph_row | 5826 | && it->glyph_row |
| 5827 | && (it->glyph_row->mode_line_p || it->avoid_cursor_p)) | 5827 | && (it->glyph_row->mode_line_p || it->avoid_cursor_p)) |
| 5828 | || (it->c != '\n' && it->c != '\t')) | 5828 | || (c != '\n' && c != '\t')) |
| 5829 | : (nbsp_or_shy | 5829 | : (nbsp_or_shy |
| 5830 | || (it->multibyte_p | 5830 | || CHAR_BYTE8_P (c) |
| 5831 | ? ! CHAR_PRINTABLE_P (it->c) | 5831 | || ! CHAR_PRINTABLE_P (c)))) |
| 5832 | : (! unibyte_display_via_language_environment | ||
| 5833 | ? it->c >= 0x80 | ||
| 5834 | : (decoded >= 0x80 && decoded < 0xA0)))))) | ||
| 5835 | { | 5832 | { |
| 5836 | /* IT->c is a control character which must be displayed | 5833 | /* C is a control character, NBSP, SOFT-HYPEN, raw-byte, |
| 5834 | or a non-printable character which must be displayed | ||
| 5837 | either as '\003' or as `^C' where the '\\' and '^' | 5835 | either as '\003' or as `^C' where the '\\' and '^' |
| 5838 | can be defined in the display table. Fill | 5836 | can be defined in the display table. Fill |
| 5839 | IT->ctl_chars with glyphs for what we have to | 5837 | IT->ctl_chars with glyphs for what we have to |
| @@ -5845,7 +5843,7 @@ get_next_display_element (struct it *it) | |||
| 5845 | 5843 | ||
| 5846 | /* Handle control characters with ^. */ | 5844 | /* Handle control characters with ^. */ |
| 5847 | 5845 | ||
| 5848 | if (it->c < 128 && it->ctl_arrow_p) | 5846 | if (ASCII_CHAR_P (c) && it->ctl_arrow_p) |
| 5849 | { | 5847 | { |
| 5850 | int g; | 5848 | int g; |
| 5851 | 5849 | ||
| @@ -5878,7 +5876,7 @@ get_next_display_element (struct it *it) | |||
| 5878 | } | 5876 | } |
| 5879 | 5877 | ||
| 5880 | XSETINT (it->ctl_chars[0], g); | 5878 | XSETINT (it->ctl_chars[0], g); |
| 5881 | XSETINT (it->ctl_chars[1], it->c ^ 0100); | 5879 | XSETINT (it->ctl_chars[1], c ^ 0100); |
| 5882 | ctl_len = 2; | 5880 | ctl_len = 2; |
| 5883 | goto display_control; | 5881 | goto display_control; |
| 5884 | } | 5882 | } |
| @@ -5893,7 +5891,7 @@ get_next_display_element (struct it *it) | |||
| 5893 | face_id = merge_faces (it->f, Qnobreak_space, 0, | 5891 | face_id = merge_faces (it->f, Qnobreak_space, 0, |
| 5894 | it->face_id); | 5892 | it->face_id); |
| 5895 | 5893 | ||
| 5896 | it->c = ' '; | 5894 | c = ' '; |
| 5897 | XSETINT (it->ctl_chars[0], ' '); | 5895 | XSETINT (it->ctl_chars[0], ' '); |
| 5898 | ctl_len = 1; | 5896 | ctl_len = 1; |
| 5899 | goto display_control; | 5897 | goto display_control; |
| @@ -5939,7 +5937,6 @@ get_next_display_element (struct it *it) | |||
| 5939 | if (EQ (Vnobreak_char_display, Qt) | 5937 | if (EQ (Vnobreak_char_display, Qt) |
| 5940 | && nbsp_or_shy == char_is_soft_hyphen) | 5938 | && nbsp_or_shy == char_is_soft_hyphen) |
| 5941 | { | 5939 | { |
| 5942 | it->c = '-'; | ||
| 5943 | XSETINT (it->ctl_chars[0], '-'); | 5940 | XSETINT (it->ctl_chars[0], '-'); |
| 5944 | ctl_len = 1; | 5941 | ctl_len = 1; |
| 5945 | goto display_control; | 5942 | goto display_control; |
| @@ -5951,55 +5948,25 @@ get_next_display_element (struct it *it) | |||
| 5951 | if (nbsp_or_shy) | 5948 | if (nbsp_or_shy) |
| 5952 | { | 5949 | { |
| 5953 | XSETINT (it->ctl_chars[0], escape_glyph); | 5950 | XSETINT (it->ctl_chars[0], escape_glyph); |
| 5954 | it->c = (nbsp_or_shy == char_is_nbsp ? ' ' : '-'); | 5951 | c = (nbsp_or_shy == char_is_nbsp ? ' ' : '-'); |
| 5955 | XSETINT (it->ctl_chars[1], it->c); | 5952 | XSETINT (it->ctl_chars[1], c); |
| 5956 | ctl_len = 2; | 5953 | ctl_len = 2; |
| 5957 | goto display_control; | 5954 | goto display_control; |
| 5958 | } | 5955 | } |
| 5959 | 5956 | ||
| 5960 | { | 5957 | { |
| 5961 | unsigned char str[MAX_MULTIBYTE_LENGTH]; | 5958 | char str[10]; |
| 5962 | int len; | 5959 | int len, i; |
| 5963 | int i; | ||
| 5964 | 5960 | ||
| 5965 | /* Set IT->ctl_chars[0] to the glyph for `\\'. */ | 5961 | if (CHAR_BYTE8_P (c)) |
| 5966 | if (CHAR_BYTE8_P (it->c)) | 5962 | /* Display \200 instead of \17777600. */ |
| 5967 | { | 5963 | c = CHAR_TO_BYTE8 (c); |
| 5968 | str[0] = CHAR_TO_BYTE8 (it->c); | 5964 | len = sprintf (str, "%03o", c); |
| 5969 | len = 1; | ||
| 5970 | } | ||
| 5971 | else if (it->c < 256) | ||
| 5972 | { | ||
| 5973 | str[0] = it->c; | ||
| 5974 | len = 1; | ||
| 5975 | } | ||
| 5976 | else | ||
| 5977 | { | ||
| 5978 | /* It's an invalid character, which shouldn't | ||
| 5979 | happen actually, but due to bugs it may | ||
| 5980 | happen. Let's print the char as is, there's | ||
| 5981 | not much meaningful we can do with it. */ | ||
| 5982 | str[0] = it->c; | ||
| 5983 | str[1] = it->c >> 8; | ||
| 5984 | str[2] = it->c >> 16; | ||
| 5985 | str[3] = it->c >> 24; | ||
| 5986 | len = 4; | ||
| 5987 | } | ||
| 5988 | 5965 | ||
| 5966 | XSETINT (it->ctl_chars[0], escape_glyph); | ||
| 5989 | for (i = 0; i < len; i++) | 5967 | for (i = 0; i < len; i++) |
| 5990 | { | 5968 | XSETINT (it->ctl_chars[i + 1], str[i]); |
| 5991 | int g; | 5969 | ctl_len = len + 1; |
| 5992 | XSETINT (it->ctl_chars[i * 4], escape_glyph); | ||
| 5993 | /* Insert three more glyphs into IT->ctl_chars for | ||
| 5994 | the octal display of the character. */ | ||
| 5995 | g = ((str[i] >> 6) & 7) + '0'; | ||
| 5996 | XSETINT (it->ctl_chars[i * 4 + 1], g); | ||
| 5997 | g = ((str[i] >> 3) & 7) + '0'; | ||
| 5998 | XSETINT (it->ctl_chars[i * 4 + 2], g); | ||
| 5999 | g = (str[i] & 7) + '0'; | ||
| 6000 | XSETINT (it->ctl_chars[i * 4 + 3], g); | ||
| 6001 | } | ||
| 6002 | ctl_len = len * 4; | ||
| 6003 | } | 5970 | } |
| 6004 | 5971 | ||
| 6005 | display_control: | 5972 | display_control: |
| @@ -6014,6 +5981,11 @@ get_next_display_element (struct it *it) | |||
| 6014 | it->ellipsis_p = 0; | 5981 | it->ellipsis_p = 0; |
| 6015 | goto get_next; | 5982 | goto get_next; |
| 6016 | } | 5983 | } |
| 5984 | it->char_to_display = c; | ||
| 5985 | } | ||
| 5986 | else if (success_p) | ||
| 5987 | { | ||
| 5988 | it->char_to_display = it->c; | ||
| 6017 | } | 5989 | } |
| 6018 | } | 5990 | } |
| 6019 | 5991 | ||
| @@ -6040,7 +6012,8 @@ get_next_display_element (struct it *it) | |||
| 6040 | : STRINGP (it->string) ? IT_STRING_CHARPOS (*it) | 6012 | : STRINGP (it->string) ? IT_STRING_CHARPOS (*it) |
| 6041 | : IT_CHARPOS (*it)); | 6013 | : IT_CHARPOS (*it)); |
| 6042 | 6014 | ||
| 6043 | it->face_id = FACE_FOR_CHAR (it->f, face, it->c, pos, it->string); | 6015 | it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display, pos, |
| 6016 | it->string); | ||
| 6044 | } | 6017 | } |
| 6045 | } | 6018 | } |
| 6046 | #endif | 6019 | #endif |
| @@ -16481,15 +16454,19 @@ get_overlay_arrow_glyph_row (struct window *w, Lisp_Object overlay_arrow_string) | |||
| 16481 | 16454 | ||
| 16482 | /* Get the next character. */ | 16455 | /* Get the next character. */ |
| 16483 | if (multibyte_p) | 16456 | if (multibyte_p) |
| 16484 | it.c = string_char_and_length (p, &it.len); | 16457 | it.c = it.char_to_display = string_char_and_length (p, &it.len); |
| 16485 | else | 16458 | else |
| 16486 | it.c = *p, it.len = 1; | 16459 | { |
| 16460 | it.c = it.char_to_display = *p, it.len = 1; | ||
| 16461 | if (! ASCII_CHAR_P (it.c)) | ||
| 16462 | it.char_to_display = BYTE8_TO_CHAR (it.c); | ||
| 16463 | } | ||
| 16487 | p += it.len; | 16464 | p += it.len; |
| 16488 | 16465 | ||
| 16489 | /* Get its face. */ | 16466 | /* Get its face. */ |
| 16490 | ilisp = make_number (p - arrow_string); | 16467 | ilisp = make_number (p - arrow_string); |
| 16491 | face = Fget_text_property (ilisp, Qface, overlay_arrow_string); | 16468 | face = Fget_text_property (ilisp, Qface, overlay_arrow_string); |
| 16492 | it.face_id = compute_char_face (f, it.c, face); | 16469 | it.face_id = compute_char_face (f, it.char_to_display, face); |
| 16493 | 16470 | ||
| 16494 | /* Compute its width, get its glyphs. */ | 16471 | /* Compute its width, get its glyphs. */ |
| 16495 | n_glyphs_before = it.glyph_row->used[TEXT_AREA]; | 16472 | n_glyphs_before = it.glyph_row->used[TEXT_AREA]; |
| @@ -16721,6 +16698,7 @@ append_space_for_newline (struct it *it, int default_face_p) | |||
| 16721 | append_space_for_newline has been called. */ | 16698 | append_space_for_newline has been called. */ |
| 16722 | enum display_element_type saved_what = it->what; | 16699 | enum display_element_type saved_what = it->what; |
| 16723 | int saved_c = it->c, saved_len = it->len; | 16700 | int saved_c = it->c, saved_len = it->len; |
| 16701 | int saved_char_to_display = it->char_to_display; | ||
| 16724 | int saved_x = it->current_x; | 16702 | int saved_x = it->current_x; |
| 16725 | int saved_face_id = it->face_id; | 16703 | int saved_face_id = it->face_id; |
| 16726 | struct text_pos saved_pos; | 16704 | struct text_pos saved_pos; |
| @@ -16733,7 +16711,7 @@ append_space_for_newline (struct it *it, int default_face_p) | |||
| 16733 | it->what = IT_CHARACTER; | 16711 | it->what = IT_CHARACTER; |
| 16734 | memset (&it->position, 0, sizeof it->position); | 16712 | memset (&it->position, 0, sizeof it->position); |
| 16735 | it->object = make_number (0); | 16713 | it->object = make_number (0); |
| 16736 | it->c = ' '; | 16714 | it->c = it->char_to_display = ' '; |
| 16737 | it->len = 1; | 16715 | it->len = 1; |
| 16738 | 16716 | ||
| 16739 | if (default_face_p) | 16717 | if (default_face_p) |
| @@ -16754,6 +16732,7 @@ append_space_for_newline (struct it *it, int default_face_p) | |||
| 16754 | it->face_id = saved_face_id; | 16732 | it->face_id = saved_face_id; |
| 16755 | it->len = saved_len; | 16733 | it->len = saved_len; |
| 16756 | it->c = saved_c; | 16734 | it->c = saved_c; |
| 16735 | it->char_to_display = saved_char_to_display; | ||
| 16757 | return 1; | 16736 | return 1; |
| 16758 | } | 16737 | } |
| 16759 | } | 16738 | } |
| @@ -16886,7 +16865,7 @@ extend_face_to_end_of_line (struct it *it) | |||
| 16886 | it->what = IT_CHARACTER; | 16865 | it->what = IT_CHARACTER; |
| 16887 | memset (&it->position, 0, sizeof it->position); | 16866 | memset (&it->position, 0, sizeof it->position); |
| 16888 | it->object = make_number (0); | 16867 | it->object = make_number (0); |
| 16889 | it->c = ' '; | 16868 | it->c = it->char_to_display = ' '; |
| 16890 | it->len = 1; | 16869 | it->len = 1; |
| 16891 | /* The last row's blank glyphs should get the default face, to | 16870 | /* The last row's blank glyphs should get the default face, to |
| 16892 | avoid painting the rest of the window with the region face, | 16871 | avoid painting the rest of the window with the region face, |
| @@ -20490,7 +20469,12 @@ get_glyph_face_and_encoding (struct frame *f, struct glyph *glyph, | |||
| 20490 | 20469 | ||
| 20491 | if (face->font) | 20470 | if (face->font) |
| 20492 | { | 20471 | { |
| 20493 | unsigned code = face->font->driver->encode_char (face->font, glyph->u.ch); | 20472 | unsigned code; |
| 20473 | |||
| 20474 | if (CHAR_BYTE8_P (glyph->u.ch)) | ||
| 20475 | code = CHAR_TO_BYTE8 (glyph->u.ch); | ||
| 20476 | else | ||
| 20477 | code = face->font->driver->encode_char (face->font, glyph->u.ch); | ||
| 20494 | 20478 | ||
| 20495 | if (code != FONT_INVALID_CODE) | 20479 | if (code != FONT_INVALID_CODE) |
| 20496 | STORE_XCHAR2B (char2b, (code >> 8), (code & 0xFF)); | 20480 | STORE_XCHAR2B (char2b, (code >> 8), (code & 0xFF)); |
| @@ -20505,6 +20489,26 @@ get_glyph_face_and_encoding (struct frame *f, struct glyph *glyph, | |||
| 20505 | } | 20489 | } |
| 20506 | 20490 | ||
| 20507 | 20491 | ||
| 20492 | /* Get glyph code of character C in FONT in the two-byte form CHAR2B. | ||
| 20493 | Retunr 1 if FONT has a glyph for C, otherwise return 0. */ | ||
| 20494 | |||
| 20495 | static INLINE int | ||
| 20496 | get_char_glyph_code (int c, struct font *font, XChar2b *char2b) | ||
| 20497 | { | ||
| 20498 | unsigned code; | ||
| 20499 | |||
| 20500 | if (CHAR_BYTE8_P (c)) | ||
| 20501 | code = CHAR_TO_BYTE8 (c); | ||
| 20502 | else | ||
| 20503 | code = font->driver->encode_char (font, c); | ||
| 20504 | |||
| 20505 | if (code == FONT_INVALID_CODE) | ||
| 20506 | return 0; | ||
| 20507 | STORE_XCHAR2B (char2b, (code >> 8), (code & 0xFF)); | ||
| 20508 | return 1; | ||
| 20509 | } | ||
| 20510 | |||
| 20511 | |||
| 20508 | /* Fill glyph string S with composition components specified by S->cmp. | 20512 | /* Fill glyph string S with composition components specified by S->cmp. |
| 20509 | 20513 | ||
| 20510 | BASE_FACE is the base face of the composition. | 20514 | BASE_FACE is the base face of the composition. |
| @@ -21909,10 +21913,14 @@ produce_stretch_glyph (struct it *it) | |||
| 21909 | { | 21913 | { |
| 21910 | int maxlen = ((IT_BYTEPOS (*it) >= GPT ? ZV : GPT) | 21914 | int maxlen = ((IT_BYTEPOS (*it) >= GPT ? ZV : GPT) |
| 21911 | - IT_BYTEPOS (*it)); | 21915 | - IT_BYTEPOS (*it)); |
| 21912 | it2.c = STRING_CHAR_AND_LENGTH (p, it2.len); | 21916 | it2.c = it2.char_to_display = STRING_CHAR_AND_LENGTH (p, it2.len); |
| 21913 | } | 21917 | } |
| 21914 | else | 21918 | else |
| 21915 | it2.c = *p, it2.len = 1; | 21919 | { |
| 21920 | it2.c = it2.char_to_display = *p, it2.len = 1; | ||
| 21921 | if (! ASCII_CHAR_P (it2.c)) | ||
| 21922 | it2.char_to_display = BYTE8_TO_CHAR (it2.c); | ||
| 21923 | } | ||
| 21916 | 21924 | ||
| 21917 | it2.glyph_row = NULL; | 21925 | it2.glyph_row = NULL; |
| 21918 | it2.what = IT_CHARACTER; | 21926 | it2.what = IT_CHARACTER; |
| @@ -22082,49 +22090,12 @@ x_produce_glyphs (struct it *it) | |||
| 22082 | if (it->what == IT_CHARACTER) | 22090 | if (it->what == IT_CHARACTER) |
| 22083 | { | 22091 | { |
| 22084 | XChar2b char2b; | 22092 | XChar2b char2b; |
| 22085 | struct font *font; | ||
| 22086 | struct face *face = FACE_FROM_ID (it->f, it->face_id); | 22093 | struct face *face = FACE_FROM_ID (it->f, it->face_id); |
| 22087 | struct font_metrics *pcm; | 22094 | struct font *font = face->font; |
| 22088 | int font_not_found_p; | 22095 | int font_not_found_p = font == NULL; |
| 22096 | struct font_metrics *pcm = NULL; | ||
| 22089 | int boff; /* baseline offset */ | 22097 | int boff; /* baseline offset */ |
| 22090 | /* We may change it->multibyte_p upon unibyte<->multibyte | ||
| 22091 | conversion. So, save the current value now and restore it | ||
| 22092 | later. | ||
| 22093 | |||
| 22094 | Note: It seems that we don't have to record multibyte_p in | ||
| 22095 | struct glyph because the character code itself tells whether | ||
| 22096 | or not the character is multibyte. Thus, in the future, we | ||
| 22097 | must consider eliminating the field `multibyte_p' in the | ||
| 22098 | struct glyph. */ | ||
| 22099 | int saved_multibyte_p = it->multibyte_p; | ||
| 22100 | |||
| 22101 | /* Maybe translate single-byte characters to multibyte, or the | ||
| 22102 | other way. */ | ||
| 22103 | it->char_to_display = it->c; | ||
| 22104 | if (!ASCII_BYTE_P (it->c) | ||
| 22105 | && ! it->multibyte_p) | ||
| 22106 | { | ||
| 22107 | if (SINGLE_BYTE_CHAR_P (it->c) | ||
| 22108 | && unibyte_display_via_language_environment) | ||
| 22109 | { | ||
| 22110 | struct charset *unibyte = CHARSET_FROM_ID (charset_unibyte); | ||
| 22111 | |||
| 22112 | /* get_next_display_element assures that this decoding | ||
| 22113 | never fails. */ | ||
| 22114 | it->char_to_display = DECODE_CHAR (unibyte, it->c); | ||
| 22115 | it->multibyte_p = 1; | ||
| 22116 | it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display, | ||
| 22117 | -1, Qnil); | ||
| 22118 | face = FACE_FROM_ID (it->f, it->face_id); | ||
| 22119 | } | ||
| 22120 | } | ||
| 22121 | |||
| 22122 | /* Get font to use. Encode IT->char_to_display. */ | ||
| 22123 | get_char_face_and_encoding (it->f, it->char_to_display, it->face_id, | ||
| 22124 | &char2b, it->multibyte_p, 0); | ||
| 22125 | font = face->font; | ||
| 22126 | 22098 | ||
| 22127 | font_not_found_p = font == NULL; | ||
| 22128 | if (font_not_found_p) | 22099 | if (font_not_found_p) |
| 22129 | { | 22100 | { |
| 22130 | /* When no suitable font found, display an empty box based | 22101 | /* When no suitable font found, display an empty box based |
| @@ -22144,16 +22115,12 @@ x_produce_glyphs (struct it *it) | |||
| 22144 | boff = VCENTER_BASELINE_OFFSET (font, it->f) - boff; | 22115 | boff = VCENTER_BASELINE_OFFSET (font, it->f) - boff; |
| 22145 | } | 22116 | } |
| 22146 | 22117 | ||
| 22147 | if (it->char_to_display >= ' ' | 22118 | if (it->char_to_display != '\n' && it->char_to_display != '\t') |
| 22148 | && (!it->multibyte_p || it->char_to_display < 128)) | ||
| 22149 | { | 22119 | { |
| 22150 | /* Either unibyte or ASCII. */ | ||
| 22151 | int stretched_p; | 22120 | int stretched_p; |
| 22152 | 22121 | ||
| 22153 | it->nglyphs = 1; | 22122 | it->nglyphs = 1; |
| 22154 | 22123 | ||
| 22155 | pcm = get_per_char_metric (it->f, font, &char2b); | ||
| 22156 | |||
| 22157 | if (it->override_ascent >= 0) | 22124 | if (it->override_ascent >= 0) |
| 22158 | { | 22125 | { |
| 22159 | it->ascent = it->override_ascent; | 22126 | it->ascent = it->override_ascent; |
| @@ -22166,6 +22133,15 @@ x_produce_glyphs (struct it *it) | |||
| 22166 | it->descent = FONT_DESCENT (font) - boff; | 22133 | it->descent = FONT_DESCENT (font) - boff; |
| 22167 | } | 22134 | } |
| 22168 | 22135 | ||
| 22136 | if (! font_not_found_p | ||
| 22137 | && get_char_glyph_code (it->char_to_display, font, &char2b)) | ||
| 22138 | { | ||
| 22139 | pcm = get_per_char_metric (it->f, font, &char2b); | ||
| 22140 | if (pcm->width == 0 | ||
| 22141 | && pcm->rbearing == 0 && pcm->lbearing == 0) | ||
| 22142 | pcm = NULL; | ||
| 22143 | } | ||
| 22144 | |||
| 22169 | if (pcm) | 22145 | if (pcm) |
| 22170 | { | 22146 | { |
| 22171 | it->phys_ascent = pcm->ascent + boff; | 22147 | it->phys_ascent = pcm->ascent + boff; |
| @@ -22177,7 +22153,7 @@ x_produce_glyphs (struct it *it) | |||
| 22177 | it->glyph_not_available_p = 1; | 22153 | it->glyph_not_available_p = 1; |
| 22178 | it->phys_ascent = it->ascent; | 22154 | it->phys_ascent = it->ascent; |
| 22179 | it->phys_descent = it->descent; | 22155 | it->phys_descent = it->descent; |
| 22180 | it->pixel_width = FONT_WIDTH (font); | 22156 | it->pixel_width = font->space_width; |
| 22181 | } | 22157 | } |
| 22182 | 22158 | ||
| 22183 | if (it->constrain_row_ascent_descent_p) | 22159 | if (it->constrain_row_ascent_descent_p) |
| @@ -22351,7 +22327,7 @@ x_produce_glyphs (struct it *it) | |||
| 22351 | } | 22327 | } |
| 22352 | } | 22328 | } |
| 22353 | } | 22329 | } |
| 22354 | else if (it->char_to_display == '\t') | 22330 | else /* i.e. (it->char_to_display == '\t') */ |
| 22355 | { | 22331 | { |
| 22356 | if (font->space_width > 0) | 22332 | if (font->space_width > 0) |
| 22357 | { | 22333 | { |
| @@ -22382,85 +22358,6 @@ x_produce_glyphs (struct it *it) | |||
| 22382 | it->nglyphs = 1; | 22358 | it->nglyphs = 1; |
| 22383 | } | 22359 | } |
| 22384 | } | 22360 | } |
| 22385 | else | ||
| 22386 | { | ||
| 22387 | /* A multi-byte character. Assume that the display width of the | ||
| 22388 | character is the width of the character multiplied by the | ||
| 22389 | width of the font. */ | ||
| 22390 | |||
| 22391 | /* If we found a font, this font should give us the right | ||
| 22392 | metrics. If we didn't find a font, use the frame's | ||
| 22393 | default font and calculate the width of the character by | ||
| 22394 | multiplying the width of font by the width of the | ||
| 22395 | character. */ | ||
| 22396 | |||
| 22397 | pcm = get_per_char_metric (it->f, font, &char2b); | ||
| 22398 | |||
| 22399 | if (font_not_found_p || !pcm) | ||
| 22400 | { | ||
| 22401 | int char_width = CHAR_WIDTH (it->char_to_display); | ||
| 22402 | |||
| 22403 | if (char_width == 0) | ||
| 22404 | /* This is a non spacing character. But, as we are | ||
| 22405 | going to display an empty box, the box must occupy | ||
| 22406 | at least one column. */ | ||
| 22407 | char_width = 1; | ||
| 22408 | it->glyph_not_available_p = 1; | ||
| 22409 | it->pixel_width = font->space_width * char_width; | ||
| 22410 | it->phys_ascent = FONT_BASE (font) + boff; | ||
| 22411 | it->phys_descent = FONT_DESCENT (font) - boff; | ||
| 22412 | } | ||
| 22413 | else | ||
| 22414 | { | ||
| 22415 | it->pixel_width = pcm->width; | ||
| 22416 | it->phys_ascent = pcm->ascent + boff; | ||
| 22417 | it->phys_descent = pcm->descent - boff; | ||
| 22418 | if (it->glyph_row | ||
| 22419 | && (pcm->lbearing < 0 | ||
| 22420 | || pcm->rbearing > pcm->width)) | ||
| 22421 | it->glyph_row->contains_overlapping_glyphs_p = 1; | ||
| 22422 | } | ||
| 22423 | it->nglyphs = 1; | ||
| 22424 | it->ascent = FONT_BASE (font) + boff; | ||
| 22425 | it->descent = FONT_DESCENT (font) - boff; | ||
| 22426 | if (face->box != FACE_NO_BOX) | ||
| 22427 | { | ||
| 22428 | int thick = face->box_line_width; | ||
| 22429 | |||
| 22430 | if (thick > 0) | ||
| 22431 | { | ||
| 22432 | it->ascent += thick; | ||
| 22433 | it->descent += thick; | ||
| 22434 | } | ||
| 22435 | else | ||
| 22436 | thick = - thick; | ||
| 22437 | |||
| 22438 | if (it->start_of_box_run_p) | ||
| 22439 | it->pixel_width += thick; | ||
| 22440 | if (it->end_of_box_run_p) | ||
| 22441 | it->pixel_width += thick; | ||
| 22442 | } | ||
| 22443 | |||
| 22444 | /* If face has an overline, add the height of the overline | ||
| 22445 | (1 pixel) and a 1 pixel margin to the character height. */ | ||
| 22446 | if (face->overline_p) | ||
| 22447 | it->ascent += overline_margin; | ||
| 22448 | |||
| 22449 | take_vertical_position_into_account (it); | ||
| 22450 | |||
| 22451 | if (it->ascent < 0) | ||
| 22452 | it->ascent = 0; | ||
| 22453 | if (it->descent < 0) | ||
| 22454 | it->descent = 0; | ||
| 22455 | |||
| 22456 | if (it->glyph_row) | ||
| 22457 | append_glyph (it); | ||
| 22458 | if (it->pixel_width == 0) | ||
| 22459 | /* We assure that all visible glyphs have at least 1-pixel | ||
| 22460 | width. */ | ||
| 22461 | it->pixel_width = 1; | ||
| 22462 | } | ||
| 22463 | it->multibyte_p = saved_multibyte_p; | ||
| 22464 | } | 22361 | } |
| 22465 | else if (it->what == IT_COMPOSITION && it->cmp_it.ch < 0) | 22362 | else if (it->what == IT_COMPOSITION && it->cmp_it.ch < 0) |
| 22466 | { | 22363 | { |
| @@ -22556,7 +22453,7 @@ x_produce_glyphs (struct it *it) | |||
| 22556 | } | 22453 | } |
| 22557 | else | 22454 | else |
| 22558 | { | 22455 | { |
| 22559 | width = FONT_WIDTH (font); | 22456 | width = font->space_width; |
| 22560 | ascent = FONT_BASE (font); | 22457 | ascent = FONT_BASE (font); |
| 22561 | descent = FONT_DESCENT (font); | 22458 | descent = FONT_DESCENT (font); |
| 22562 | lbearing = 0; | 22459 | lbearing = 0; |