diff options
| author | Miles Bader | 2005-03-14 05:27:53 +0000 |
|---|---|---|
| committer | Miles Bader | 2005-03-14 05:27:53 +0000 |
| commit | 40fb2103c2986cbb91add4afed635886c4f87ae5 (patch) | |
| tree | 6fd14d0436bc3049314dad9751e74e3816a34265 | |
| parent | 4a670293279d61e9bdf88d9a86caefc6de4e60e3 (diff) | |
| parent | b70d9316bbf3e2482c1345d8135ddd1ee7e25ba7 (diff) | |
| download | emacs-40fb2103c2986cbb91add4afed635886c4f87ae5.tar.gz emacs-40fb2103c2986cbb91add4afed635886c4f87ae5.zip | |
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-25
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 173-179)
- Update from CVS
| -rw-r--r-- | etc/NEWS | 7 | ||||
| -rw-r--r-- | etc/TODO | 6 | ||||
| -rw-r--r-- | lisp/ChangeLog | 66 | ||||
| -rw-r--r-- | lisp/calc/calc-embed.el | 14 | ||||
| -rw-r--r-- | lisp/calc/calc.el | 14 | ||||
| -rw-r--r-- | lisp/calendar/calendar.el | 73 | ||||
| -rw-r--r-- | lisp/calendar/diary-lib.el | 5 | ||||
| -rw-r--r-- | lisp/emacs-lisp/byte-run.el | 13 | ||||
| -rw-r--r-- | lisp/emacs-lisp/debug.el | 28 | ||||
| -rw-r--r-- | lisp/info.el | 8 | ||||
| -rw-r--r-- | lisp/pcvs-util.el | 6 | ||||
| -rw-r--r-- | lisp/progmodes/dcl-mode.el | 4 | ||||
| -rw-r--r-- | lisp/simple.el | 25 | ||||
| -rw-r--r-- | lisp/textmodes/fill.el | 8 | ||||
| -rw-r--r-- | lwlib/ChangeLog | 18 | ||||
| -rw-r--r-- | lwlib/xlwmenu.h | 20 | ||||
| -rw-r--r-- | lwlib/xlwmenuP.h | 20 | ||||
| -rw-r--r-- | src/ChangeLog | 53 | ||||
| -rw-r--r-- | src/fileio.c | 21 | ||||
| -rw-r--r-- | src/xfns.c | 139 | ||||
| -rw-r--r-- | src/xmenu.c | 43 |
21 files changed, 405 insertions, 186 deletions
| @@ -178,6 +178,13 @@ types any more. Add -DUSE_LISP_UNION_TYPE if you want union types. | |||
| 178 | 178 | ||
| 179 | * Changes in Emacs 22.1 | 179 | * Changes in Emacs 22.1 |
| 180 | 180 | ||
| 181 | ** The commands copy-file, rename-file, make-symbolic-link and | ||
| 182 | add-name-to-file, when given a directory as the "new name" argument, | ||
| 183 | convert it to a file name by merging in the within-directory part of | ||
| 184 | the existing file's name. (This is the same convention that shell | ||
| 185 | commands cp, mv, and ln follow.) Thus, M-x copy-file RET ~/foo RET | ||
| 186 | /tmp RET copies ~/foo to /tmp/foo. | ||
| 187 | |||
| 181 | ** C-u M-x goto-line now switches to the most recent previous buffer, | 188 | ** C-u M-x goto-line now switches to the most recent previous buffer, |
| 182 | and goes to the specified line in that buffer. | 189 | and goes to the specified line in that buffer. |
| 183 | 190 | ||
| @@ -82,6 +82,12 @@ to the FSF. | |||
| 82 | to save their changes. If the user says yes, show them | 82 | to save their changes. If the user says yes, show them |
| 83 | in a Custom buffer using customize-customized. | 83 | in a Custom buffer using customize-customized. |
| 84 | 84 | ||
| 85 | ** Emacs Lisp mode could put an overlay on the defun for every | ||
| 86 | function that has advice. The overlay could have `after-text' like " | ||
| 87 | [Function has advice]". It might look like | ||
| 88 | (defun foo [Function has advice] (x y) | ||
| 89 | The overlay could also be a button that you could use to view the advice. | ||
| 90 | |||
| 85 | ** ange-ftp | 91 | ** ange-ftp |
| 86 | *** understand sftp | 92 | *** understand sftp |
| 87 | *** Use MLS for ange-ftp-insert-directory if a list of files is specified. | 93 | *** Use MLS for ange-ftp-insert-directory if a list of files is specified. |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b2bd4a197b9..5901c35c2e9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,69 @@ | |||
| 1 | 2005-03-14 Kim F. Storm <storm@cua.dk> | ||
| 2 | |||
| 3 | * simple.el (next-line, previous-line): Add optional try-vscroll | ||
| 4 | arg to recognize interactive use. Pass it on to line-move. | ||
| 5 | (line-move): Don't perform auto-window-vscroll when defining or | ||
| 6 | executing keyboard macro to ensure consistent behaviour. | ||
| 7 | |||
| 8 | 2005-03-13 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 9 | |||
| 10 | * pcvs-util.el (cvs-string->strings): Strip trailing whitespace. | ||
| 11 | |||
| 12 | 2005-03-13 Lute Kamstra <lute@gnu.org> | ||
| 13 | |||
| 14 | * emacs-lisp/debug.el (debug): Set debug-on-exit before calling | ||
| 15 | debugger-setup-buffer so that backtrace marks the frames set to | ||
| 16 | debug-on-exit and we don't have to do it manually. Set an extra | ||
| 17 | debug-on-exit for macro's. | ||
| 18 | (debugger-setup-buffer): Don't mark the top frame manually. | ||
| 19 | |||
| 20 | 2005-03-12 Lute Kamstra <lute@gnu.org> | ||
| 21 | |||
| 22 | * emacs-lisp/byte-run.el: Replace lisp-indent-hook with | ||
| 23 | lisp-indent-function throughout. | ||
| 24 | (with-no-warnings): Set lisp-indent-function property. | ||
| 25 | |||
| 26 | 2005-03-12 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 27 | |||
| 28 | * progmodes/dcl-mode.el (dcl-mode-syntax-table): | ||
| 29 | Add entry for backslash. | ||
| 30 | |||
| 31 | 2005-03-12 Juri Linkov <juri@jurta.org> | ||
| 32 | |||
| 33 | * info.el (Info-search): Four fixes for backward search. | ||
| 34 | |||
| 35 | 2005-03-11 Jay Belanger <belanger@truman.edu> | ||
| 36 | |||
| 37 | * calc/calc.el (calc-language-alist): New variable. | ||
| 38 | * calc/calc-embed.el (calc-embedded-language-alist): Remove. | ||
| 39 | (calc-embedded-find-modes): Use calc-language-alist instead of | ||
| 40 | calc-embedded-language-alist. | ||
| 41 | |||
| 42 | 2005-03-11 Glenn Morris <gmorris@ast.cam.ac.uk> | ||
| 43 | |||
| 44 | * calendar/calendar.el (calendar-redrawing): New internal | ||
| 45 | variable. | ||
| 46 | (redraw-calendar): Remove bogus save-excursion from previous | ||
| 47 | change. Bind calendar-redrawing to t for mark-diary-entries. | ||
| 48 | * calendar/diary-lib.el (mark-diary-entries): No need to redraw | ||
| 49 | calendar if that is why we were called. | ||
| 50 | |||
| 51 | 2005-03-11 Kenichi Handa <handa@m17n.org> | ||
| 52 | |||
| 53 | * international/mule.el (make-coding-system): Set property | ||
| 54 | 'coding-system-define-form to nil. | ||
| 55 | (define-coding-system-alias): Likewise. | ||
| 56 | |||
| 57 | 2005-03-11 Kenichi Handa <handa@m17n.org> | ||
| 58 | |||
| 59 | These changes are suggested by Dave Love <fx@gnu.org>. | ||
| 60 | |||
| 61 | * textmodes/fill.el: Change encoding to iso-2022-7bit and add | ||
| 62 | coding: tag. | ||
| 63 | (adaptive-fill-regexp): Add more bullets. | ||
| 64 | (fill-french-nobreak-p): Add Latin-1 and Latin-9 guillemets in | ||
| 65 | regexps. | ||
| 66 | |||
| 1 | 2005-03-10 Stefan Monnier <monnier@iro.umontreal.ca> | 67 | 2005-03-10 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 68 | ||
| 3 | * help.el (describe-mode): Properly handle non-trivial lighters. | 69 | * help.el (describe-mode): Properly handle non-trivial lighters. |
diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el index 3ad42037b50..f1a273f7cf3 100644 --- a/lisp/calc/calc-embed.el +++ b/lisp/calc/calc-embed.el | |||
| @@ -677,18 +677,6 @@ The command \\[yank] can retrieve it from there." | |||
| 677 | (setq calc-embedded-globals (cons t modes)) | 677 | (setq calc-embedded-globals (cons t modes)) |
| 678 | (goto-char save-pt))) | 678 | (goto-char save-pt))) |
| 679 | 679 | ||
| 680 | (defvar calc-embedded-language-alist | ||
| 681 | '((latex-mode . latex) | ||
| 682 | (tex-mode . tex) | ||
| 683 | (plain-tex-mode . tex) | ||
| 684 | (context-mode . tex) | ||
| 685 | (nroff-mode . eqn) | ||
| 686 | (pascal-mode . pascal) | ||
| 687 | (c-mode . c) | ||
| 688 | (c++-mode . c) | ||
| 689 | (fortran-mode . fortran) | ||
| 690 | (f90-mode . fortran))) | ||
| 691 | |||
| 692 | (defun calc-embedded-find-modes () | 680 | (defun calc-embedded-find-modes () |
| 693 | (let ((case-fold-search nil) | 681 | (let ((case-fold-search nil) |
| 694 | (save-pt (point)) | 682 | (save-pt (point)) |
| @@ -737,7 +725,7 @@ The command \\[yank] can retrieve it from there." | |||
| 737 | (backward-char 6)) | 725 | (backward-char 6)) |
| 738 | (goto-char save-pt) | 726 | (goto-char save-pt) |
| 739 | (unless (assq 'the-language modes) | 727 | (unless (assq 'the-language modes) |
| 740 | (let ((lang (assoc major-mode calc-embedded-language-alist))) | 728 | (let ((lang (assoc major-mode calc-language-alist))) |
| 741 | (if lang | 729 | (if lang |
| 742 | (setq modes (cons (cons 'the-language (cdr lang)) | 730 | (setq modes (cons (cons 'the-language (cdr lang)) |
| 743 | modes))))) | 731 | modes))))) |
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 99857ce05a0..24336ad9333 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el | |||
| @@ -717,6 +717,20 @@ If nil, selections displayed but ignored.") | |||
| 717 | (defvar var-gamma '(special-const (math-gamma-const))) | 717 | (defvar var-gamma '(special-const (math-gamma-const))) |
| 718 | (defvar var-Modes '(special-const (math-get-modes-vec))) | 718 | (defvar var-Modes '(special-const (math-get-modes-vec))) |
| 719 | 719 | ||
| 720 | (defvar calc-language-alist | ||
| 721 | '((latex-mode . latex) | ||
| 722 | (tex-mode . tex) | ||
| 723 | (plain-tex-mode . tex) | ||
| 724 | (context-mode . tex) | ||
| 725 | (nroff-mode . eqn) | ||
| 726 | (pascal-mode . pascal) | ||
| 727 | (c-mode . c) | ||
| 728 | (c++-mode . c) | ||
| 729 | (fortran-mode . fortran) | ||
| 730 | (f90-mode . fortran)) | ||
| 731 | "Alist of major modes with appropriate Calc languages.") | ||
| 732 | |||
| 733 | |||
| 720 | (mapcar (lambda (v) (or (boundp v) (set v nil))) | 734 | (mapcar (lambda (v) (or (boundp v) (set v nil))) |
| 721 | calc-local-var-list) | 735 | calc-local-var-list) |
| 722 | 736 | ||
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 7c6aad07d37..8c78d9540bf 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el | |||
| @@ -2150,15 +2150,18 @@ the inserted text. Value is always t." | |||
| 2150 | (forward-line 1)))) | 2150 | (forward-line 1)))) |
| 2151 | t) | 2151 | t) |
| 2152 | 2152 | ||
| 2153 | (defvar calendar-redrawing nil | ||
| 2154 | "Internal calendar variable, non-nil if inside redraw-calendar.") | ||
| 2155 | |||
| 2153 | (defun redraw-calendar () | 2156 | (defun redraw-calendar () |
| 2154 | "Redraw the calendar display, if `calendar-buffer' is live." | 2157 | "Redraw the calendar display, if `calendar-buffer' is live." |
| 2155 | (interactive) | 2158 | (interactive) |
| 2156 | (if (get-buffer calendar-buffer) | 2159 | (if (get-buffer calendar-buffer) |
| 2157 | (save-excursion | 2160 | (with-current-buffer calendar-buffer |
| 2158 | (with-current-buffer calendar-buffer | 2161 | (let ((cursor-date (calendar-cursor-to-nearest-date)) |
| 2159 | (let ((cursor-date (calendar-cursor-to-nearest-date))) | 2162 | (calendar-redrawing t)) |
| 2160 | (generate-calendar-window displayed-month displayed-year) | 2163 | (generate-calendar-window displayed-month displayed-year) |
| 2161 | (calendar-cursor-to-visible-date cursor-date)))))) | 2164 | (calendar-cursor-to-visible-date cursor-date))))) |
| 2162 | 2165 | ||
| 2163 | ;;;###autoload | 2166 | ;;;###autoload |
| 2164 | (defcustom calendar-week-start-day 0 | 2167 | (defcustom calendar-week-start-day 0 |
| @@ -2918,40 +2921,40 @@ MARK defaults to `diary-entry-marker'." | |||
| 2918 | (save-excursion | 2921 | (save-excursion |
| 2919 | (set-buffer calendar-buffer) | 2922 | (set-buffer calendar-buffer) |
| 2920 | (calendar-cursor-to-visible-date date) | 2923 | (calendar-cursor-to-visible-date date) |
| 2921 | (let ((mark (or (and (stringp mark) (= (length mark) 1) mark) ; single-char | 2924 | (let ((mark (or (and (stringp mark) (= (length mark) 1) mark) ; single-char |
| 2922 | (and (listp mark) (> (length mark) 0) mark) ; attr list | 2925 | (and (listp mark) (> (length mark) 0) mark) ; attr list |
| 2923 | (and (facep mark) mark) ; face-name | 2926 | (and (facep mark) mark) ; face-name |
| 2924 | diary-entry-marker))) | 2927 | diary-entry-marker))) |
| 2925 | (if (facep mark) | 2928 | (if (facep mark) |
| 2926 | (progn ; face or an attr-list that contained a face | 2929 | (progn ; face or an attr-list that contained a face |
| 2927 | (overlay-put | 2930 | (overlay-put |
| 2928 | (make-overlay (1- (point)) (1+ (point))) 'face mark)) | 2931 | (make-overlay (1- (point)) (1+ (point))) 'face mark)) |
| 2929 | (if (and (stringp mark) | 2932 | (if (and (stringp mark) |
| 2930 | (= (length mark) 1)) ; single-char | 2933 | (= (length mark) 1)) ; single-char |
| 2931 | (let ((buffer-read-only nil)) | 2934 | (let ((buffer-read-only nil)) |
| 2932 | (forward-char 1) | 2935 | (forward-char 1) |
| 2933 | (delete-char 1) | 2936 | (delete-char 1) |
| 2934 | (insert mark) | 2937 | (insert mark) |
| 2935 | (forward-char -2)) | 2938 | (forward-char -2)) |
| 2936 | (let ; attr list | 2939 | (let ; attr list |
| 2937 | ((temp-face | 2940 | ((temp-face |
| 2938 | (make-symbol (apply 'concat "temp-face-" | 2941 | (make-symbol (apply 'concat "temp-face-" |
| 2939 | (mapcar '(lambda (sym) | 2942 | (mapcar '(lambda (sym) |
| 2940 | (cond ((symbolp sym) (symbol-name sym)) | 2943 | (cond ((symbolp sym) (symbol-name sym)) |
| 2941 | ((numberp sym) (int-to-string sym)) | 2944 | ((numberp sym) (int-to-string sym)) |
| 2942 | (t sym))) mark)))) | 2945 | (t sym))) mark)))) |
| 2943 | (faceinfo mark)) | 2946 | (faceinfo mark)) |
| 2944 | (make-face temp-face) | 2947 | (make-face temp-face) |
| 2945 | ;; Remove :face info from the mark, copy the face info into temp-face | 2948 | ;; Remove :face info from the mark, copy the face info into temp-face |
| 2946 | (while (setq faceinfo (memq :face faceinfo)) | 2949 | (while (setq faceinfo (memq :face faceinfo)) |
| 2947 | (copy-face (read (nth 1 faceinfo)) temp-face) | 2950 | (copy-face (read (nth 1 faceinfo)) temp-face) |
| 2948 | (setcar faceinfo nil) | 2951 | (setcar faceinfo nil) |
| 2949 | (setcar (cdr faceinfo) nil)) | 2952 | (setcar (cdr faceinfo) nil)) |
| 2950 | (setq mark (delq nil mark)) | 2953 | (setq mark (delq nil mark)) |
| 2951 | ;; Apply the font aspects | 2954 | ;; Apply the font aspects |
| 2952 | (apply 'set-face-attribute temp-face nil mark) | 2955 | (apply 'set-face-attribute temp-face nil mark) |
| 2953 | (overlay-put | 2956 | (overlay-put |
| 2954 | (make-overlay (1- (point)) (1+ (point))) 'face temp-face)))))))) | 2957 | (make-overlay (1- (point)) (1+ (point))) 'face temp-face)))))))) |
| 2955 | 2958 | ||
| 2956 | (defun calendar-star-date () | 2959 | (defun calendar-star-date () |
| 2957 | "Replace the date under the cursor in the calendar window with asterisks. | 2960 | "Replace the date under the cursor in the calendar window with asterisks. |
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index d682a3f1cc5..124b29c3fe7 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el | |||
| @@ -846,7 +846,10 @@ After the entries are marked, the hooks `nongregorian-diary-marking-hook' and | |||
| 846 | ;; Avoid redrawing when called recursively, eg through | 846 | ;; Avoid redrawing when called recursively, eg through |
| 847 | ;; mark-diary-entries-hook for #include's, else only get | 847 | ;; mark-diary-entries-hook for #include's, else only get |
| 848 | ;; the last set of diary marks. | 848 | ;; the last set of diary marks. |
| 849 | (not marking-diary-entries)) | 849 | (not marking-diary-entries) |
| 850 | ;; If called from redraw-calendar, the calendar has been | ||
| 851 | ;; erased, so no need to unmark the diary entries. | ||
| 852 | (not calendar-redrawing)) | ||
| 850 | (setq mark-diary-entries-in-calendar nil) | 853 | (setq mark-diary-entries-in-calendar nil) |
| 851 | (redraw-calendar)) | 854 | (redraw-calendar)) |
| 852 | (let ((marking-diary-entries t) | 855 | (let ((marking-diary-entries t) |
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index 2cd0896c835..ef426494b68 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; byte-run.el --- byte-compiler support for inlining | 1 | ;;; byte-run.el --- byte-compiler support for inlining |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1992, 2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1992, 2004, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Jamie Zawinski <jwz@lucid.com> | 5 | ;; Author: Jamie Zawinski <jwz@lucid.com> |
| 6 | ;; Hallvard Furuseth <hbf@ulrik.uio.no> | 6 | ;; Hallvard Furuseth <hbf@ulrik.uio.no> |
| @@ -34,7 +34,7 @@ | |||
| 34 | ;; Redefined in byte-optimize.el. | 34 | ;; Redefined in byte-optimize.el. |
| 35 | ;; This is not documented--it's not clear that we should promote it. | 35 | ;; This is not documented--it's not clear that we should promote it. |
| 36 | (fset 'inline 'progn) | 36 | (fset 'inline 'progn) |
| 37 | (put 'inline 'lisp-indent-hook 0) | 37 | (put 'inline 'lisp-indent-function 0) |
| 38 | 38 | ||
| 39 | 39 | ||
| 40 | ;;; Interface to inline functions. | 40 | ;;; Interface to inline functions. |
| @@ -105,7 +105,7 @@ was first made obsolete, for example a date or a release number." | |||
| 105 | (put variable 'byte-obsolete-variable (cons new when)) | 105 | (put variable 'byte-obsolete-variable (cons new when)) |
| 106 | variable) | 106 | variable) |
| 107 | 107 | ||
| 108 | (put 'dont-compile 'lisp-indent-hook 0) | 108 | (put 'dont-compile 'lisp-indent-function 0) |
| 109 | (defmacro dont-compile (&rest body) | 109 | (defmacro dont-compile (&rest body) |
| 110 | "Like `progn', but the body always runs interpreted (not compiled). | 110 | "Like `progn', but the body always runs interpreted (not compiled). |
| 111 | If you think you need this, you're probably making a mistake somewhere." | 111 | If you think you need this, you're probably making a mistake somewhere." |
| @@ -118,7 +118,7 @@ If you think you need this, you're probably making a mistake somewhere." | |||
| 118 | ;;; definition in the file overrides the magic definitions on the | 118 | ;;; definition in the file overrides the magic definitions on the |
| 119 | ;;; byte-compile-macro-environment. | 119 | ;;; byte-compile-macro-environment. |
| 120 | 120 | ||
| 121 | (put 'eval-when-compile 'lisp-indent-hook 0) | 121 | (put 'eval-when-compile 'lisp-indent-function 0) |
| 122 | (defmacro eval-when-compile (&rest body) | 122 | (defmacro eval-when-compile (&rest body) |
| 123 | "Like `progn', but evaluates the body at compile time. | 123 | "Like `progn', but evaluates the body at compile time. |
| 124 | The result of the body appears to the compiler as a quoted constant." | 124 | The result of the body appears to the compiler as a quoted constant." |
| @@ -127,13 +127,14 @@ The result of the body appears to the compiler as a quoted constant." | |||
| 127 | ;; (list 'quote (eval (cons 'progn body))) | 127 | ;; (list 'quote (eval (cons 'progn body))) |
| 128 | (cons 'progn body)) | 128 | (cons 'progn body)) |
| 129 | 129 | ||
| 130 | (put 'eval-and-compile 'lisp-indent-hook 0) | 130 | (put 'eval-and-compile 'lisp-indent-function 0) |
| 131 | (defmacro eval-and-compile (&rest body) | 131 | (defmacro eval-and-compile (&rest body) |
| 132 | "Like `progn', but evaluates the body at compile time and at load time." | 132 | "Like `progn', but evaluates the body at compile time and at load time." |
| 133 | (declare (debug t)) | 133 | (declare (debug t)) |
| 134 | ;; Remember, it's magic. | 134 | ;; Remember, it's magic. |
| 135 | (cons 'progn body)) | 135 | (cons 'progn body)) |
| 136 | 136 | ||
| 137 | (put 'with-no-warnings 'lisp-indent-function 0) | ||
| 137 | (defun with-no-warnings (&rest body) | 138 | (defun with-no-warnings (&rest body) |
| 138 | "Like `progn', but prevents compiler warnings in the body." | 139 | "Like `progn', but prevents compiler warnings in the body." |
| 139 | ;; The implementation for the interpreter is basically trivial. | 140 | ;; The implementation for the interpreter is basically trivial. |
| @@ -147,7 +148,7 @@ The result of the body appears to the compiler as a quoted constant." | |||
| 147 | ;;; There is hardly any reason to change these parameters, anyway. | 148 | ;;; There is hardly any reason to change these parameters, anyway. |
| 148 | ;;; --rms. | 149 | ;;; --rms. |
| 149 | 150 | ||
| 150 | ;; (put 'byte-compiler-options 'lisp-indent-hook 0) | 151 | ;; (put 'byte-compiler-options 'lisp-indent-function 0) |
| 151 | ;; (defmacro byte-compiler-options (&rest args) | 152 | ;; (defmacro byte-compiler-options (&rest args) |
| 152 | ;; "Set some compilation-parameters for this file. This will affect only the | 153 | ;; "Set some compilation-parameters for this file. This will affect only the |
| 153 | ;; file in which it appears; this does nothing when evaluated, and when loaded | 154 | ;; file in which it appears; this does nothing when evaluated, and when loaded |
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 668157fc52a..2be217a41c6 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el | |||
| @@ -170,7 +170,14 @@ first will be printed into the backtrace buffer." | |||
| 170 | (save-excursion | 170 | (save-excursion |
| 171 | (save-window-excursion | 171 | (save-window-excursion |
| 172 | (with-no-warnings | 172 | (with-no-warnings |
| 173 | (setq unread-command-char -1)) | 173 | (setq unread-command-char -1)) |
| 174 | (when (eq (car debugger-args) 'debug) | ||
| 175 | ;; Skip the frames for backtrace-debug, byte-code, | ||
| 176 | ;; and implement-debug-on-entry. | ||
| 177 | (backtrace-debug 4 t) | ||
| 178 | ;; Place an extra debug-on-exit for macro's. | ||
| 179 | (when (eq 'lambda (car-safe (cadr (backtrace-frame 4)))) | ||
| 180 | (backtrace-debug 5 t))) | ||
| 174 | (pop-to-buffer debugger-buffer) | 181 | (pop-to-buffer debugger-buffer) |
| 175 | (debugger-mode) | 182 | (debugger-mode) |
| 176 | (debugger-setup-buffer debugger-args) | 183 | (debugger-setup-buffer debugger-args) |
| @@ -190,10 +197,6 @@ first will be printed into the backtrace buffer." | |||
| 190 | (goto-char (point-min)) | 197 | (goto-char (point-min)) |
| 191 | (message "%s" (buffer-string)) | 198 | (message "%s" (buffer-string)) |
| 192 | (kill-emacs)) | 199 | (kill-emacs)) |
| 193 | (if (eq (car debugger-args) 'debug) | ||
| 194 | ;; Skip the frames for backtrace-debug, byte-code, | ||
| 195 | ;; and implement-debug-on-entry. | ||
| 196 | (backtrace-debug 4 t)) | ||
| 197 | (message "") | 200 | (message "") |
| 198 | (let ((standard-output nil) | 201 | (let ((standard-output nil) |
| 199 | (buffer-read-only t)) | 202 | (buffer-read-only t)) |
| @@ -225,7 +228,7 @@ first will be printed into the backtrace buffer." | |||
| 225 | (setq last-command debugger-outer-last-command) | 228 | (setq last-command debugger-outer-last-command) |
| 226 | (setq this-command debugger-outer-this-command) | 229 | (setq this-command debugger-outer-this-command) |
| 227 | (with-no-warnings | 230 | (with-no-warnings |
| 228 | (setq unread-command-char debugger-outer-unread-command-char)) | 231 | (setq unread-command-char debugger-outer-unread-command-char)) |
| 229 | (setq unread-command-events debugger-outer-unread-command-events) | 232 | (setq unread-command-events debugger-outer-unread-command-events) |
| 230 | (setq unread-post-input-method-events | 233 | (setq unread-post-input-method-events |
| 231 | debugger-outer-unread-post-input-method-events) | 234 | debugger-outer-unread-post-input-method-events) |
| @@ -263,12 +266,7 @@ That buffer should be current already." | |||
| 263 | ;; lambda is for debug-on-call when a function call is next. | 266 | ;; lambda is for debug-on-call when a function call is next. |
| 264 | ;; debug is for debug-on-entry function called. | 267 | ;; debug is for debug-on-entry function called. |
| 265 | (cond ((memq (car debugger-args) '(lambda debug)) | 268 | (cond ((memq (car debugger-args) '(lambda debug)) |
| 266 | (insert "--entering a function:\n") | 269 | (insert "--entering a function:\n")) |
| 267 | (if (eq (car debugger-args) 'debug) | ||
| 268 | (progn | ||
| 269 | (delete-char 1) | ||
| 270 | (insert ?*) | ||
| 271 | (beginning-of-line)))) | ||
| 272 | ;; Exiting a function. | 270 | ;; Exiting a function. |
| 273 | ((eq (car debugger-args) 'exit) | 271 | ((eq (car debugger-args) 'exit) |
| 274 | (insert "--returning value: ") | 272 | (insert "--returning value: ") |
| @@ -508,12 +506,12 @@ Applies to the frame whose line point is on in the backtrace." | |||
| 508 | (unwind-protect | 506 | (unwind-protect |
| 509 | (progn | 507 | (progn |
| 510 | (with-no-warnings | 508 | (with-no-warnings |
| 511 | (setq unread-command-char debugger-outer-unread-command-char)) | 509 | (setq unread-command-char debugger-outer-unread-command-char)) |
| 512 | (prog1 (progn ,@body) | 510 | (prog1 (progn ,@body) |
| 513 | (with-no-warnings | 511 | (with-no-warnings |
| 514 | (setq debugger-outer-unread-command-char unread-command-char)))) | 512 | (setq debugger-outer-unread-command-char unread-command-char)))) |
| 515 | (with-no-warnings | 513 | (with-no-warnings |
| 516 | (setq unread-command-char save-ucc)))) | 514 | (setq unread-command-char save-ucc)))) |
| 517 | (setq debugger-outer-match-data (match-data)) | 515 | (setq debugger-outer-match-data (match-data)) |
| 518 | (setq debugger-outer-load-read-function load-read-function) | 516 | (setq debugger-outer-load-read-function load-read-function) |
| 519 | (setq debugger-outer-overriding-terminal-local-map | 517 | (setq debugger-outer-overriding-terminal-local-map |
diff --git a/lisp/info.el b/lisp/info.el index fcc42395967..87ddfa6a55b 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -1502,7 +1502,7 @@ If DIRECTION is `backward', search in the reverse direction." | |||
| 1502 | ;; Skip node header line | 1502 | ;; Skip node header line |
| 1503 | (and (save-excursion (forward-line -1) | 1503 | (and (save-excursion (forward-line -1) |
| 1504 | (looking-at "\^_")) | 1504 | (looking-at "\^_")) |
| 1505 | (forward-line 1)) | 1505 | (forward-line (if backward -1 1))) |
| 1506 | ;; Skip Tag Table node | 1506 | ;; Skip Tag Table node |
| 1507 | (save-excursion | 1507 | (save-excursion |
| 1508 | (and (search-backward "\^_" nil t) | 1508 | (and (search-backward "\^_" nil t) |
| @@ -1540,6 +1540,7 @@ If DIRECTION is `backward', search in the reverse direction." | |||
| 1540 | (search-forward (concat "\n" osubfile ": ")) | 1540 | (search-forward (concat "\n" osubfile ": ")) |
| 1541 | ;; Skip that one. | 1541 | ;; Skip that one. |
| 1542 | (forward-line (if backward 0 1)) | 1542 | (forward-line (if backward 0 1)) |
| 1543 | (if backward (forward-char -1)) | ||
| 1543 | ;; Make a list of all following subfiles. | 1544 | ;; Make a list of all following subfiles. |
| 1544 | ;; Each elt has the form (VIRT-POSITION . SUBFILENAME). | 1545 | ;; Each elt has the form (VIRT-POSITION . SUBFILENAME). |
| 1545 | (while (not (if backward (bobp) (eobp))) | 1546 | (while (not (if backward (bobp) (eobp))) |
| @@ -1578,7 +1579,7 @@ If DIRECTION is `backward', search in the reverse direction." | |||
| 1578 | ;; Skip node header line | 1579 | ;; Skip node header line |
| 1579 | (and (save-excursion (forward-line -1) | 1580 | (and (save-excursion (forward-line -1) |
| 1580 | (looking-at "\^_")) | 1581 | (looking-at "\^_")) |
| 1581 | (forward-line 1)) | 1582 | (forward-line (if backward -1 1))) |
| 1582 | ;; Skip Tag Table node | 1583 | ;; Skip Tag Table node |
| 1583 | (save-excursion | 1584 | (save-excursion |
| 1584 | (and (search-backward "\^_" nil t) | 1585 | (and (search-backward "\^_" nil t) |
| @@ -1615,7 +1616,8 @@ If DIRECTION is `backward', search in the reverse direction." | |||
| 1615 | ;; Use string-equal, not equal, to ignore text props. | 1616 | ;; Use string-equal, not equal, to ignore text props. |
| 1616 | (or (and (string-equal onode Info-current-node) | 1617 | (or (and (string-equal onode Info-current-node) |
| 1617 | (equal ofile Info-current-file)) | 1618 | (equal ofile Info-current-file)) |
| 1618 | (and isearch-mode isearch-wrapped (eq opoint opoint-min)) | 1619 | (and isearch-mode isearch-wrapped |
| 1620 | (eq opoint (if isearch-forward opoint-min opoint-max))) | ||
| 1619 | (setq Info-history (cons (list ofile onode opoint) | 1621 | (setq Info-history (cons (list ofile onode opoint) |
| 1620 | Info-history)))))) | 1622 | Info-history)))))) |
| 1621 | 1623 | ||
diff --git a/lisp/pcvs-util.el b/lisp/pcvs-util.el index a4eda95e23e..2cbb00b324c 100644 --- a/lisp/pcvs-util.el +++ b/lisp/pcvs-util.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; pcvs-util.el --- utility functions for PCL-CVS -*- byte-compile-dynamic: t -*- | 1 | ;;; pcvs-util.el --- utility functions for PCL-CVS -*- byte-compile-dynamic: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | 3 | ;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
| 4 | ;; 2000, 2001, 2004 Free Software Foundation, Inc. | 4 | ;; 2000, 2001, 2004, 2005 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Stefan Monnier <monnier@cs.yale.edu> | 6 | ;; Author: Stefan Monnier <monnier@cs.yale.edu> |
| 7 | ;; Keywords: pcl-cvs | 7 | ;; Keywords: pcl-cvs |
| @@ -205,8 +205,8 @@ It understands elisp style quoting within STRING such that | |||
| 205 | The SEPARATOR regexp defaults to \"\\s-+\"." | 205 | The SEPARATOR regexp defaults to \"\\s-+\"." |
| 206 | (let ((sep (or separator "\\s-+")) | 206 | (let ((sep (or separator "\\s-+")) |
| 207 | (i (string-match "[\"]" string))) | 207 | (i (string-match "[\"]" string))) |
| 208 | (if (null i) (split-string string sep) ; no quoting: easy | 208 | (if (null i) (split-string string sep t) ; no quoting: easy |
| 209 | (append (unless (eq i 0) (split-string (substring string 0 i) sep)) | 209 | (append (unless (eq i 0) (split-string (substring string 0 i) sep t)) |
| 210 | (let ((rfs (read-from-string string i))) | 210 | (let ((rfs (read-from-string string i))) |
| 211 | (cons (car rfs) | 211 | (cons (car rfs) |
| 212 | (cvs-string->strings (substring string (cdr rfs)) | 212 | (cvs-string->strings (substring string (cdr rfs)) |
diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el index 861c3bbb8c6..81ed7780a64 100644 --- a/lisp/progmodes/dcl-mode.el +++ b/lisp/progmodes/dcl-mode.el | |||
| @@ -284,13 +284,13 @@ See `imenu-generic-expression' for details." | |||
| 284 | 284 | ||
| 285 | (defvar dcl-mode-syntax-table nil | 285 | (defvar dcl-mode-syntax-table nil |
| 286 | "Syntax table used in DCL-buffers.") | 286 | "Syntax table used in DCL-buffers.") |
| 287 | (if dcl-mode-syntax-table | 287 | (unless dcl-mode-syntax-table |
| 288 | () | ||
| 289 | (setq dcl-mode-syntax-table (make-syntax-table)) | 288 | (setq dcl-mode-syntax-table (make-syntax-table)) |
| 290 | (modify-syntax-entry ?! "<" dcl-mode-syntax-table) ; comment start | 289 | (modify-syntax-entry ?! "<" dcl-mode-syntax-table) ; comment start |
| 291 | (modify-syntax-entry ?\n ">" dcl-mode-syntax-table) ; comment end | 290 | (modify-syntax-entry ?\n ">" dcl-mode-syntax-table) ; comment end |
| 292 | (modify-syntax-entry ?< "(>" dcl-mode-syntax-table) ; < and ... | 291 | (modify-syntax-entry ?< "(>" dcl-mode-syntax-table) ; < and ... |
| 293 | (modify-syntax-entry ?> ")<" dcl-mode-syntax-table) ; > is a matching pair | 292 | (modify-syntax-entry ?> ")<" dcl-mode-syntax-table) ; > is a matching pair |
| 293 | (modify-syntax-entry ?\\ "_" dcl-mode-syntax-table) ; not an escape | ||
| 294 | ) | 294 | ) |
| 295 | 295 | ||
| 296 | 296 | ||
diff --git a/lisp/simple.el b/lisp/simple.el index 60fb6c33b8d..c69f8d6cf28 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -3177,8 +3177,9 @@ commands which are sensitive to the Transient Mark mode." | |||
| 3177 | :version "21.1" | 3177 | :version "21.1" |
| 3178 | :group 'editing-basics) | 3178 | :group 'editing-basics) |
| 3179 | 3179 | ||
| 3180 | (defun next-line (&optional arg) | 3180 | (defun next-line (&optional arg try-vscroll) |
| 3181 | "Move cursor vertically down ARG lines. | 3181 | "Move cursor vertically down ARG lines. |
| 3182 | Interactively, vscroll tall lines if `auto-window-vscroll' is enabled. | ||
| 3182 | If there is no character in the target line exactly under the current column, | 3183 | If there is no character in the target line exactly under the current column, |
| 3183 | the cursor is positioned after the character in that line which spans this | 3184 | the cursor is positioned after the character in that line which spans this |
| 3184 | column, or at the end of the line if it is not long enough. | 3185 | column, or at the end of the line if it is not long enough. |
| @@ -3197,7 +3198,7 @@ when there is no goal column. | |||
| 3197 | If you are thinking of using this in a Lisp program, consider | 3198 | If you are thinking of using this in a Lisp program, consider |
| 3198 | using `forward-line' instead. It is usually easier to use | 3199 | using `forward-line' instead. It is usually easier to use |
| 3199 | and more reliable (no dependence on goal column, etc.)." | 3200 | and more reliable (no dependence on goal column, etc.)." |
| 3200 | (interactive "p") | 3201 | (interactive "p\np") |
| 3201 | (or arg (setq arg 1)) | 3202 | (or arg (setq arg 1)) |
| 3202 | (if (and next-line-add-newlines (= arg 1)) | 3203 | (if (and next-line-add-newlines (= arg 1)) |
| 3203 | (if (save-excursion (end-of-line) (eobp)) | 3204 | (if (save-excursion (end-of-line) (eobp)) |
| @@ -3205,16 +3206,17 @@ and more reliable (no dependence on goal column, etc.)." | |||
| 3205 | (let ((abbrev-mode nil)) | 3206 | (let ((abbrev-mode nil)) |
| 3206 | (end-of-line) | 3207 | (end-of-line) |
| 3207 | (insert "\n")) | 3208 | (insert "\n")) |
| 3208 | (line-move arg nil nil t)) | 3209 | (line-move arg nil nil try-vscroll)) |
| 3209 | (if (interactive-p) | 3210 | (if (interactive-p) |
| 3210 | (condition-case nil | 3211 | (condition-case nil |
| 3211 | (line-move arg nil nil t) | 3212 | (line-move arg nil nil try-vscroll) |
| 3212 | ((beginning-of-buffer end-of-buffer) (ding))) | 3213 | ((beginning-of-buffer end-of-buffer) (ding))) |
| 3213 | (line-move arg nil nil t))) | 3214 | (line-move arg nil nil try-vscroll))) |
| 3214 | nil) | 3215 | nil) |
| 3215 | 3216 | ||
| 3216 | (defun previous-line (&optional arg) | 3217 | (defun previous-line (&optional arg try-vscroll) |
| 3217 | "Move cursor vertically up ARG lines. | 3218 | "Move cursor vertically up ARG lines. |
| 3219 | Interactively, vscroll tall lines if `auto-window-vscroll' is enabled. | ||
| 3218 | If there is no character in the target line exactly over the current column, | 3220 | If there is no character in the target line exactly over the current column, |
| 3219 | the cursor is positioned after the character in that line which spans this | 3221 | the cursor is positioned after the character in that line which spans this |
| 3220 | column, or at the end of the line if it is not long enough. | 3222 | column, or at the end of the line if it is not long enough. |
| @@ -3229,13 +3231,13 @@ when there is no goal column. | |||
| 3229 | If you are thinking of using this in a Lisp program, consider using | 3231 | If you are thinking of using this in a Lisp program, consider using |
| 3230 | `forward-line' with a negative argument instead. It is usually easier | 3232 | `forward-line' with a negative argument instead. It is usually easier |
| 3231 | to use and more reliable (no dependence on goal column, etc.)." | 3233 | to use and more reliable (no dependence on goal column, etc.)." |
| 3232 | (interactive "p") | 3234 | (interactive "p\np") |
| 3233 | (or arg (setq arg 1)) | 3235 | (or arg (setq arg 1)) |
| 3234 | (if (interactive-p) | 3236 | (if (interactive-p) |
| 3235 | (condition-case nil | 3237 | (condition-case nil |
| 3236 | (line-move (- arg) nil nil t) | 3238 | (line-move (- arg) nil nil try-vscroll) |
| 3237 | ((beginning-of-buffer end-of-buffer) (ding))) | 3239 | ((beginning-of-buffer end-of-buffer) (ding))) |
| 3238 | (line-move (- arg) nil nil t)) | 3240 | (line-move (- arg) nil nil try-vscroll)) |
| 3239 | nil) | 3241 | nil) |
| 3240 | 3242 | ||
| 3241 | (defcustom track-eol nil | 3243 | (defcustom track-eol nil |
| @@ -3274,8 +3276,11 @@ Outline mode sets this." | |||
| 3274 | (assq prop buffer-invisibility-spec))))) | 3276 | (assq prop buffer-invisibility-spec))))) |
| 3275 | 3277 | ||
| 3276 | ;; Perform vertical scrolling of tall images if necessary. | 3278 | ;; Perform vertical scrolling of tall images if necessary. |
| 3279 | ;; Don't vscroll in a keyboard macro. | ||
| 3277 | (defun line-move (arg &optional noerror to-end try-vscroll) | 3280 | (defun line-move (arg &optional noerror to-end try-vscroll) |
| 3278 | (if (and auto-window-vscroll try-vscroll) | 3281 | (if (and auto-window-vscroll try-vscroll |
| 3282 | (not defining-kbd-macro) | ||
| 3283 | (not executing-kbd-macro)) | ||
| 3279 | (let ((forward (> arg 0)) | 3284 | (let ((forward (> arg 0)) |
| 3280 | (part (nth 2 (pos-visible-in-window-p (point) nil t)))) | 3285 | (part (nth 2 (pos-visible-in-window-p (point) nil t)))) |
| 3281 | (if (and (consp part) | 3286 | (if (and (consp part) |
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index dfd471a87c4..ccd7f21f502 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; fill.el --- fill commands for Emacs | 1 | ;;; fill.el --- fill commands for Emacs -*- coding: iso-2022-7bit -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985,86,92,94,95,96,97,1999,2001,02,03,2004 | 3 | ;; Copyright (C) 1985,86,92,94,95,96,97,1999,2001,02,03,2004 |
| 4 | ;; Free Software Foundation, Inc. | 4 | ;; Free Software Foundation, Inc. |
| @@ -87,7 +87,7 @@ reinserts the fill prefix in each resulting line." | |||
| 87 | (defcustom adaptive-fill-regexp | 87 | (defcustom adaptive-fill-regexp |
| 88 | ;; Added `!' for doxygen comments starting with `//!' or `/*!'. | 88 | ;; Added `!' for doxygen comments starting with `//!' or `/*!'. |
| 89 | ;; Added `%' for TeX comments. | 89 | ;; Added `%' for TeX comments. |
| 90 | (purecopy "[ \t]*\\([-!|#%;>*]+[ \t]*\\|(?[0-9]+[.)][ \t]*\\)*") | 90 | (purecopy "[ \t]*\\([-!|#%;>*,A7$,1s"s#sC$,2"F(B]+[ \t]*\\|(?[0-9]+[.)][ \t]*\\)*") |
| 91 | "*Regexp to match text at start of line that constitutes indentation. | 91 | "*Regexp to match text at start of line that constitutes indentation. |
| 92 | If Adaptive Fill mode is enabled, a prefix matching this pattern | 92 | If Adaptive Fill mode is enabled, a prefix matching this pattern |
| 93 | on the first and second lines of a paragraph is used as the | 93 | on the first and second lines of a paragraph is used as the |
| @@ -304,12 +304,12 @@ after an opening paren or just before a closing paren or a punctuation | |||
| 304 | mark such as `?' or `:'. It is common in French writing to put a space | 304 | mark such as `?' or `:'. It is common in French writing to put a space |
| 305 | at such places, which would normally allow breaking the line at those | 305 | at such places, which would normally allow breaking the line at those |
| 306 | places." | 306 | places." |
| 307 | (or (looking-at "[ \t]*[])}»?!;:-]") | 307 | (or (looking-at "[ \t]*[])},A;,b;(B?!;:-]") |
| 308 | (save-excursion | 308 | (save-excursion |
| 309 | (skip-chars-backward " \t") | 309 | (skip-chars-backward " \t") |
| 310 | (unless (bolp) | 310 | (unless (bolp) |
| 311 | (backward-char 1) | 311 | (backward-char 1) |
| 312 | (or (looking-at "[([{«]") | 312 | (or (looking-at "[([{,A+,b+(B]") |
| 313 | ;; Don't cut right after a single-letter word. | 313 | ;; Don't cut right after a single-letter word. |
| 314 | (and (memq (preceding-char) '(?\t ?\ )) | 314 | (and (memq (preceding-char) '(?\t ?\ )) |
| 315 | (eq (char-syntax (following-char)) ?w))))))) | 315 | (eq (char-syntax (following-char)) ?w))))))) |
diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index 487c842f6f2..0160265e60f 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2005-03-12 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * xlwmenuP.h: | ||
| 4 | * xlwmenu.h: Add missing copyright and license notice. | ||
| 5 | |||
| 1 | 2004-12-27 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 6 | 2004-12-27 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 2 | 7 | ||
| 3 | * xlwmenu.c (xlwMenuActionsList): Install MenuGadgetEscape as an | 8 | * xlwmenu.c (xlwMenuActionsList): Install MenuGadgetEscape as an |
| @@ -19,11 +24,11 @@ | |||
| 19 | 24 | ||
| 20 | 2004-08-30 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 25 | 2004-08-30 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 21 | 26 | ||
| 22 | * lwlib.h (_widget_value): Added lname and lkey. | 27 | * lwlib.h (_widget_value): Add lname and lkey. |
| 23 | 28 | ||
| 24 | 2004-01-12 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 29 | 2004-01-12 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 25 | 30 | ||
| 26 | * xlwmenuP.h (_XlwMenu_part): Added top_depth. | 31 | * xlwmenuP.h (_XlwMenu_part): Add top_depth. |
| 27 | 32 | ||
| 28 | * xlwmenu.h: Removed declaration of pop_up_menu | 33 | * xlwmenu.h: Removed declaration of pop_up_menu |
| 29 | 34 | ||
| @@ -56,8 +61,8 @@ | |||
| 56 | 61 | ||
| 57 | * lwlib-Xlw.c: Include lisp.h, not ../src/lisp.h. | 62 | * lwlib-Xlw.c: Include lisp.h, not ../src/lisp.h. |
| 58 | (lw_lucid_widget_p): Remove unused `mw'. | 63 | (lw_lucid_widget_p): Remove unused `mw'. |
| 59 | (xlw_update_one_widget, xlw_pop_instance) [PROTOTYPES]: Provide | 64 | (xlw_update_one_widget, xlw_pop_instance) [PROTOTYPES]: |
| 60 | ISO C arglists. | 65 | Provide ISO C arglists. |
| 61 | 66 | ||
| 62 | 2003-04-30 Lute Kamstra <lute@gnu.org> | 67 | 2003-04-30 Lute Kamstra <lute@gnu.org> |
| 63 | 68 | ||
| @@ -84,8 +89,7 @@ | |||
| 84 | 2002-11-20 Dave Love <fx@gnu.org> | 89 | 2002-11-20 Dave Love <fx@gnu.org> |
| 85 | 90 | ||
| 86 | * lwlib.c: Remove obsolete USE_OLIT code. | 91 | * lwlib.c: Remove obsolete USE_OLIT code. |
| 87 | [PROTOTYPES]: Provide ISO C arglists for functions with Boolean | 92 | [PROTOTYPES]: Provide ISO C arglists for functions with Boolean args. |
| 88 | args. | ||
| 89 | (lwlib_memset): Declare length arg as size_t. | 93 | (lwlib_memset): Declare length arg as size_t. |
| 90 | (malloc_widget_value): Cast arg of lwlib_memset. | 94 | (malloc_widget_value): Cast arg of lwlib_memset. |
| 91 | 95 | ||
| @@ -248,7 +252,7 @@ | |||
| 248 | 252 | ||
| 249 | * lwlib-Xm.c (make_menu_in_widget): Add an XmNpopdownCallback | 253 | * lwlib-Xm.c (make_menu_in_widget): Add an XmNpopdownCallback |
| 250 | instead of an XmNunmapCallback. | 254 | instead of an XmNunmapCallback. |
| 251 | (xm_unmap_callback): Removed. | 255 | (xm_unmap_callback): Remove. |
| 252 | 256 | ||
| 253 | * lwlib-Xm.c (make_menubar): Take out code in #if 0. | 257 | * lwlib-Xm.c (make_menubar): Take out code in #if 0. |
| 254 | 258 | ||
diff --git a/lwlib/xlwmenu.h b/lwlib/xlwmenu.h index c1f37b5617b..5ba052f1285 100644 --- a/lwlib/xlwmenu.h +++ b/lwlib/xlwmenu.h | |||
| @@ -1,3 +1,23 @@ | |||
| 1 | /* Interface of a lightweight menubar widget. | ||
| 2 | Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc. | ||
| 3 | |||
| 4 | This file is part of the Lucid Widget Library. | ||
| 5 | |||
| 6 | The Lucid Widget Library is free software; you can redistribute it and/or | ||
| 7 | modify it under the terms of the GNU General Public License as published by | ||
| 8 | the Free Software Foundation; either version 2, or (at your option) | ||
| 9 | any later version. | ||
| 10 | |||
| 11 | The Lucid Widget Library is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with GNU Emacs; see the file COPYING. If not, write to the | ||
| 18 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 19 | Boston, MA 02111-1307, USA. */ | ||
| 20 | |||
| 1 | #ifndef _XlwMenu_h | 21 | #ifndef _XlwMenu_h |
| 2 | #define _XlwMenu_h | 22 | #define _XlwMenu_h |
| 3 | 23 | ||
diff --git a/lwlib/xlwmenuP.h b/lwlib/xlwmenuP.h index f6aa0f4a58c..38bce796941 100644 --- a/lwlib/xlwmenuP.h +++ b/lwlib/xlwmenuP.h | |||
| @@ -1,3 +1,23 @@ | |||
| 1 | /* Internals of a lightweight menubar widget. | ||
| 2 | Copyright (C) 1999, 2000, 2002, 2004 Free Software Foundation, Inc. | ||
| 3 | |||
| 4 | This file is part of the Lucid Widget Library. | ||
| 5 | |||
| 6 | The Lucid Widget Library is free software; you can redistribute it and/or | ||
| 7 | modify it under the terms of the GNU General Public License as published by | ||
| 8 | the Free Software Foundation; either version 2, or (at your option) | ||
| 9 | any later version. | ||
| 10 | |||
| 11 | The Lucid Widget Library is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with GNU Emacs; see the file COPYING. If not, write to the | ||
| 18 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 19 | Boston, MA 02111-1307, USA. */ | ||
| 20 | |||
| 1 | #ifndef _XlwMenuP_h | 21 | #ifndef _XlwMenuP_h |
| 2 | #define _XlwMenuP_h | 22 | #define _XlwMenuP_h |
| 3 | 23 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index 24db3a9c55a..b09d6ccdad9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,32 @@ | |||
| 1 | 2005-03-12 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * xmenu.c (ENCODE_MENU_STRING): Explicitly use string_make_unibyte. | ||
| 4 | (list_of_panes, list_of_items, Fx_popup_menu): Use XCAR/XCDR. | ||
| 5 | (digest_single_submenu, xmenu_show): Use ENCODE_MENU_STRING. | ||
| 6 | |||
| 7 | * xfns.c (xic_defaut_fontset): New constant. | ||
| 8 | (xic_create_fontsetname): New function. | ||
| 9 | Extracted from create_frame_xic. Try to generate a slightly | ||
| 10 | better fontset. | ||
| 11 | (xic_create_xfontset): Use it. | ||
| 12 | (create_frame_xic): Simplify. | ||
| 13 | |||
| 14 | 2005-03-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 15 | |||
| 16 | * fileio.c (Fmake_symbolic_link): Fix last change. | ||
| 17 | |||
| 18 | 2005-03-11 Richard M. Stallman <rms@gnu.org> | ||
| 19 | |||
| 20 | * fileio.c (Frename_file, Fadd_name_to_file) | ||
| 21 | (Fmake_symbolic_link): If NEWNAME or LINKNAME is a directory, | ||
| 22 | expand the basename of FILE relative to it. | ||
| 23 | |||
| 24 | 2005-03-11 Kenichi Handa <handa@m17n.org> | ||
| 25 | |||
| 26 | * fileio.c (Finsert_file_contents): Call Fcheck_coding_system | ||
| 27 | before calling setup_coding_system so that autoloading of a coding | ||
| 28 | system work. | ||
| 29 | |||
| 1 | 2005-03-10 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 30 | 2005-03-10 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 2 | 31 | ||
| 3 | * xfns.c (hourglass_started): New function. | 32 | * xfns.c (hourglass_started): New function. |
| @@ -20,8 +49,7 @@ | |||
| 20 | available font is found. | 49 | available font is found. |
| 21 | 50 | ||
| 22 | * fontset.c (set_default_ascii_font): New function. | 51 | * fontset.c (set_default_ascii_font): New function. |
| 23 | (syms_of_fontset): Don't set FONTSET_ASCII (Vdefault_fontset) | 52 | (syms_of_fontset): Don't set FONTSET_ASCII (Vdefault_fontset) here. |
| 24 | here. | ||
| 25 | 53 | ||
| 26 | * fontset.h (set_default_ascii_font): Extern it. | 54 | * fontset.h (set_default_ascii_font): Extern it. |
| 27 | 55 | ||
| @@ -82,13 +110,11 @@ | |||
| 82 | * emacs.c (main): Change `#ifdef HAVE_CARBON' to `#if | 110 | * emacs.c (main): Change `#ifdef HAVE_CARBON' to `#if |
| 83 | defined (MAC_OSX) && defined (HAVE_CARBON)'. | 111 | defined (MAC_OSX) && defined (HAVE_CARBON)'. |
| 84 | 112 | ||
| 85 | * image.c [!MAC_OSX && TARGET_API_MAC_CARBON]: Include | 113 | * image.c [!MAC_OSX && TARGET_API_MAC_CARBON]: Include QuickTime.h. |
| 86 | QuickTime.h. | ||
| 87 | 114 | ||
| 88 | * mac.c [!MAC_OSX && HAVE_CARBON]: Include Carbon.h. | 115 | * mac.c [!MAC_OSX && HAVE_CARBON]: Include Carbon.h. |
| 89 | [!MAC_OSX] (select) [TARGET_API_MAC_CARBON]: Use ReceiveNextEvent. | 116 | [!MAC_OSX] (select) [TARGET_API_MAC_CARBON]: Use ReceiveNextEvent. |
| 90 | (posix_pathname_to_fsspec, fsspec_to_posix_pathname): New | 117 | (posix_pathname_to_fsspec, fsspec_to_posix_pathname): New functions. |
| 91 | functions. | ||
| 92 | (mac_clear_font_name_table): Move extern to macterm.h. | 118 | (mac_clear_font_name_table): Move extern to macterm.h. |
| 93 | 119 | ||
| 94 | * macfns.c (install_window_handler): Move extern to macterm.h. | 120 | * macfns.c (install_window_handler): Move extern to macterm.h. |
| @@ -96,16 +122,15 @@ | |||
| 96 | valid. Don't check !NILP (dir) because it is already checked with | 122 | valid. Don't check !NILP (dir) because it is already checked with |
| 97 | CHECK_STRING. | 123 | CHECK_STRING. |
| 98 | (Fx_file_dialog) [!MAC_OSX]: Use FSSpec instead of FSRef for | 124 | (Fx_file_dialog) [!MAC_OSX]: Use FSSpec instead of FSRef for |
| 99 | specifying the default location and obtaining the selected | 125 | specifying the default location and obtaining the selected filename. |
| 100 | filename. | ||
| 101 | 126 | ||
| 102 | * macgui.h [!MAC_OSX && HAVE_CARBON]: Include Carbon.h. | 127 | * macgui.h [!MAC_OSX && HAVE_CARBON]: Include Carbon.h. |
| 103 | 128 | ||
| 104 | * macmenu.c [TARGET_API_MAC_CARBON]: Don't include headers that | 129 | * macmenu.c [TARGET_API_MAC_CARBON]: Don't include headers that |
| 105 | are included via Carbon.h. | 130 | are included via Carbon.h. |
| 106 | 131 | ||
| 107 | * macterm.c [TARGET_API_MAC_CARBON && !MAC_OSX]: Define | 132 | * macterm.c [TARGET_API_MAC_CARBON && !MAC_OSX]: |
| 108 | USE_CARBON_EVENTS to 1. | 133 | Define USE_CARBON_EVENTS to 1. |
| 109 | (qd) [__MRC__ && TARGET_API_MAC_CARBON]: Don't declare. | 134 | (qd) [__MRC__ && TARGET_API_MAC_CARBON]: Don't declare. |
| 110 | (x_free_frame_resources): Call remove_window_handler for | 135 | (x_free_frame_resources): Call remove_window_handler for |
| 111 | non-tooltip windows. | 136 | non-tooltip windows. |
| @@ -118,12 +143,12 @@ | |||
| 118 | (install_window_handler) [TARGET_API_MAC_CARBON]: Create UPPs for | 143 | (install_window_handler) [TARGET_API_MAC_CARBON]: Create UPPs for |
| 119 | drag-and-drop handler functions and register them. | 144 | drag-and-drop handler functions and register them. |
| 120 | (remove_window_handler): New function. | 145 | (remove_window_handler): New function. |
| 121 | (do_ae_open_documents, mac_do_receive_drag) [!MAC_OSX]: Use | 146 | (do_ae_open_documents, mac_do_receive_drag) [!MAC_OSX]: |
| 122 | fsspec_to_posix_pathname. | 147 | Use fsspec_to_posix_pathname. |
| 123 | (main): Change #if !TARGET_API_MAC_CARBON to #ifdef MAC_OS8. | 148 | (main): Change #if !TARGET_API_MAC_CARBON to #ifdef MAC_OS8. |
| 124 | (XTread_socket) [!MAC_OSX]: Don't pass keyboard events to TSM. | 149 | (XTread_socket) [!MAC_OSX]: Don't pass keyboard events to TSM. |
| 125 | [MAC_OS8] (make_mac_terminal_frame) [TARGET_API_MAC_CARBON]: Set | 150 | [MAC_OS8] (make_mac_terminal_frame) [TARGET_API_MAC_CARBON]: |
| 126 | default cursors. | 151 | Set default cursors. |
| 127 | (mac_initialize) [USE_CARBON_EVENTS && !MAC_OSX] : Don't call | 152 | (mac_initialize) [USE_CARBON_EVENTS && !MAC_OSX] : Don't call |
| 128 | init_service_handler or init_quit_char_handler. | 153 | init_service_handler or init_quit_char_handler. |
| 129 | (mac_initialize) [!MAC_OSX]: Don't call MakeMeTheFrontProcess. | 154 | (mac_initialize) [!MAC_OSX]: Don't call MakeMeTheFrontProcess. |
diff --git a/src/fileio.c b/src/fileio.c index db511aad887..c62c1e88042 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* File IO for GNU Emacs. | 1 | /* File IO for GNU Emacs. |
| 2 | Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1998, | 2 | Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1998, |
| 3 | 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. | 3 | 1999, 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -2696,7 +2696,11 @@ This is what happens in interactive use with M-x. */) | |||
| 2696 | CHECK_STRING (file); | 2696 | CHECK_STRING (file); |
| 2697 | CHECK_STRING (newname); | 2697 | CHECK_STRING (newname); |
| 2698 | file = Fexpand_file_name (file, Qnil); | 2698 | file = Fexpand_file_name (file, Qnil); |
| 2699 | newname = Fexpand_file_name (newname, Qnil); | 2699 | |
| 2700 | if (!NILP (Ffile_directory_p (newname))) | ||
| 2701 | newname = Fexpand_file_name (Ffile_name_nondirectory (file), newname); | ||
| 2702 | else | ||
| 2703 | newname = Fexpand_file_name (newname, Qnil); | ||
| 2700 | 2704 | ||
| 2701 | /* If the file name has special constructs in it, | 2705 | /* If the file name has special constructs in it, |
| 2702 | call the corresponding file handler. */ | 2706 | call the corresponding file handler. */ |
| @@ -2779,7 +2783,11 @@ This is what happens in interactive use with M-x. */) | |||
| 2779 | CHECK_STRING (file); | 2783 | CHECK_STRING (file); |
| 2780 | CHECK_STRING (newname); | 2784 | CHECK_STRING (newname); |
| 2781 | file = Fexpand_file_name (file, Qnil); | 2785 | file = Fexpand_file_name (file, Qnil); |
| 2782 | newname = Fexpand_file_name (newname, Qnil); | 2786 | |
| 2787 | if (!NILP (Ffile_directory_p (newname))) | ||
| 2788 | newname = Fexpand_file_name (Ffile_name_nondirectory (file), newname); | ||
| 2789 | else | ||
| 2790 | newname = Fexpand_file_name (newname, Qnil); | ||
| 2783 | 2791 | ||
| 2784 | /* If the file name has special constructs in it, | 2792 | /* If the file name has special constructs in it, |
| 2785 | call the corresponding file handler. */ | 2793 | call the corresponding file handler. */ |
| @@ -2846,7 +2854,11 @@ This happens for interactive use with M-x. */) | |||
| 2846 | we want to permit links to relative file names. */ | 2854 | we want to permit links to relative file names. */ |
| 2847 | if (SREF (filename, 0) == '~') | 2855 | if (SREF (filename, 0) == '~') |
| 2848 | filename = Fexpand_file_name (filename, Qnil); | 2856 | filename = Fexpand_file_name (filename, Qnil); |
| 2849 | linkname = Fexpand_file_name (linkname, Qnil); | 2857 | |
| 2858 | if (!NILP (Ffile_directory_p (linkname))) | ||
| 2859 | linkname = Fexpand_file_name (Ffile_name_nondirectory (filename), linkname); | ||
| 2860 | else | ||
| 2861 | linkname = Fexpand_file_name (linkname, Qnil); | ||
| 2850 | 2862 | ||
| 2851 | /* If the file name has special constructs in it, | 2863 | /* If the file name has special constructs in it, |
| 2852 | call the corresponding file handler. */ | 2864 | call the corresponding file handler. */ |
| @@ -4508,7 +4520,6 @@ actually used. */) | |||
| 4508 | if (CONSP (coding_system)) | 4520 | if (CONSP (coding_system)) |
| 4509 | coding_system = XCAR (coding_system); | 4521 | coding_system = XCAR (coding_system); |
| 4510 | } | 4522 | } |
| 4511 | |||
| 4512 | unbind_to (count, Qnil); | 4523 | unbind_to (count, Qnil); |
| 4513 | inserted = Z_BYTE - BEG_BYTE; | 4524 | inserted = Z_BYTE - BEG_BYTE; |
| 4514 | } | 4525 | } |
diff --git a/src/xfns.c b/src/xfns.c index c45845e00ce..0522fc4137e 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -1939,6 +1939,88 @@ static XIMStyle supported_xim_styles[] = | |||
| 1939 | 1939 | ||
| 1940 | /* Create an X fontset on frame F with base font name BASE_FONTNAME. */ | 1940 | /* Create an X fontset on frame F with base font name BASE_FONTNAME. */ |
| 1941 | 1941 | ||
| 1942 | char xic_defaut_fontset[] = "-*-*-*-r-normal--14-*-*-*-*-*-*-*"; | ||
| 1943 | |||
| 1944 | char * | ||
| 1945 | xic_create_fontsetname (base_fontname) | ||
| 1946 | char *base_fontname; | ||
| 1947 | { | ||
| 1948 | /* Make a fontset name from the base font name. */ | ||
| 1949 | if (xic_defaut_fontset == base_fontname) | ||
| 1950 | /* There is no base font name, use the default. */ | ||
| 1951 | return base_fontname; | ||
| 1952 | else | ||
| 1953 | { | ||
| 1954 | /* Make a fontset name from the base font name. | ||
| 1955 | The font set will be made of the following elements: | ||
| 1956 | - the base font. | ||
| 1957 | - the base font where the charset spec is replaced by -*-*. | ||
| 1958 | - the same but with the family also replaced with -*-*-. */ | ||
| 1959 | char *p = base_fontname; | ||
| 1960 | char *fontsetname; | ||
| 1961 | int i; | ||
| 1962 | |||
| 1963 | for (i = 0; *p; p++) | ||
| 1964 | if (*p == '-') i++; | ||
| 1965 | if (i != 14) | ||
| 1966 | { /* As the font name doesn't conform to XLFD, we can't | ||
| 1967 | modify it to generalize it to allcs and allfamilies. | ||
| 1968 | Use the specified font plus the default. */ | ||
| 1969 | int len = strlen (base_fontname) + strlen (xic_defaut_fontset) + 2; | ||
| 1970 | fontsetname = xmalloc (len); | ||
| 1971 | bzero (fontsetname, len); | ||
| 1972 | strcpy (fontsetname, base_fontname); | ||
| 1973 | strcat (fontsetname, ","); | ||
| 1974 | strcat (fontsetname, xic_defaut_fontset); | ||
| 1975 | } | ||
| 1976 | else | ||
| 1977 | { | ||
| 1978 | int len; | ||
| 1979 | char *p1 = NULL; | ||
| 1980 | char *font_allcs = NULL; | ||
| 1981 | char *font_allfamilies = NULL; | ||
| 1982 | char *allcs = "*-*-*-*-*-*-*"; | ||
| 1983 | char *allfamilies = "-*-*-"; | ||
| 1984 | |||
| 1985 | for (i = 0, p = base_fontname; i < 8; p++) | ||
| 1986 | { | ||
| 1987 | if (*p == '-') | ||
| 1988 | { | ||
| 1989 | i++; | ||
| 1990 | if (i == 3) | ||
| 1991 | p1 = p + 1; | ||
| 1992 | } | ||
| 1993 | } | ||
| 1994 | /* Build the font spec that matches all charsets. */ | ||
| 1995 | len = p - base_fontname + strlen (allcs) + 1; | ||
| 1996 | font_allcs = (char *) alloca (len); | ||
| 1997 | bzero (font_allcs, len); | ||
| 1998 | bcopy (base_fontname, font_allcs, p - base_fontname); | ||
| 1999 | strcat (font_allcs, allcs); | ||
| 2000 | |||
| 2001 | /* Build the font spec that matches all families. */ | ||
| 2002 | len = p - p1 + strlen (allcs) + strlen (allfamilies) + 1; | ||
| 2003 | font_allfamilies = (char *) alloca (len); | ||
| 2004 | bzero (font_allfamilies, len); | ||
| 2005 | strcpy (font_allfamilies, allfamilies); | ||
| 2006 | bcopy (p1, font_allfamilies + (strlen (allfamilies)), p - p1); | ||
| 2007 | strcat (font_allfamilies, allcs); | ||
| 2008 | |||
| 2009 | /* Build the actual font set name. */ | ||
| 2010 | len = strlen (base_fontname) + strlen (font_allcs) | ||
| 2011 | + strlen (font_allfamilies) + 3; | ||
| 2012 | fontsetname = xmalloc (len); | ||
| 2013 | bzero (fontsetname, len); | ||
| 2014 | strcpy (fontsetname, base_fontname); | ||
| 2015 | strcat (fontsetname, ","); | ||
| 2016 | strcat (fontsetname, font_allcs); | ||
| 2017 | strcat (fontsetname, ","); | ||
| 2018 | strcat (fontsetname, font_allfamilies); | ||
| 2019 | } | ||
| 2020 | return fontsetname; | ||
| 2021 | } | ||
| 2022 | } | ||
| 2023 | |||
| 1942 | static XFontSet | 2024 | static XFontSet |
| 1943 | xic_create_xfontset (f, base_fontname) | 2025 | xic_create_xfontset (f, base_fontname) |
| 1944 | struct frame *f; | 2026 | struct frame *f; |
| @@ -1950,6 +2032,9 @@ xic_create_xfontset (f, base_fontname) | |||
| 1950 | char *def_string; | 2032 | char *def_string; |
| 1951 | Lisp_Object rest, frame; | 2033 | Lisp_Object rest, frame; |
| 1952 | 2034 | ||
| 2035 | if (!base_fontname) | ||
| 2036 | base_fontname = xic_defaut_fontset; | ||
| 2037 | |||
| 1953 | /* See if there is another frame already using same fontset. */ | 2038 | /* See if there is another frame already using same fontset. */ |
| 1954 | FOR_EACH_FRAME (rest, frame) | 2039 | FOR_EACH_FRAME (rest, frame) |
| 1955 | { | 2040 | { |
| @@ -1966,12 +2051,16 @@ xic_create_xfontset (f, base_fontname) | |||
| 1966 | 2051 | ||
| 1967 | if (!xfs) | 2052 | if (!xfs) |
| 1968 | { | 2053 | { |
| 2054 | char *fontsetname = xic_create_fontsetname (base_fontname); | ||
| 2055 | |||
| 1969 | /* New fontset. */ | 2056 | /* New fontset. */ |
| 1970 | xfs = XCreateFontSet (FRAME_X_DISPLAY (f), | 2057 | xfs = XCreateFontSet (FRAME_X_DISPLAY (f), |
| 1971 | base_fontname, &missing_list, | 2058 | fontsetname, &missing_list, |
| 1972 | &missing_count, &def_string); | 2059 | &missing_count, &def_string); |
| 1973 | if (missing_list) | 2060 | if (missing_list) |
| 1974 | XFreeStringList (missing_list); | 2061 | XFreeStringList (missing_list); |
| 2062 | if (fontsetname != base_fontname) | ||
| 2063 | xfree (fontsetname); | ||
| 1975 | } | 2064 | } |
| 1976 | 2065 | ||
| 1977 | if (FRAME_XIC_BASE_FONTNAME (f)) | 2066 | if (FRAME_XIC_BASE_FONTNAME (f)) |
| @@ -2053,6 +2142,11 @@ create_frame_xic (f) | |||
| 2053 | if (FRAME_XIC (f)) | 2142 | if (FRAME_XIC (f)) |
| 2054 | return; | 2143 | return; |
| 2055 | 2144 | ||
| 2145 | /* Create X fontset. */ | ||
| 2146 | xfs = xic_create_xfontset | ||
| 2147 | (f, (FRAME_FONTSET (f) < 0) ? NULL | ||
| 2148 | : (char *) SDATA (fontset_ascii (FRAME_FONTSET (f)))); | ||
| 2149 | |||
| 2056 | xim = FRAME_X_XIM (f); | 2150 | xim = FRAME_X_XIM (f); |
| 2057 | if (xim) | 2151 | if (xim) |
| 2058 | { | 2152 | { |
| @@ -2060,52 +2154,9 @@ create_frame_xic (f) | |||
| 2060 | XPoint spot; | 2154 | XPoint spot; |
| 2061 | XVaNestedList preedit_attr; | 2155 | XVaNestedList preedit_attr; |
| 2062 | XVaNestedList status_attr; | 2156 | XVaNestedList status_attr; |
| 2063 | char *base_fontname; | ||
| 2064 | int fontset; | ||
| 2065 | 2157 | ||
| 2066 | s_area.x = 0; s_area.y = 0; s_area.width = 1; s_area.height = 1; | 2158 | s_area.x = 0; s_area.y = 0; s_area.width = 1; s_area.height = 1; |
| 2067 | spot.x = 0; spot.y = 1; | 2159 | spot.x = 0; spot.y = 1; |
| 2068 | /* Create X fontset. */ | ||
| 2069 | fontset = FRAME_FONTSET (f); | ||
| 2070 | if (fontset < 0) | ||
| 2071 | base_fontname = "-*-*-*-r-normal--14-*-*-*-*-*-*-*"; | ||
| 2072 | else | ||
| 2073 | { | ||
| 2074 | /* Determine the base fontname from the ASCII font name of | ||
| 2075 | FONTSET. */ | ||
| 2076 | char *ascii_font = (char *) SDATA (fontset_ascii (fontset)); | ||
| 2077 | char *p = ascii_font; | ||
| 2078 | int i; | ||
| 2079 | |||
| 2080 | for (i = 0; *p; p++) | ||
| 2081 | if (*p == '-') i++; | ||
| 2082 | if (i != 14) | ||
| 2083 | /* As the font name doesn't conform to XLFD, we can't | ||
| 2084 | modify it to get a suitable base fontname for the | ||
| 2085 | frame. */ | ||
| 2086 | base_fontname = "-*-*-*-r-normal--14-*-*-*-*-*-*-*"; | ||
| 2087 | else | ||
| 2088 | { | ||
| 2089 | int len = strlen (ascii_font) + 1; | ||
| 2090 | char *p1 = NULL; | ||
| 2091 | |||
| 2092 | for (i = 0, p = ascii_font; i < 8; p++) | ||
| 2093 | { | ||
| 2094 | if (*p == '-') | ||
| 2095 | { | ||
| 2096 | i++; | ||
| 2097 | if (i == 3) | ||
| 2098 | p1 = p + 1; | ||
| 2099 | } | ||
| 2100 | } | ||
| 2101 | base_fontname = (char *) alloca (len); | ||
| 2102 | bzero (base_fontname, len); | ||
| 2103 | strcpy (base_fontname, "-*-*-"); | ||
| 2104 | bcopy (p1, base_fontname + 5, p - p1); | ||
| 2105 | strcat (base_fontname, "*-*-*-*-*-*-*"); | ||
| 2106 | } | ||
| 2107 | } | ||
| 2108 | xfs = xic_create_xfontset (f, base_fontname); | ||
| 2109 | 2160 | ||
| 2110 | /* Determine XIC style. */ | 2161 | /* Determine XIC style. */ |
| 2111 | if (xic_style == 0) | 2162 | if (xic_style == 0) |
diff --git a/src/xmenu.c b/src/xmenu.c index e98ee7534a4..07d6fe3d730 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* X Communication module for terminals which understand the X protocol. | 1 | /* X Communication module for terminals which understand the X protocol. |
| 2 | Copyright (C) 1986, 1988, 1993, 1994, 1996, 1999, 2000, 2001, 2003, 2004 | 2 | Copyright (C) 1986, 1988, 1993, 1994, 1996, 1999, 2000, 2001, 2003, 2004, |
| 3 | Free Software Foundation, Inc. | 3 | 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -138,12 +138,7 @@ static Lisp_Object xdialog_show P_ ((FRAME_PTR, int, Lisp_Object, char **)); | |||
| 138 | /* gtk just uses utf-8. */ | 138 | /* gtk just uses utf-8. */ |
| 139 | # define ENCODE_MENU_STRING(str) ENCODE_UTF_8 (str) | 139 | # define ENCODE_MENU_STRING(str) ENCODE_UTF_8 (str) |
| 140 | #else | 140 | #else |
| 141 | /* I'm not convinced ENCODE_SYSTEM is defined correctly, or maybe | 141 | # define ENCODE_MENU_STRING(str) string_make_unibyte (str) |
| 142 | something else should be used here. Except under MS-Windows it | ||
| 143 | just converts to unibyte, but encoding with `locale-coding-system' | ||
| 144 | seems better -- X may actually display the result correctly, and | ||
| 145 | it's not necessarily equivalent to the unibyte text. -- fx */ | ||
| 146 | # define ENCODE_MENU_STRING(str) ENCODE_SYSTEM (str) | ||
| 147 | #endif | 142 | #endif |
| 148 | 143 | ||
| 149 | static void push_menu_item P_ ((Lisp_Object, Lisp_Object, Lisp_Object, | 144 | static void push_menu_item P_ ((Lisp_Object, Lisp_Object, Lisp_Object, |
| @@ -645,10 +640,10 @@ list_of_panes (menu) | |||
| 645 | 640 | ||
| 646 | init_menu_items (); | 641 | init_menu_items (); |
| 647 | 642 | ||
| 648 | for (tail = menu; !NILP (tail); tail = Fcdr (tail)) | 643 | for (tail = menu; CONSP (tail); tail = XCDR (tail)) |
| 649 | { | 644 | { |
| 650 | Lisp_Object elt, pane_name, pane_data; | 645 | Lisp_Object elt, pane_name, pane_data; |
| 651 | elt = Fcar (tail); | 646 | elt = XCAR (tail); |
| 652 | pane_name = Fcar (elt); | 647 | pane_name = Fcar (elt); |
| 653 | CHECK_STRING (pane_name); | 648 | CHECK_STRING (pane_name); |
| 654 | push_menu_pane (ENCODE_MENU_STRING (pane_name), Qnil); | 649 | push_menu_pane (ENCODE_MENU_STRING (pane_name), Qnil); |
| @@ -668,22 +663,22 @@ list_of_items (pane) | |||
| 668 | { | 663 | { |
| 669 | Lisp_Object tail, item, item1; | 664 | Lisp_Object tail, item, item1; |
| 670 | 665 | ||
| 671 | for (tail = pane; !NILP (tail); tail = Fcdr (tail)) | 666 | for (tail = pane; CONSP (tail); tail = XCDR (tail)) |
| 672 | { | 667 | { |
| 673 | item = Fcar (tail); | 668 | item = XCAR (tail); |
| 674 | if (STRINGP (item)) | 669 | if (STRINGP (item)) |
| 675 | push_menu_item (ENCODE_MENU_STRING (item), Qnil, Qnil, Qt, | 670 | push_menu_item (ENCODE_MENU_STRING (item), Qnil, Qnil, Qt, |
| 676 | Qnil, Qnil, Qnil, Qnil); | 671 | Qnil, Qnil, Qnil, Qnil); |
| 677 | else if (NILP (item)) | 672 | else if (CONSP (item)) |
| 678 | push_left_right_boundary (); | ||
| 679 | else | ||
| 680 | { | 673 | { |
| 681 | CHECK_CONS (item); | 674 | item1 = XCAR (item); |
| 682 | item1 = Fcar (item); | ||
| 683 | CHECK_STRING (item1); | 675 | CHECK_STRING (item1); |
| 684 | push_menu_item (ENCODE_MENU_STRING (item1), Qt, Fcdr (item), | 676 | push_menu_item (ENCODE_MENU_STRING (item1), Qt, XCDR (item), |
| 685 | Qt, Qnil, Qnil, Qnil, Qnil); | 677 | Qt, Qnil, Qnil, Qnil, Qnil); |
| 686 | } | 678 | } |
| 679 | else | ||
| 680 | push_left_right_boundary (); | ||
| 681 | |||
| 687 | } | 682 | } |
| 688 | } | 683 | } |
| 689 | 684 | ||
| @@ -802,8 +797,8 @@ cached information about equivalent key sequences. */) | |||
| 802 | if (CONSP (tem)) | 797 | if (CONSP (tem)) |
| 803 | { | 798 | { |
| 804 | window = Fcar (Fcdr (position)); | 799 | window = Fcar (Fcdr (position)); |
| 805 | x = Fcar (tem); | 800 | x = XCAR (tem); |
| 806 | y = Fcar (Fcdr (tem)); | 801 | y = Fcar (XCDR (tem)); |
| 807 | } | 802 | } |
| 808 | else | 803 | else |
| 809 | { | 804 | { |
| @@ -931,11 +926,11 @@ cached information about equivalent key sequences. */) | |||
| 931 | 926 | ||
| 932 | /* The first keymap that has a prompt string | 927 | /* The first keymap that has a prompt string |
| 933 | supplies the menu title. */ | 928 | supplies the menu title. */ |
| 934 | for (tem = menu, i = 0; CONSP (tem); tem = Fcdr (tem)) | 929 | for (tem = menu, i = 0; CONSP (tem); tem = XCDR (tem)) |
| 935 | { | 930 | { |
| 936 | Lisp_Object prompt; | 931 | Lisp_Object prompt; |
| 937 | 932 | ||
| 938 | maps[i++] = keymap = get_keymap (Fcar (tem), 1, 0); | 933 | maps[i++] = keymap = get_keymap (XCAR (tem), 1, 0); |
| 939 | 934 | ||
| 940 | prompt = Fkeymap_prompt (keymap); | 935 | prompt = Fkeymap_prompt (keymap); |
| 941 | if (NILP (title) && !NILP (prompt)) | 936 | if (NILP (title) && !NILP (prompt)) |
| @@ -1750,7 +1745,7 @@ digest_single_submenu (start, end, top_level_items) | |||
| 1750 | #ifndef HAVE_MULTILINGUAL_MENU | 1745 | #ifndef HAVE_MULTILINGUAL_MENU |
| 1751 | if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name)) | 1746 | if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name)) |
| 1752 | { | 1747 | { |
| 1753 | pane_name = ENCODE_SYSTEM (pane_name); | 1748 | pane_name = ENCODE_MENU_STRING (pane_name); |
| 1754 | AREF (menu_items, i + MENU_ITEMS_PANE_NAME) = pane_name; | 1749 | AREF (menu_items, i + MENU_ITEMS_PANE_NAME) = pane_name; |
| 1755 | } | 1750 | } |
| 1756 | #endif | 1751 | #endif |
| @@ -2695,7 +2690,7 @@ xmenu_show (f, x, y, for_click, keymaps, title, error) | |||
| 2695 | #ifndef HAVE_MULTILINGUAL_MENU | 2690 | #ifndef HAVE_MULTILINGUAL_MENU |
| 2696 | if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name)) | 2691 | if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name)) |
| 2697 | { | 2692 | { |
| 2698 | pane_name = ENCODE_SYSTEM (pane_name); | 2693 | pane_name = ENCODE_MENU_STRING (pane_name); |
| 2699 | AREF (menu_items, i + MENU_ITEMS_PANE_NAME) = pane_name; | 2694 | AREF (menu_items, i + MENU_ITEMS_PANE_NAME) = pane_name; |
| 2700 | } | 2695 | } |
| 2701 | #endif | 2696 | #endif |