aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Verona2013-04-30 08:31:50 +0200
committerJoakim Verona2013-04-30 08:31:50 +0200
commit7a1bee4a713304afdf8e58f31f59d3572fa00063 (patch)
tree509b38118c25728eb2ea8ebcb2220da706d8459d
parent23e7d63bcc222e40e6063b6799de50544af8d70b (diff)
parent38d8527bab7f84b94d2e0a759e25a64f33838257 (diff)
downloademacs-7a1bee4a713304afdf8e58f31f59d3572fa00063.tar.gz
emacs-7a1bee4a713304afdf8e58f31f59d3572fa00063.zip
auto upstream
-rw-r--r--ChangeLog5
-rw-r--r--lisp/ChangeLog25
-rw-r--r--lisp/calc/calc.el2
-rw-r--r--lisp/progmodes/octave.el134
-rw-r--r--m4/extern-inline.m414
-rw-r--r--src/ChangeLog17
-rw-r--r--src/coding.c2
-rw-r--r--src/dispextern.h6
-rw-r--r--src/nsfns.m88
9 files changed, 220 insertions, 73 deletions
diff --git a/ChangeLog b/ChangeLog
index a6dfed3dc56..29433c8f132 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
12013-04-29 Paul Eggert <eggert@cs.ucla.edu>
2
3 Merge from gnulib, incorporating:
4 2013-04-28 extern-inline: work around bug in Sun c99
5
12013-04-27 Paul Eggert <eggert@cs.ucla.edu> 62013-04-27 Paul Eggert <eggert@cs.ucla.edu>
2 7
3 Merge from gnulib, incorporating: 8 Merge from gnulib, incorporating:
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 163f2495849..abfd6153288 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,28 @@
12013-04-29 Leo Liu <sdl.web@gmail.com>
2
3 * progmodes/octave.el (octave-font-lock-keywords): Handle 'end' in
4 indexing expression.
5 (octave-continuation-string): Do not use \.
6 (inferior-octave-complete-impossible): Remove.
7 (inferior-octave-completion-table)
8 (inferior-octave-completion-at-point): Remove its uses.
9 (inferior-octave-startup): completion_matches was introduced to
10 Octave in 1996 so safe to assume it.
11 (octave-function-file-comment): Improve to follow how Octave does it.
12 (octave-update-function-file-comment): Tweak.
13
142013-04-29 Leo Liu <sdl.web@gmail.com>
15
16 * progmodes/octave.el (inferior-octave-startup-hook): Obsolete.
17 (inferior-octave-startup): Remove inferior-octave-startup-hook.
18 (octave-function-file-comment): Fix typo.
19 (octave-sync-function-file-names): Use read-char-choice.
20
212013-04-28 Jay Belanger <jay.p.belanger@gmail.com>
22
23 * calc/calc.el (math-normalize): Don't set `math-normalize-error'
24 to t for the less important warnings.
25
12013-04-27 Darren Hoo <darren.hoo@gmail.com> (tiny change) 262013-04-27 Darren Hoo <darren.hoo@gmail.com> (tiny change)
2 27
3 * isearch.el (isearch-fail-pos): Check for empty `cmds'. (Bug#14268) 28 * isearch.el (isearch-fail-pos): Check for empty `cmds'. (Bug#14268)
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index c35e7650254..bd5c9089bcc 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -2701,7 +2701,6 @@ largest Emacs integer.")
2701 (cons (car math-normalize-a) args)) 2701 (cons (car math-normalize-a) args))
2702 nil) 2702 nil)
2703 (wrong-type-argument 2703 (wrong-type-argument
2704 (setq math-normalize-error t)
2705 (or calc-next-why 2704 (or calc-next-why
2706 (calc-record-why "Wrong type of argument" 2705 (calc-record-why "Wrong type of argument"
2707 (cons (car math-normalize-a) args))) 2706 (cons (car math-normalize-a) args)))
@@ -2712,7 +2711,6 @@ largest Emacs integer.")
2712 (cons (car math-normalize-a) args)) 2711 (cons (car math-normalize-a) args))
2713 nil) 2712 nil)
2714 (inexact-result 2713 (inexact-result
2715 (setq math-normalize-error t)
2716 (calc-record-why "No exact representation for result" 2714 (calc-record-why "No exact representation for result"
2717 (cons (car math-normalize-a) args)) 2715 (cons (car math-normalize-a) args))
2718 nil) 2716 nil)
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el
index b8fbe6a90a7..30b520b75a0 100644
--- a/lisp/progmodes/octave.el
+++ b/lisp/progmodes/octave.el
@@ -155,6 +155,17 @@ parenthetical grouping.")
155 octave-text-functions)) 155 octave-text-functions))
156 "\\)\\_>") 156 "\\)\\_>")
157 'font-lock-keyword-face) 157 'font-lock-keyword-face)
158 ;; Note: 'end' also serves as the last index in an indexing expression.
159 ;; Ref: http://www.mathworks.com/help/matlab/ref/end.html
160 '("\\_<end\\_>" (0 (save-excursion
161 (condition-case nil
162 (progn
163 (goto-char (match-beginning 0))
164 (backward-up-list)
165 (unless (eq (char-after) ?\()
166 font-lock-keyword-face))
167 (error font-lock-keyword-face)))
168 t))
158 ;; Fontify all builtin operators. 169 ;; Fontify all builtin operators.
159 (cons "\\(&\\||\\|<=\\|>=\\|==\\|<\\|>\\|!=\\|!\\)" 170 (cons "\\(&\\||\\|<=\\|>=\\|==\\|<\\|>\\|!=\\|!\\)"
160 (if (boundp 'font-lock-builtin-face) 171 (if (boundp 'font-lock-builtin-face)
@@ -321,15 +332,17 @@ newline or semicolon after an else or end keyword."
321 "Extra indentation applied to Octave continuation lines." 332 "Extra indentation applied to Octave continuation lines."
322 :type 'integer 333 :type 'integer
323 :group 'octave) 334 :group 'octave)
335
324(eval-and-compile 336(eval-and-compile
325 (defconst octave-continuation-marker-regexp "\\\\\\|\\.\\.\\.")) 337 (defconst octave-continuation-marker-regexp "\\\\\\|\\.\\.\\."))
338
326(defvar octave-continuation-regexp 339(defvar octave-continuation-regexp
327 (concat "[^#%\n]*\\(" octave-continuation-marker-regexp 340 (concat "[^#%\n]*\\(" octave-continuation-marker-regexp
328 "\\)\\s-*\\(\\s<.*\\)?$")) 341 "\\)\\s-*\\(\\s<.*\\)?$"))
329(defcustom octave-continuation-string "\\" 342
330 "Character string used for Octave continuation lines. Normally \\." 343;; Char \ is considered a bad decision for continuing a line.
331 :type 'string 344(defconst octave-continuation-string "..."
332 :group 'octave) 345 "Character string used for Octave continuation lines.")
333 346
334(defvar octave-mode-imenu-generic-expression 347(defvar octave-mode-imenu-generic-expression
335 (list 348 (list
@@ -641,10 +654,8 @@ the regular expression `comint-prompt-regexp', a buffer local variable."
641(defvar inferior-octave-output-string nil) 654(defvar inferior-octave-output-string nil)
642(defvar inferior-octave-receive-in-progress nil) 655(defvar inferior-octave-receive-in-progress nil)
643 656
644(defvar inferior-octave-startup-hook nil) 657(define-obsolete-variable-alias 'inferior-octave-startup-hook
645 658 'inferior-octave-mode-hook "24.4")
646(defvar inferior-octave-complete-impossible nil
647 "Non-nil means that `inferior-octave-complete' is impossible.")
648 659
649(defvar inferior-octave-has-built-in-variables nil 660(defvar inferior-octave-has-built-in-variables nil
650 "Non-nil means that Octave has built-in variables.") 661 "Non-nil means that Octave has built-in variables.")
@@ -777,28 +788,20 @@ startup file, `~/.emacs-octave'."
777 'identity inferior-octave-output-list "\n") 788 'identity inferior-octave-output-list "\n")
778 "\n")) 789 "\n"))
779 inferior-octave-output-string)) 790 inferior-octave-output-string))
780 ;; Next, we check whether Octave supports `completion_matches' ...
781 (inferior-octave-send-list-and-digest
782 (list "exist \"completion_matches\"\n"))
783 (setq inferior-octave-complete-impossible
784 (not (string-match "5$" (car inferior-octave-output-list))))
785 791
786 ;; And finally, everything is back to normal. 792 ;; And finally, everything is back to normal.
787 (set-process-filter proc 'inferior-octave-output-filter) 793 (set-process-filter proc 'inferior-octave-output-filter)
788 (run-hooks 'inferior-octave-startup-hook)
789 (run-hooks 'inferior-octave-startup-hook)
790 ;; Just in case, to be sure a cd in the startup file 794 ;; Just in case, to be sure a cd in the startup file
791 ;; won't have detrimental effects. 795 ;; won't have detrimental effects.
792 (inferior-octave-resync-dirs))) 796 (inferior-octave-resync-dirs)))
793 797
794(defun inferior-octave-completion-table () 798(defun inferior-octave-completion-table ()
795 (unless inferior-octave-complete-impossible 799 (completion-table-dynamic
796 (completion-table-dynamic 800 (lambda (command)
797 (lambda (command) 801 (inferior-octave-send-list-and-digest
798 (inferior-octave-send-list-and-digest 802 (list (concat "completion_matches (\"" command "\");\n")))
799 (list (concat "completion_matches (\"" command "\");\n"))) 803 (sort (delete-dups inferior-octave-output-list)
800 (sort (delete-dups inferior-octave-output-list) 804 'string-lessp))))
801 'string-lessp)))))
802 805
803(defun inferior-octave-completion-at-point () 806(defun inferior-octave-completion-at-point ()
804 "Return the data to complete the Octave symbol at point." 807 "Return the data to complete the Octave symbol at point."
@@ -807,13 +810,8 @@ startup file, `~/.emacs-octave'."
807 (save-excursion 810 (save-excursion
808 (skip-syntax-backward "w_" (comint-line-beginning-position)) 811 (skip-syntax-backward "w_" (comint-line-beginning-position))
809 (point)))) 812 (point))))
810 (cond ((eq start end) nil) 813 (when (> end start)
811 (inferior-octave-complete-impossible 814 (list start end (inferior-octave-completion-table)))))
812 (message (concat
813 "Your Octave does not have `completion_matches'. "
814 "Please upgrade to version 2.X."))
815 nil)
816 (t (list start end (inferior-octave-completion-table))))))
817 815
818(define-obsolete-function-alias 'inferior-octave-complete 816(define-obsolete-function-alias 'inferior-octave-complete
819 'completion-at-point "24.1") 817 'completion-at-point "24.1")
@@ -966,25 +964,23 @@ The value is (START END NAME-START NAME-END) of the function."
966 964
967;;; First non-copyright comment block 965;;; First non-copyright comment block
968(defun octave-function-file-comment () 966(defun octave-function-file-comment ()
969 "Beginnning and end positions of the function file comment." 967 "Beginning and end positions of the function file comment."
970 (save-excursion 968 (save-excursion
971 (goto-char (point-min)) 969 (goto-char (point-min))
972 (let ((bound (progn (forward-comment (point-max)) (point)))) 970 ;; Copyright block: octave/libinterp/parse-tree/lex.ll around line 1634
973 (goto-char (point-min)) 971 (while (save-excursion
974 ;; Copyright block: octave/libinterp/parse-tree/lex.ll around line 1634 972 (when (comment-search-forward (point-max) t)
975 (when (save-excursion 973 (when (eq (char-after) ?\{) ; case of block comment
976 (comment-search-forward bound t) 974 (forward-char 1))
977 (when (eq (char-after) ?\{) ; case of block comment 975 (skip-syntax-forward "-")
978 (forward-char 1)) 976 (let ((case-fold-search t))
979 (skip-syntax-forward "-") 977 (looking-at-p "\\(?:copyright\\|author\\)\\_>"))))
980 (let ((case-fold-search t)) 978 (octave-skip-comment-forward (point-max)))
981 (looking-at-p "\\(?:copyright\\|author\\)\\_>"))) 979 (let ((beg (comment-search-forward (point-max) t)))
982 (octave-skip-comment-forward bound)) 980 (when beg
983 (let ((beg (comment-search-forward bound t))) 981 (goto-char beg)
984 (when beg 982 (octave-skip-comment-forward (point-max))
985 (goto-char beg) 983 (list beg (point))))))
986 (octave-skip-comment-forward bound)
987 (list beg (point)))))))
988 984
989(defun octave-sync-function-file-names () 985(defun octave-sync-function-file-names ()
990 "Ensure function name agree with function file name. 986 "Ensure function name agree with function file name.
@@ -994,17 +990,32 @@ See Info node `(octave)Function Files'."
994 (pcase-let ((`(,start ,_end ,name-start ,name-end) 990 (pcase-let ((`(,start ,_end ,name-start ,name-end)
995 (octave-function-file-p))) 991 (octave-function-file-p)))
996 (when (and start name-start) 992 (when (and start name-start)
997 (let ((func (buffer-substring name-start name-end)) 993 (let* ((func (buffer-substring name-start name-end))
998 (file (file-name-sans-extension 994 (file (file-name-sans-extension
999 (file-name-nondirectory buffer-file-name)))) 995 (file-name-nondirectory buffer-file-name)))
1000 (save-excursion 996 (help-form (format "\
1001 (when (and (not (equal file func)) 997a: Use function name `%s'
1002 (progn 998b: Use file name `%s'
1003 (goto-char name-start) 999q: Don't fix\n" func file))
1004 (yes-or-no-p 1000 (c (unless (equal file func)
1005 "Function name different from file name. Fix? "))) 1001 (save-window-excursion
1006 (delete-region name-start name-end) 1002 (help-form-show)
1007 (insert file)))))))) 1003 (read-char-choice
1004 "Which name to use? (a/b/q) " '(?a ?b ?q))))))
1005 (pcase c
1006 (`?a (let ((newname (expand-file-name
1007 (concat func (file-name-extension
1008 buffer-file-name t)))))
1009 (when (or (not (file-exists-p newname))
1010 (yes-or-no-p
1011 (format "Target file %s exists; proceed? " newname)))
1012 (when (file-exists-p buffer-file-name)
1013 (rename-file buffer-file-name newname t))
1014 (set-visited-file-name newname))))
1015 (`?b (save-excursion
1016 (goto-char name-start)
1017 (delete-region name-start name-end)
1018 (insert file)))))))))
1008 1019
1009(defun octave-update-function-file-comment (beg end) 1020(defun octave-update-function-file-comment (beg end)
1010 "Query replace function names in function file comment." 1021 "Query replace function names in function file comment."
@@ -1023,11 +1034,10 @@ See Info node `(octave)Function Files'."
1023 (error "Function name not found"))) 1034 (error "Function name not found")))
1024 (old-func (progn 1035 (old-func (progn
1025 (goto-char beg) 1036 (goto-char beg)
1026 (when (and (re-search-forward 1037 (when (re-search-forward
1027 "usage:\\|@deftypefn" end t) 1038 "[=}]\\s-*\\(\\(?:\\sw\\|\\s_\\)+\\)\\_>"
1028 (re-search-forward 1039 (min (line-end-position 4) end)
1029 "[=}]\\s-*\\(\\(?:\\sw\\|\\s_\\)+\\)\\_>" 1040 t)
1030 (line-end-position) t))
1031 (match-string 1)))) 1041 (match-string 1))))
1032 (old-func (read-string (format (if old-func 1042 (old-func (read-string (format (if old-func
1033 "Name to replace (default %s): " 1043 "Name to replace (default %s): "
diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4
index 0152f29326b..94b46dde07d 100644
--- a/m4/extern-inline.m4
+++ b/m4/extern-inline.m4
@@ -21,13 +21,21 @@ AC_DEFUN([gl_EXTERN_INLINE],
21 Suppress extern inline with HP-UX cc, as it appears to be broken; see 21 Suppress extern inline with HP-UX cc, as it appears to be broken; see
22 <http://lists.gnu.org/archive/html/bug-texinfo/2013-02/msg00030.html>. 22 <http://lists.gnu.org/archive/html/bug-texinfo/2013-02/msg00030.html>.
23 23
24 Suppress the use of extern inline on Apple's platforms, 24 Suppress extern inline with Sun C in standards-conformance mode, as it
25 as Libc-825.25 (2012-09-19) is incompatible with it; see 25 mishandles inline functions that call each other. E.g., for 'inline void f
26 (void) { } inline void g (void) { f (); }', c99 incorrectly complains
27 'reference to static identifier "f" in extern inline function'.
28 This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
29
30 Suppress the use of extern inline on Apple's platforms, as Libc at least
31 through Libc-825.26 (2013-04-09) is incompatible with it; see, e.g.,
26 <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>. 32 <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
27 Perhaps Apple will fix this some day. */ 33 Perhaps Apple will fix this some day. */
28#if ((__GNUC__ \ 34#if ((__GNUC__ \
29 ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ 35 ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
30 : 199901L <= __STDC_VERSION__ && !defined __HP_cc) \ 36 : (199901L <= __STDC_VERSION__ \
37 && !defined __HP_cc \
38 && !(defined __SUNPRO_C && __STDC__))) \
31 && !defined __APPLE__) 39 && !defined __APPLE__)
32# define _GL_INLINE inline 40# define _GL_INLINE inline
33# define _GL_EXTERN_INLINE extern inline 41# define _GL_EXTERN_INLINE extern inline
diff --git a/src/ChangeLog b/src/ChangeLog
index c9d458c3479..2e9e19fd547 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,20 @@
12013-04-28 Eli Zaretskii <eliz@gnu.org>
2
3 * coding.c (decode_coding_gap): Don't remove the character before
4 a newline unless it's a CR character. (Bug#14287)
5
62013-04-28 Dan Nicolaescu <dann@gnu.org>
7
8 * dispextern.h (struct face): Move enum face_underline_type
9 earlier so that bitfields can be in the same word.
10
112013-04-28 Jan Djärv <jan.h.d@swipnet.se>
12
13 * nsfns.m (handlePanelKeys): New function.
14 (EmacsOpenPanel:performKeyEquivalent:)
15 (EmacsSavePanel:performKeyEquivalent:): Call handlePanelKeys to handle
16 arrows/function/control and copy/paste keys (Bug#14296).
17
12013-04-27 Juri Linkov <juri@jurta.org> 182013-04-27 Juri Linkov <juri@jurta.org>
2 19
3 * callint.c (Fcall_interactively): Call `Qread_number' for 20 * callint.c (Fcall_interactively): Call `Qread_number' for
diff --git a/src/coding.c b/src/coding.c
index b9fb92c481b..f6664e179b7 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -7774,7 +7774,7 @@ decode_coding_gap (struct coding_system *coding,
7774 while (src_beg < src) 7774 while (src_beg < src)
7775 { 7775 {
7776 *--dst = *--src; 7776 *--dst = *--src;
7777 if (*src == '\n') 7777 if (*src == '\n' && src > src_beg && src[-1] == '\r')
7778 src--; 7778 src--;
7779 } 7779 }
7780 diff = dst - src; 7780 diff = dst - src;
diff --git a/src/dispextern.h b/src/dispextern.h
index 70a5ba27b8d..45a893dcc62 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -1601,13 +1601,13 @@ struct face
1601 shadow colors derived from the background color of the face. */ 1601 shadow colors derived from the background color of the face. */
1602 enum face_box_type box; 1602 enum face_box_type box;
1603 1603
1604 /* Style of underlining. */
1605 enum face_underline_type underline_type;
1606
1604 /* If `box' above specifies a 3D type, 1 means use box_color for 1607 /* If `box' above specifies a 3D type, 1 means use box_color for
1605 drawing shadows. */ 1608 drawing shadows. */
1606 unsigned use_box_color_for_shadows_p : 1; 1609 unsigned use_box_color_for_shadows_p : 1;
1607 1610
1608 /* Style of underlining. */
1609 enum face_underline_type underline_type;
1610
1611 /* Non-zero if text in this face should be underlined, overlined, 1611 /* Non-zero if text in this face should be underlined, overlined,
1612 strike-through or have a box drawn around it. */ 1612 strike-through or have a box drawn around it. */
1613 unsigned underline_p : 1; 1613 unsigned underline_p : 1;
diff --git a/src/nsfns.m b/src/nsfns.m
index a483f847dec..0d6d0e72835 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -1477,7 +1477,7 @@ Optional arg DIR_ONLY_P, if non-nil, means choose only directories. */)
1477 [panel setCanChooseFiles: YES]; 1477 [panel setCanChooseFiles: YES];
1478 } 1478 }
1479 1479
1480 block_input (); 1480 block_input ();
1481#if defined (NS_IMPL_COCOA) && \ 1481#if defined (NS_IMPL_COCOA) && \
1482 MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 1482 MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
1483 if (! NILP (mustmatch) || ! NILP (dir_only_p)) 1483 if (! NILP (mustmatch) || ! NILP (dir_only_p))
@@ -2544,6 +2544,75 @@ Value is t if tooltip was open, nil otherwise. */)
2544 2544
2545 ========================================================================== */ 2545 ========================================================================== */
2546 2546
2547/*
2548 Handle arrow/function/control keys and copy/paste/cut in file dialogs.
2549 Return YES if handeled, NO if not.
2550 */
2551static BOOL
2552handlePanelKeys (NSSavePanel *panel, NSEvent *theEvent)
2553{
2554 NSString *s;
2555 int i;
2556 BOOL ret = NO;
2557
2558 if ([theEvent type] != NSKeyDown) return NO;
2559 s = [theEvent characters];
2560
2561 for (i = 0; i < [s length]; ++i)
2562 {
2563 int ch = (int) [s characterAtIndex: i];
2564 switch (ch)
2565 {
2566 case NSHomeFunctionKey:
2567 case NSDownArrowFunctionKey:
2568 case NSUpArrowFunctionKey:
2569 case NSLeftArrowFunctionKey:
2570 case NSRightArrowFunctionKey:
2571 case NSPageUpFunctionKey:
2572 case NSPageDownFunctionKey:
2573 case NSEndFunctionKey:
2574 [panel sendEvent: theEvent];
2575 ret = YES;
2576 break;
2577 /* As we don't have the standard key commands for
2578 copy/paste/cut/select-all in our edit menu, we must handle
2579 them here. TODO: handle Emacs key bindings for copy/cut/select-all
2580 here, paste works, because we have that in our Edit menu.
2581 I.e. refactor out code in nsterm.m, keyDown: to figure out the
2582 correct modifier.
2583 */
2584 case 'x': // Cut
2585 case 'c': // Copy
2586 case 'v': // Paste
2587 case 'a': // Select all
2588 if ([theEvent modifierFlags] & NSCommandKeyMask)
2589 {
2590 [NSApp sendAction:
2591 (ch == 'x'
2592 ? @selector(cut:)
2593 : (ch == 'c'
2594 ? @selector(copy:)
2595 : (ch == 'v'
2596 ? @selector(paste:)
2597 : @selector(selectAll:))))
2598 to:nil from:panel];
2599 ret = YES;
2600 }
2601 default:
2602 // Send all control keys, as the text field supports C-a, C-f, C-e
2603 // C-b and more.
2604 if ([theEvent modifierFlags] & NSControlKeyMask)
2605 {
2606 [panel sendEvent: theEvent];
2607 ret = YES;
2608 }
2609 break;
2610 }
2611 }
2612
2613
2614 return ret;
2615}
2547 2616
2548@implementation EmacsSavePanel 2617@implementation EmacsSavePanel
2549#ifdef NS_IMPL_COCOA 2618#ifdef NS_IMPL_COCOA
@@ -2572,6 +2641,14 @@ Value is t if tooltip was open, nil otherwise. */)
2572{ 2641{
2573 return ns_directory_from_panel (self); 2642 return ns_directory_from_panel (self);
2574} 2643}
2644
2645- (BOOL)performKeyEquivalent:(NSEvent *)theEvent
2646{
2647 BOOL ret = handlePanelKeys (self, theEvent);
2648 if (! ret)
2649 ret = [super performKeyEquivalent:theEvent];
2650 return ret;
2651}
2575@end 2652@end
2576 2653
2577 2654
@@ -2609,7 +2686,14 @@ Value is t if tooltip was open, nil otherwise. */)
2609{ 2686{
2610 return ns_directory_from_panel (self); 2687 return ns_directory_from_panel (self);
2611} 2688}
2612 2689- (BOOL)performKeyEquivalent:(NSEvent *)theEvent
2690{
2691 // NSOpenPanel inherits NSSavePanel, so passing self is OK.
2692 BOOL ret = handlePanelKeys (self, theEvent);
2693 if (! ret)
2694 ret = [super performKeyEquivalent:theEvent];
2695 return ret;
2696}
2613@end 2697@end
2614 2698
2615 2699