From 66cdbd3a0e4e883c1a9b7f1d092fcbde2a66c1ec Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 8 Oct 2010 11:36:38 +0200 Subject: [PATCH 01/12] make-dist: Don't distribute src/buildobj.h. --- ChangeLog | 4 ++++ make-dist | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c51dced40ef..1ed9dc25885 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-10-08 Eli Zaretskii + + * make-dist: Don't distribute src/buildobj.h. + 2010-06-23 Glenn Morris * info/dir: Start descriptions in column 32, per Texinfo convention. diff --git a/make-dist b/make-dist index a5c600ab37e..5e81da5d70f 100755 --- a/make-dist +++ b/make-dist @@ -460,7 +460,7 @@ echo "Making links to \`src'" ln makefile.w32-in ../${tempdir}/src ln .gdbinit .dbxinit ../${tempdir}/src cd ../${tempdir}/src - rm -f config.h epaths.h Makefile Makefile.c + rm -f config.h epaths.h Makefile Makefile.c buildobj.h rm -f =* TAGS) echo "Making links to \`src/bitmaps'" From 47a814f53002be4ca5448e1956e8aaad5345bc27 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 8 Oct 2010 11:52:34 +0200 Subject: [PATCH 02/12] Mention the bug number for the last change in make-dist. --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1ed9dc25885..c25b54e853f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,6 @@ 2010-10-08 Eli Zaretskii - * make-dist: Don't distribute src/buildobj.h. + * make-dist: Don't distribute src/buildobj.h. (Bug#7167) 2010-06-23 Glenn Morris From 2e828c79a3907ce76d96517b8a878398c6cecb0a Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Fri, 8 Oct 2010 13:40:23 +0200 Subject: [PATCH 03/12] * dbusbind.c (xd_get_dispatch_status): Return a Lisp_Object. (xd_pending_messages): Catch xd_get_dispatch_status calls. --- src/ChangeLog | 5 +++++ src/dbusbind.c | 27 +++++++++++++++++++-------- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0aa12b4aabe..d63f417ed42 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-10-08 Michael Albinus + + * dbusbind.c (xd_get_dispatch_status): Return a Lisp_Object. + (xd_pending_messages): Catch xd_get_dispatch_status calls. + 2010-10-08 Kenichi Handa * coding.c (complement_process_encoding_system): Fix previous change. diff --git a/src/dbusbind.c b/src/dbusbind.c index 460cf52364e..60697c8a4e9 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -1571,7 +1571,7 @@ usage: (dbus-send-signal BUS SERVICE PATH INTERFACE SIGNAL &rest ARGS) */) /* Check, whether there is pending input in the message queue of the D-Bus BUS. BUS is a Lisp symbol, either :system or :session. */ -int +static Lisp_Object xd_get_dispatch_status (bus) Lisp_Object bus; { @@ -1587,23 +1587,34 @@ xd_get_dispatch_status (bus) return (dbus_connection_get_dispatch_status (connection) == DBUS_DISPATCH_DATA_REMAINS) - ? TRUE : FALSE; + ? Qt : Qnil; } /* Check for queued incoming messages from the system and session buses. */ int xd_pending_messages () { + int ret = FALSE; + xd_in_read_queued_messages = 1; /* Vdbus_registered_objects_table will be initialized as hash table in dbus.el. When this package isn't loaded yet, it doesn't make sense to handle D-Bus messages. */ - return (HASH_TABLE_P (Vdbus_registered_objects_table) - ? (xd_get_dispatch_status (QCdbus_system_bus) - || ((getenv ("DBUS_SESSION_BUS_ADDRESS") != NULL) - ? xd_get_dispatch_status (QCdbus_session_bus) - : FALSE)) - : FALSE); + if (HASH_TABLE_P (Vdbus_registered_objects_table)) + { + ret = (!NILP (internal_catch (Qdbus_error, xd_get_dispatch_status, + QCdbus_system_bus))); + if (ret) goto theend; + + ret = ((getenv ("DBUS_SESSION_BUS_ADDRESS") != NULL) && + (!NILP (internal_catch (Qdbus_error, xd_get_dispatch_status, + QCdbus_session_bus)))); + } + + /* Return. */ + theend: + xd_in_read_queued_messages = 0; + return ret; } /* Read queued incoming message of the D-Bus BUS. BUS is a Lisp From a653652edcdb496f9a2253ff492d5cf62e5da5ee Mon Sep 17 00:00:00 2001 From: Ulrich Mueller Date: Fri, 8 Oct 2010 17:37:11 -0700 Subject: [PATCH 04/12] * doc/man/emacs.1: Update license description. --- doc/man/ChangeLog | 4 ++++ doc/man/emacs.1 | 7 ++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/man/ChangeLog b/doc/man/ChangeLog index 3bee2a1011a..a2c8cd49134 100644 --- a/doc/man/ChangeLog +++ b/doc/man/ChangeLog @@ -1,3 +1,7 @@ +2010-10-09 Ulrich Mueller + + * emacs.1: Update license description. + 2010-08-26 Sven Joachim * emacs.1: Mention "maximized" value for the "fullscreen" X resource. diff --git a/doc/man/emacs.1 b/doc/man/emacs.1 index b192514eadf..d8885704c36 100644 --- a/doc/man/emacs.1 +++ b/doc/man/emacs.1 @@ -596,10 +596,7 @@ file /usr/local/share/emacs/$VERSION/etc/MAILINGLISTS. .I Emacs is free; anyone may redistribute copies of .I Emacs -to -anyone under the terms stated in the -.I Emacs -General Public License, +to anyone under the terms stated in the GNU General Public License, a copy of which accompanies each copy of .I Emacs and which also @@ -611,7 +608,7 @@ may sometimes be received packaged with distributions of Unix systems, but it is never included in the scope of any license covering those systems. Such inclusion violates the terms on which distribution is permitted. -In fact, the primary purpose of the General Public License is to +In fact, the primary purpose of the GNU General Public License is to prohibit anyone from attaching any other restrictions to redistribution of .IR Emacs . From c7d6d8a1ee9eaadb7d3ad40862fe602e95c4d839 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 8 Oct 2010 17:41:03 -0700 Subject: [PATCH 05/12] * lisp/mail/mail-utils.el (mail-mbox-from): Also try return-path. (Per 8-year old observation: http://lists.gnu.org/archive/html/bug-gnu-emacs/2002-06/msg00176.html ) --- lisp/ChangeLog | 4 ++++ lisp/mail/mail-utils.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 95a8287f005..0b10e2f3cc5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-10-09 Glenn Morris + + * mail/mail-utils.el (mail-mbox-from): Also try return-path. + 2010-10-08 Glenn Morris * emacs-lisp/cl-compat.el, emacs-lisp/lmenu.el: Move to obsolete/. diff --git a/lisp/mail/mail-utils.el b/lisp/mail/mail-utils.el index 1c527f22113..a8def04100e 100644 --- a/lisp/mail/mail-utils.el +++ b/lisp/mail/mail-utils.el @@ -401,6 +401,7 @@ The buffer should be narrowed to just the header." (let ((from (or (mail-fetch-field "from") (mail-fetch-field "really-from") (mail-fetch-field "sender") + (mail-fetch-field "return-path") "unknown")) (date (mail-fetch-field "date"))) (format "From %s %s\n" (mail-strip-quoted-names from) @@ -411,5 +412,4 @@ The buffer should be narrowed to just the header." (provide 'mail-utils) -;; arch-tag: b24aec2f-fd65-4ceb-9e39-3cc2827036fd ;;; mail-utils.el ends here From d15f9a2b499f937d1e962c5dfcebb2024f82de86 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 8 Oct 2010 17:44:53 -0700 Subject: [PATCH 06/12] Rename another shadow.el function. * lisp/emacs-lisp/shadow.el (find-emacs-lisp-shadows): Rename it... (load-path-shadows-find): ... to this. (list-load-path-shadows): Update for above change. --- lisp/ChangeLog | 4 ++++ lisp/emacs-lisp/shadow.el | 11 +++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0b10e2f3cc5..cf32b040c44 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2010-10-09 Glenn Morris + * emacs-lisp/shadow.el (find-emacs-lisp-shadows): Rename it... + (load-path-shadows-find): ... to this. + (list-load-path-shadows): Update for above change. + * mail/mail-utils.el (mail-mbox-from): Also try return-path. 2010-10-08 Glenn Morris diff --git a/lisp/emacs-lisp/shadow.el b/lisp/emacs-lisp/shadow.el index 15cb37b8ff3..fe32a302045 100644 --- a/lisp/emacs-lisp/shadow.el +++ b/lisp/emacs-lisp/shadow.el @@ -24,7 +24,7 @@ ;;; Commentary: -;; The functions in this file detect (`find-emacs-lisp-shadows') +;; The functions in this file detect (`load-path-shadows-find') ;; and display (`list-load-path-shadows') potential load-path ;; problems that arise when Emacs Lisp files "shadow" each other. ;; @@ -65,7 +65,7 @@ This is slower, but filters out some innocuous shadowing." :type 'boolean :group 'lisp-shadow) -(defun find-emacs-lisp-shadows (&optional path) +(defun load-path-shadows-find (&optional path) "Return a list of Emacs Lisp files that create shadows. This function does the work for `list-load-path-shadows'. @@ -141,6 +141,9 @@ See the documentation for `list-load-path-shadows' for further information." ;; Return the list of shadowings. shadows)) +(define-obsolete-function-alias 'find-emacs-lisp-shadows + 'load-path-shadows-find "23.3") + ;; Return true if neither file exists, or if both exist and have identical ;; contents. (defun load-path-shadows-same-file-or-nonexistent (f1 f2) @@ -196,7 +199,7 @@ XXX.elc in an early directory \(that does not contain XXX.el\) is considered to shadow a later file XXX.el, and vice-versa. Shadowings are located by calling the (non-interactive) companion -function, `find-emacs-lisp-shadows'." +function, `load-path-shadows-find'." (interactive) (let* ((path (copy-sequence load-path)) (tem path) @@ -220,7 +223,7 @@ function, `find-emacs-lisp-shadows'." (setq tem nil))) (setq tem (cdr tem))))) - (let* ((shadows (find-emacs-lisp-shadows path)) + (let* ((shadows (load-path-shadows-find path)) (n (/ (length shadows) 2)) (msg (format "%s Emacs Lisp load-path shadowing%s found" (if (zerop n) "No" (concat "\n" (number-to-string n))) From c58059f23e10ebb3088986f1b310a80a603df20a Mon Sep 17 00:00:00 2001 From: David Koppelman Date: Sat, 9 Oct 2010 00:09:19 -0400 Subject: [PATCH 07/12] Fix hi-lock-mode interactions with font-lock. * hi-lock.el (hi-lock-font-lock-hook): Check font-lock-fontified instead of font-lock-mode before adding keywords. Removed hi-lock-mode off code. Removed inhibit hack. (hi-lock-set-pattern): Only add keywords if font-lock-fontified non-nil; removed hook inhibit hack. --- lisp/ChangeLog | 8 ++++++++ lisp/hi-lock.el | 25 +++++++------------------ 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cf32b040c44..59f5b55ec2a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2010-10-05 David Koppelman + + * hi-lock.el (hi-lock-font-lock-hook): Check font-lock-fontified + instead of font-lock-mode before adding keywords. Removed + hi-lock-mode off code. Removed inhibit hack. + (hi-lock-set-pattern): Only add keywords if font-lock-fontified + non-nil; removed hook inhibit hack. + 2010-10-09 Glenn Morris * emacs-lisp/shadow.el (find-emacs-lisp-shadows): Rename it... diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index de4e2ff0dfd..0273de14edd 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el @@ -564,23 +564,15 @@ not suitable." 'face-name-history (cdr hi-lock-face-defaults)))) -(defvar hi-lock--inhibit-font-lock-hook nil - "Inhibit the action of `hi-lock-font-lock-hook'. -This is used by `hi-lock-set-pattern'.") - (defun hi-lock-set-pattern (regexp face) "Highlight REGEXP with face FACE." - (let ((pattern (list regexp (list 0 (list 'quote face) t))) - ;; The call to `font-lock-add-keywords' below might disable - ;; and re-enable font-lock mode. If so, we don't want - ;; `hi-lock-font-lock-hook' to run. This can be removed once - ;; Bug#635 is fixed. -- cyd - (hi-lock--inhibit-font-lock-hook t)) + (let ((pattern (list regexp (list 0 (list 'quote face) t)))) (unless (member pattern hi-lock-interactive-patterns) - (font-lock-add-keywords nil (list pattern) t) (push pattern hi-lock-interactive-patterns) (if font-lock-fontified - (font-lock-fontify-buffer) + (progn + (font-lock-add-keywords nil (list pattern) t) + (font-lock-fontify-buffer)) (let* ((serial (hi-lock-string-serialize regexp)) (range-min (- (point) (/ hi-lock-highlight-range 2))) (range-max (+ (point) (/ hi-lock-highlight-range 2))) @@ -641,12 +633,9 @@ This is used by `hi-lock-set-pattern'.") (defun hi-lock-font-lock-hook () "Add hi-lock patterns to font-lock's." - (unless hi-lock--inhibit-font-lock-hook - (if font-lock-mode - (progn - (font-lock-add-keywords nil hi-lock-file-patterns t) - (font-lock-add-keywords nil hi-lock-interactive-patterns t)) - (hi-lock-mode -1)))) + (when font-lock-fontified + (font-lock-add-keywords nil hi-lock-file-patterns t) + (font-lock-add-keywords nil hi-lock-interactive-patterns t))) (defvar hi-lock-string-serialize-hash (make-hash-table :test 'equal) From 4897601e9ff2a43737300e9c95e398dbf7a46662 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Sat, 9 Oct 2010 23:51:42 +1300 Subject: [PATCH 08/12] (gdb-mouse-toggle-breakpoint-margin) (gdb-mouse-toggle-breakpoint-fringe): Correct regexp to work when breakpoint number exceeds nine. --- lisp/ChangeLog | 6 ++++++ lisp/progmodes/gdb-ui.el | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 59f5b55ec2a..5800459f20a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2010-10-09 Richard Sharman (tiny change) + + * progmodes/gdb-ui.el (gdb-mouse-toggle-breakpoint-margin) + (gdb-mouse-toggle-breakpoint-fringe): Correct regexp to + work when breakpoint number exceeds nine. + 2010-10-05 David Koppelman * hi-lock.el (hi-lock-font-lock-hook): Check font-lock-fontified diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index aa4cfab1bad..b2a354c5410 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -2195,7 +2195,7 @@ If not in a source or disassembly buffer just set point." (if (posn-object posn) (let* ((bptno (get-text-property 0 'gdb-bptno (car (posn-string posn))))) - (string-match "\\([0-9+]\\)*" bptno) + (string-match "\\([0-9]+\\)*" bptno) (gdb-enqueue-input (list (concat gdb-server-prefix @@ -2222,7 +2222,7 @@ If not in a source or disassembly buffer just set point." (setq obj (overlay-get overlay 'before-string)))) (when (stringp obj) (let* ((bptno (get-text-property 0 'gdb-bptno obj))) - (string-match "\\([0-9+]\\)*" bptno) + (string-match "\\([0-9]+\\)*" bptno) (gdb-enqueue-input (list (concat gdb-server-prefix From 4c5281974ff17b5b1dcd87e6091e4952d868306d Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sat, 9 Oct 2010 17:43:43 +0200 Subject: [PATCH 09/12] * lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Use emacs-lisp-mode-syntax-table for the whole function. --- lisp/ChangeLog | 9 +++++-- lisp/emacs-lisp/lisp.el | 54 ++++++++++++++++++++--------------------- 2 files changed, 34 insertions(+), 29 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5800459f20a..6ff0e94e6df 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-10-09 Stefan Monnier + + * emacs-lisp/lisp.el (lisp-completion-at-point): + Use emacs-lisp-mode-syntax-table for the whole function. + 2010-10-09 Richard Sharman (tiny change) * progmodes/gdb-ui.el (gdb-mouse-toggle-breakpoint-margin) @@ -7,8 +12,8 @@ 2010-10-05 David Koppelman * hi-lock.el (hi-lock-font-lock-hook): Check font-lock-fontified - instead of font-lock-mode before adding keywords. Removed - hi-lock-mode off code. Removed inhibit hack. + instead of font-lock-mode before adding keywords. + Remove hi-lock-mode off code. Remove inhibit hack. (hi-lock-set-pattern): Only add keywords if font-lock-fontified non-nil; removed hook inhibit hack. diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 54fa4d615cd..5703f1ee190 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -632,37 +632,37 @@ considered." (defun lisp-completion-at-point (&optional predicate) "Function used for `completion-at-point-functions' in `emacs-lisp-mode'." ;; FIXME: the `end' could be after point? - (let* ((end (point)) - (beg (with-syntax-table emacs-lisp-mode-syntax-table - (save-excursion + (with-syntax-table emacs-lisp-mode-syntax-table + (let* ((end (point)) + (beg (save-excursion (backward-sexp 1) (while (= (char-syntax (following-char)) ?\') (forward-char 1)) - (point)))) - (predicate - (or predicate - (save-excursion - (goto-char beg) - (if (not (eq (char-before) ?\()) - (lambda (sym) ;why not just nil ? -sm - (or (boundp sym) (fboundp sym) - (symbol-plist sym))) - ;; Looks like a funcall position. Let's double check. - (if (condition-case nil - (progn (up-list -2) (forward-char 1) - (eq (char-after) ?\()) - (error nil)) - ;; If the first element of the parent list is an open - ;; parenthesis we are probably not in a funcall position. - ;; Maybe a `let' varlist or something. - nil - ;; Else, we assume that a function name is expected. - 'fboundp)))))) - (list beg end obarray - :predicate predicate - :annotate-function + (point))) + (predicate + (or predicate + (save-excursion + (goto-char beg) + (if (not (eq (char-before) ?\()) + (lambda (sym) ;why not just nil ? -sm + (or (boundp sym) (fboundp sym) + (symbol-plist sym))) + ;; Looks like a funcall position. Let's double check. + (if (condition-case nil + (progn (up-list -2) (forward-char 1) + (eq (char-after) ?\()) + (error nil)) + ;; If the first element of the parent list is an open + ;; paren we are probably not in a funcall position. + ;; Maybe a `let' varlist or something. + nil + ;; Else, we assume that a function name is expected. + 'fboundp)))))) + (list beg end obarray + :predicate predicate + :annotate-function (unless (eq predicate 'fboundp) - (lambda (str) (if (fboundp (intern-soft str)) " ")))))) + (lambda (str) (if (fboundp (intern-soft str)) " "))))))) ;; arch-tag: aa7fa8a4-2e6f-4e9b-9cd9-fef06340e67e ;;; lisp.el ends here From 28edabd519269d66c81f47c9374d57856dfb91f3 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 9 Oct 2010 17:05:14 -0700 Subject: [PATCH 10/12] * doc/man/emacs.1: Small fixes. --- doc/man/ChangeLog | 4 ++++ doc/man/emacs.1 | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/doc/man/ChangeLog b/doc/man/ChangeLog index a2c8cd49134..1e355687c00 100644 --- a/doc/man/ChangeLog +++ b/doc/man/ChangeLog @@ -1,3 +1,7 @@ +2010-10-10 Glenn Morris + + * emacs.1: Small fixes. + 2010-10-09 Ulrich Mueller * emacs.1: Update license description. diff --git a/doc/man/emacs.1 b/doc/man/emacs.1 index d8885704c36..0800a868d65 100644 --- a/doc/man/emacs.1 +++ b/doc/man/emacs.1 @@ -41,9 +41,9 @@ CTRL-h or F1 enters the Help facility. Help Tutorial (CTRL-h t) starts an interactive tutorial to quickly teach beginners the fundamentals of .I Emacs. -Help Apropos (CTRL-h a) helps you find a command given its -functionality, Help Key (CTRL-h k) describes a given key sequence, and -Help Function (CTRL-h f) describes a given Lisp function. +Help Apropos (CTRL-h a) helps you find a command with a name matching +a given pattern, Help Key (CTRL-h k) describes a given key sequence, +and Help Function (CTRL-h f) describes a given Lisp function. .PP .IR "GNU Emacs" 's many special packages handle mail reading (RMail) and sending (Mail), @@ -531,12 +531,12 @@ is the number of color planes. .SH MANUALS You can order printed copies of the GNU Emacs Manual from the Free Software Foundation, which develops GNU software. -See the file ORDERS for ordering information. +See the online store at . .br -Your local Emacs maintainer might also have copies available. +Your local administrator might also have copies available. As with all software and publications from FSF, everyone is permitted to make and distribute copies of the Emacs manual. -The TeX source to the manual is also included in the Emacs source +The Texinfo source to the manual is also included in the Emacs source distribution. . . @@ -545,7 +545,8 @@ distribution. The complete text of the Emacs reference manual is included in a convenient tree structured form. Also includes the Emacs Lisp Reference Manual, useful to anyone -wishing to write programs in the Emacs Lisp extension language. +wishing to write programs in the Emacs Lisp extension language, +and the Introduction to Programming in Emacs Lisp. /usr/local/share/emacs/$VERSION/lisp \(em Lisp source files and compiled files that define most editing commands. @@ -572,9 +573,8 @@ There is a mailing list, bug-gnu-emacs@gnu.org, for reporting Emacs bugs and fixes. But before reporting something as a bug, please try to be sure that it really is a bug, not a misunderstanding or a deliberate feature. -We ask you to read the section ``Reporting Emacs Bugs'' near the -end of the reference manual (or Info system) for hints on how and -when to report bugs. +We ask you to read the section ``Reporting Bugs'' in the Emacs manual +for hints on how and when to report bugs. Also, include the version number of the Emacs you are running in \fIevery\fR bug report that you send in. Bugs tend actually to be fixed if they can be isolated, so it is From 9386ae128af79d61278bd3686d56f3624f9cc5bd Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 10 Oct 2010 21:31:40 +0200 Subject: [PATCH 11/12] * Makefile.in (ELCFILES): Update. --- lisp/ChangeLog | 4 ++++ lisp/Makefile.in | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6ff0e94e6df..867972ed140 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-10-10 Andreas Schwab + + * Makefile.in (ELCFILES): Update. + 2010-10-09 Stefan Monnier * emacs-lisp/lisp.el (lisp-completion-at-point): diff --git a/lisp/Makefile.in b/lisp/Makefile.in index eaefbd7e734..7629316dc63 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -516,7 +516,6 @@ ELCFILES = \ $(lisp)/emacs-lisp/chart.elc \ $(lisp)/emacs-lisp/check-declare.elc \ $(lisp)/emacs-lisp/checkdoc.elc \ - $(lisp)/emacs-lisp/cl-compat.elc \ $(lisp)/emacs-lisp/cl-extra.elc \ $(lisp)/emacs-lisp/cl-indent.elc \ $(lisp)/emacs-lisp/cl-macs.elc \ @@ -551,7 +550,6 @@ ELCFILES = \ $(lisp)/emacs-lisp/lisp-mnt.elc \ $(lisp)/emacs-lisp/lisp-mode.elc \ $(lisp)/emacs-lisp/lisp.elc \ - $(lisp)/emacs-lisp/lmenu.elc \ $(lisp)/emacs-lisp/macroexp.elc \ $(lisp)/emacs-lisp/map-ynp.elc \ $(lisp)/emacs-lisp/pp.elc \ @@ -1081,12 +1079,14 @@ ELCFILES = \ $(lisp)/nxml/xmltok.elc \ $(lisp)/nxml/xsd-regexp.elc \ $(lisp)/obsolete/awk-mode.elc \ + $(lisp)/obsolete/cl-compat.elc \ $(lisp)/obsolete/fast-lock.elc \ $(lisp)/obsolete/iso-acc.elc \ $(lisp)/obsolete/iso-insert.elc \ $(lisp)/obsolete/iso-swed.elc \ $(lisp)/obsolete/lazy-lock.elc \ $(lisp)/obsolete/levents.elc \ + $(lisp)/obsolete/lmenu.elc \ $(lisp)/obsolete/lucid.elc \ $(lisp)/obsolete/old-whitespace.elc \ $(lisp)/obsolete/options.elc \ From a2e35ef5d52031e0fa184d1863fe7cb7043ef637 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Mon, 11 Oct 2010 21:18:08 +0200 Subject: [PATCH 12/12] Bug#7150: Distinguishing between left and right Alt keys on NextStep/OSX. * lisp/cus-start.el (all): ns-right-alternate-modifier is new. * lisp/term/ns-win.el (ns-right-alternate-modifier): New defvar. (ns-right-option-modifier): New alias for ns-right-alternate-modifier. (mac-right-option-modifier): New alias for ns-right-option-modifier. * src/nsterm.m (Qleft): Declare. (ns_right_alternate_modifier): New variable (NSRightAlternateKeyMask): New define. (EV_MODIFIERS): Parse NSRightAlternateKeyMask if ns_right_alternate_modifier isn't Qleft. (keyDown): If ns_right_alternate_modifier isn't Qleft, use it as emacs modifier for NSRightAlternateKeyMask. (syms_of_nsterm): DEFVAR_LISP ns-right-alternate-modifier. --- etc/NEWS | 3 +++ lisp/ChangeLog | 8 ++++++++ lisp/cus-start.el | 8 ++++++++ lisp/term/ns-win.el | 3 +++ src/ChangeLog | 11 +++++++++++ src/nsterm.m | 32 ++++++++++++++++++++++++++++---- 6 files changed, 61 insertions(+), 4 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index bee89d368b5..25236d0f3d2 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -21,6 +21,9 @@ with a prefix argument or by typing C-u C-h C-n. * Changes in Emacs 23.3 +** The nextstep port can have different modifiers for the left and right +alt/option key by customizing the value for ns-right-alternate-modifier. + * Editing Changes in Emacs 23.3 diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 867972ed140..f3275116a9b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ + 2010-10-10 Jan Djärv + + * term/ns-win.el (ns-right-alternate-modifier): New defvar. + (ns-right-option-modifier): New alias for ns-right-alternate-modifier. + (mac-right-option-modifier): New alias for ns-right-option-modifier. + + * cus-start.el (all): ns-right-alternate-modifier is new. + 2010-10-10 Andreas Schwab * Makefile.in (ELCFILES): Update. diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 30678a09bb8..0f686a434e0 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -266,6 +266,14 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of (const control) (const meta) (const alt) (const hyper) (const super)) "23.1") + (ns-right-alternate-modifier + ns + (choice (const :tag "No modifier (work as alternate/option)" none) + (const :tag "Use the value of ns-alternate-modifier" + left) + (const control) (const meta) + (const alt) (const hyper) + (const super)) "23.3") (ns-function-modifier ns (choice (const :tag "No modifier (work as function)" none) diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index a53d0346d94..b9177b2b432 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el @@ -66,6 +66,7 @@ ;; nsterm.m (defvar ns-version-string) (defvar ns-alternate-modifier) +(defvar ns-right-alternate-modifier) ;;;; Command line argument handling. @@ -286,6 +287,7 @@ The properties returned may include `top', `left', `height', and `width'." (defvaralias 'mac-command-modifier 'ns-command-modifier) (defvaralias 'mac-control-modifier 'ns-control-modifier) (defvaralias 'mac-option-modifier 'ns-option-modifier) +(defvaralias 'mac-right-option-modifier 'ns-right-option-modifier) (defvaralias 'mac-function-modifier 'ns-function-modifier) (declare-function ns-do-applescript "nsfns.m" (script)) (defalias 'do-applescript 'ns-do-applescript) @@ -817,6 +819,7 @@ unless the current buffer is a scratch buffer." ;; You say tomAYto, I say tomAHto.. (defvaralias 'ns-option-modifier 'ns-alternate-modifier) +(defvaralias 'ns-right-option-modifier 'ns-right-alternate-modifier) (defun ns-do-hide-emacs () (interactive) diff --git a/src/ChangeLog b/src/ChangeLog index d63f417ed42..9ce5007d3b3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2010-10-10 Jan Djärv + + * nsterm.m (Qleft): Declare. + (ns_right_alternate_modifier): New variable + (NSRightAlternateKeyMask): New define. + (EV_MODIFIERS): Parse NSRightAlternateKeyMask if + ns_right_alternate_modifier isn't Qleft. + (keyDown): If ns_right_alternate_modifier isn't Qleft, use it + as emacs modifier for NSRightAlternateKeyMask. + (syms_of_nsterm): DEFVAR_LISP ns-right-alternate-modifier. + 2010-10-08 Michael Albinus * dbusbind.c (xd_get_dispatch_status): Return a Lisp_Object. diff --git a/src/nsterm.m b/src/nsterm.m index 7c70b2ae698..fc933c099e8 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -142,12 +142,17 @@ Lisp_Object ns_input_spi_name, ns_input_spi_arg; Lisp_Object Vx_toolkit_scroll_bars; static Lisp_Object Qmodifier_value; Lisp_Object Qalt, Qcontrol, Qhyper, Qmeta, Qsuper, Qnone; -extern Lisp_Object Qcursor_color, Qcursor_type, Qns; +extern Lisp_Object Qcursor_color, Qcursor_type, Qns, Qleft; /* Specifies which emacs modifier should be generated when NS receives the Alternate modifer. May be Qnone or any of the modifier lisp symbols. */ Lisp_Object ns_alternate_modifier; +/* Specifies which emacs modifier should be generated when NS receives + the right Alternate modifer. Has same values as ns_alternate_modifier plus + the value Qleft which means whatever value ns_alternate_modifier has. */ +Lisp_Object ns_right_alternate_modifier; + /* Specifies which emacs modifier should be generated when NS receives the Command modifer. May be any of the modifier lisp symbols. */ Lisp_Object ns_command_modifier; @@ -218,12 +223,17 @@ static BOOL inNsSelect = 0; /* Convert modifiers in a NeXTSTEP event to emacs style modifiers. */ #define NS_FUNCTION_KEY_MASK 0x800000 +#define NSRightAlternateKeyMask (0x000040 | NSAlternateKeyMask) #define EV_MODIFIERS(e) \ ((([e modifierFlags] & NSHelpKeyMask) ? \ hyper_modifier : 0) \ - | (([e modifierFlags] & NSAlternateKeyMask) ? \ + | (!EQ (ns_right_alternate_modifier, Qleft) && \ + (([e modifierFlags] & NSRightAlternateKeyMask) \ + == NSRightAlternateKeyMask) ? \ + parse_solitary_modifier (ns_right_alternate_modifier) : 0) \ + | (([e modifierFlags] & NSAlternateKeyMask) ? \ parse_solitary_modifier (ns_alternate_modifier) : 0) \ - | (([e modifierFlags] & NSShiftKeyMask) ? \ + | (([e modifierFlags] & NSShiftKeyMask) ? \ shift_modifier : 0) \ | (([e modifierFlags] & NSControlKeyMask) ? \ parse_solitary_modifier (ns_control_modifier) : 0) \ @@ -4423,7 +4433,13 @@ ns_term_shutdown (int sig) emacs_event->modifiers |= parse_solitary_modifier (ns_function_modifier); - if (flags & NSAlternateKeyMask) /* default = meta */ + if (!EQ (ns_right_alternate_modifier, Qleft) + && ((flags & NSRightAlternateKeyMask) == NSRightAlternateKeyMask)) + { + emacs_event->modifiers |= parse_solitary_modifier + (ns_right_alternate_modifier); + } + else if (flags & NSAlternateKeyMask) /* default = meta */ { if ((NILP (ns_alternate_modifier) || EQ (ns_alternate_modifier, Qnone)) && !fnKeysym) @@ -6185,6 +6201,14 @@ Set to none means that the alternate / option key is not interpreted by Emacs\n\ at all, allowing it to be used at a lower level for accented character entry."); ns_alternate_modifier = Qmeta; + DEFVAR_LISP ("ns-right-alternate-modifier", &ns_right_alternate_modifier, + "This variable describes the behavior of the right alternate or option key.\n\ +Set to control, meta, alt, super, or hyper means it is taken to be that key.\n\ +Set to left means be the same key as `ns-alternate-modifier'.\n\ +Set to none means that the alternate / option key is not interpreted by Emacs\n\ +at all, allowing it to be used at a lower level for accented character entry."); + ns_right_alternate_modifier = Qleft; + DEFVAR_LISP ("ns-command-modifier", &ns_command_modifier, "This variable describes the behavior of the command key.\n\ Set to control, meta, alt, super, or hyper means it is taken to be that key.");