diff options
| author | Joakim Verona | 2012-07-31 00:00:41 +0200 |
|---|---|---|
| committer | Joakim Verona | 2012-07-31 00:00:41 +0200 |
| commit | 55fa71b3d9bb8609ca3cbb56f92c776ad8724a69 (patch) | |
| tree | b002fe941cc8636f8bd735717e440014359839dd /lisp | |
| parent | 5fb63197843dcae66f2fe0ddd6f4a9d560e9db2f (diff) | |
| parent | b429a4eee4e09b1ba09e17ced5091d042955d84f (diff) | |
| download | emacs-55fa71b3d9bb8609ca3cbb56f92c776ad8724a69.tar.gz emacs-55fa71b3d9bb8609ca3cbb56f92c776ad8724a69.zip | |
upstream
Diffstat (limited to 'lisp')
46 files changed, 1066 insertions, 280 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5e848134cb2..8401578abf4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,193 @@ | |||
| 1 | 2012-07-30 Stefan Merten <smerten@oekonux.de> | ||
| 2 | |||
| 3 | * rst.el: Silence `checkdoc-ispell'. | ||
| 4 | (rst-cvs-header, rst-svn-rev, rst-svn-timestamp) | ||
| 5 | (rst-official-version, rst-official-cvs-rev) | ||
| 6 | (rst-package-emacs-version-alist): Update to upstream V1.3.1. | ||
| 7 | (rst-mode-map): New key binding. | ||
| 8 | |||
| 9 | 2012-07-30 Paul Eggert <eggert@cs.ucla.edu> | ||
| 10 | |||
| 11 | Update .PHONY listings in makefiles. | ||
| 12 | * Makefile.in (.PHONY): Add all, doit, custom-deps, finder-data, | ||
| 13 | autoloads, update-subdirs, updates, bzr-update, update-authors, | ||
| 14 | compile-onefile, compile-calc, backup-compiled-files, | ||
| 15 | compile-after-backup, compile-one-process, mh-autoloads, | ||
| 16 | bootstrap-clean, distclean, maintainer-clean. | ||
| 17 | |||
| 18 | 2012-07-29 Jay Belanger <jay.p.belanger@gmail.com> | ||
| 19 | |||
| 20 | * calc/calc.el (calc-simplify-mode): Make 'alg the default value. | ||
| 21 | (calc-set-mode-line): Don't display "AlgSimp ". | ||
| 22 | |||
| 23 | * calc/calc-mode.el (calc-alg-simplify-mode): Remove function. | ||
| 24 | (calc-lim-simplify-mode): New function. | ||
| 25 | (calc-set-simplify-mode): Default to 'alg. | ||
| 26 | (calc-default-simplify-mode): Make algebraic simplifications | ||
| 27 | the default. | ||
| 28 | |||
| 29 | * calc/calc-ext.el (calc-init-extensions): Remove binding for | ||
| 30 | `calc-alg-simplify-mode'. Add binding for `calc-lim-simplify-mode'. | ||
| 31 | |||
| 32 | * calc/calc-help (calc-m-prefix-help): Change messages to | ||
| 33 | indicate new simplification modes. | ||
| 34 | |||
| 35 | * calc/README: Mention new default simplification mode. | ||
| 36 | |||
| 37 | * calc/calc.el (math-normalize-error): New variable. | ||
| 38 | (math-normalize): Set `math-normalize-error' to t | ||
| 39 | when there's an error. | ||
| 40 | |||
| 41 | * calc/calc-alg.el (math-simplify): Don't simplify when | ||
| 42 | `math-normalize' returns an error. | ||
| 43 | |||
| 44 | 2012-07-29 Eli Zaretskii <eliz@gnu.org> | ||
| 45 | |||
| 46 | * international/mule-cmds.el (set-locale-environment): Revert last | ||
| 47 | change, since display-graphic-p returns nil when this function is | ||
| 48 | called during startup. Instead... | ||
| 49 | |||
| 50 | * term/w32console.el (terminal-init-w32console): ...setup the | ||
| 51 | keyboard and terminal encoding for TTY sessions here. (Bug#12082) | ||
| 52 | |||
| 53 | 2012-07-29 Juri Linkov <juri@jurta.org> | ||
| 54 | |||
| 55 | * simple.el (goto-line): Don't display default line number in the | ||
| 56 | prompt because it should be displayed by `read-number' (bug#9952). | ||
| 57 | Add the current line number to the defaults of `goto-line' to | ||
| 58 | allow its easier modification by users with `M-n' (bug#9201). | ||
| 59 | |||
| 60 | * subr.el (read-number): Support multiple default values like in | ||
| 61 | other minibuffer reading functions. Replace `read' with | ||
| 62 | `string-to-number' for consistency with `number-to-string'. | ||
| 63 | |||
| 64 | 2012-07-29 Paul Eggert <eggert@cs.ucla.edu> | ||
| 65 | |||
| 66 | deactive->inactive, inactivate->deactivate spelling fixes (Bug#10150) | ||
| 67 | * emulation/viper-init.el (viper-deactivate-input-method-action): | ||
| 68 | Rename from viper-inactivate-input-method-action. | ||
| 69 | (viper-deactivate-input-method): | ||
| 70 | Rename from viper-inactivate-input-method. | ||
| 71 | * follow.el (follow-inactive-menu): Rename from follow-deactive-menu. | ||
| 72 | * international/mule-cmds.el (deactivate-input-method): | ||
| 73 | Rename from inactivate-input-method. | ||
| 74 | Also run input-method-deactivate-hook. | ||
| 75 | (deactivate-current-input-method-function): | ||
| 76 | Rename from inactivate-current-input-method-function. | ||
| 77 | (input-method-deactivate-hook): New hook. | ||
| 78 | (input-method-inactivate-hook): Mark obsolete. | ||
| 79 | (inactivate-input-method): Mark obsolete. | ||
| 80 | |||
| 81 | * international/quail.el (quail-activate): | ||
| 82 | Also run quail-deactivate-hook. | ||
| 83 | (quail-deactivate): Rename from quail-inactivate. | ||
| 84 | * international/robin.el (robin-activate): | ||
| 85 | Also run robin-deactivate-hook. | ||
| 86 | (robin-deactivate): Rename from robin-inactivate. | ||
| 87 | |||
| 88 | 2012-07-29 Chong Yidong <cyd@gnu.org> | ||
| 89 | |||
| 90 | * simple.el (indicate-copied-region): New function. | ||
| 91 | (kill-ring-save): Split off from here. | ||
| 92 | |||
| 93 | * rect.el (copy-rectangle-as-kill): Call indicate-copied-region. | ||
| 94 | (kill-rectangle): Set deactivate-mark to t on read-only error. | ||
| 95 | |||
| 96 | * register.el (copy-to-register, copy-rectangle-to-register): | ||
| 97 | Deactivate the mark, and use indicate-copied-region (Bug#10056). | ||
| 98 | (append-to-register, prepend-to-register): Call | ||
| 99 | |||
| 100 | 2012-07-29 Juri Linkov <juri@jurta.org> | ||
| 101 | |||
| 102 | * simple.el (async-shell-command-buffer): New defcustom. | ||
| 103 | (shell-command): Use it. (Bug#4719) | ||
| 104 | |||
| 105 | 2012-07-28 Eli Zaretskii <eliz@gnu.org> | ||
| 106 | |||
| 107 | * international/mule-cmds.el (set-locale-environment): In a | ||
| 108 | console session on MS-Windows, set up keyboard and terminal | ||
| 109 | encoding from the OEM codepage, not the ANSI codepage. | ||
| 110 | (Bug#12055) | ||
| 111 | |||
| 112 | 2012-07-28 Chong Yidong <cyd@gnu.org> | ||
| 113 | |||
| 114 | * progmodes/gdb-mi.el (gdb-place-breakpoints): Fix the call to | ||
| 115 | gdb-get-location. | ||
| 116 | |||
| 117 | 2012-07-25 Leo Liu <sdl.web@gmail.com> | ||
| 118 | |||
| 119 | * progmodes/cc-menus.el (cc-imenu-objc-function): Avoid leaving nil in | ||
| 120 | the alist (bug#12029). | ||
| 121 | |||
| 122 | 2012-07-28 Eli Zaretskii <eliz@gnu.org> | ||
| 123 | |||
| 124 | * makefile.w32-in (custom-deps, finder-data, updates, compile) | ||
| 125 | (compile-always, compile-first) | ||
| 126 | ($(lisp)/calendar/cal-loaddefs.el) | ||
| 127 | ($(lisp)/calendar/diary-loaddefs.el) | ||
| 128 | ($(lisp)/calendar/hol-loaddefs.el, $(lisp)/mh-e/mh-loaddefs.el) | ||
| 129 | ($(lisp)/net/tramp-loaddefs.el, bootstrap) | ||
| 130 | ($(lisp)/progmodes/cc-mode.elc): Depend on $(lisp)subdirs.el, | ||
| 131 | instead of on update-subdirs. | ||
| 132 | (bootstrap-clean): Delete $(lisp)/subdirs.el. | ||
| 133 | |||
| 134 | 2012-07-28 Chong Yidong <cyd@gnu.org> | ||
| 135 | |||
| 136 | * vc/vc.el (vc-root-diff, vc-print-root-log): Prompt for a | ||
| 137 | directory if vc-deduce-backend returns nil (Bug#7350). | ||
| 138 | |||
| 139 | * simple.el (delete-trailing-lines): New option. | ||
| 140 | (delete-trailing-whitespace): Obey it (Bug#11879). | ||
| 141 | |||
| 142 | 2012-07-28 David Engster <deng@randomsample.de> | ||
| 143 | |||
| 144 | * xml.el (xml-node-name, xml-parse-file, xml-parse-region): | ||
| 145 | Explanation of new 'symbol-qnames feature in doc-strings. | ||
| 146 | (xml-maybe-do-ns): Return expanded names as plain symbols if | ||
| 147 | 'symbol-qnames was provided in XML-NS argument (Bug#11916). | ||
| 148 | (xml-parse-tag-1): Deal with new definition of PARSE-NS argument. | ||
| 149 | |||
| 150 | 2012-07-27 Fabián Ezequiel Gallina <fgallina@cuca> | ||
| 151 | |||
| 152 | Consistent completion in inferior python with emacs -nw. | ||
| 153 | * progmodes/python.el (inferior-python-mode): replace "<tab>" | ||
| 154 | binding in inferior-python-mode-map with "\t". | ||
| 155 | (python-shell-completion-complete-at-point) | ||
| 156 | (python-completion-complete-at-point): Remove interactive spec. | ||
| 157 | |||
| 158 | 2012-07-27 Jay Belanger <jay.p.belanger@gmail.com> | ||
| 159 | |||
| 160 | * calc/calccomp.el (math-compose-expr): Undo previous change. | ||
| 161 | |||
| 162 | 2012-07-27 Fabián Ezequiel Gallina <fgallina@cuca> | ||
| 163 | |||
| 164 | * progmodes/python.el (python-mode-map): Added keybinding for | ||
| 165 | run-python. | ||
| 166 | (python-shell-make-comint): Fix pop-to-buffer call. | ||
| 167 | (run-python): Autoload. New arg SHOW. | ||
| 168 | (python-shell-get-or-create-process): Do not pop python process | ||
| 169 | buffer. | ||
| 170 | |||
| 171 | 2012-07-27 Michael Albinus <michael.albinus@gmx.de> | ||
| 172 | |||
| 173 | * notifications.el (notifications-on-action-signal) | ||
| 174 | (notifications-on-closed-signal): Use also the bus address for the map. | ||
| 175 | (notifications-notify, notifications-close-notification) | ||
| 176 | (notifications-get-capabilities): Add optional argument BUS. | ||
| 177 | |||
| 178 | 2012-07-27 Tassilo Horn <tsdh@gnu.org> | ||
| 179 | |||
| 180 | * textmodes/reftex-vars.el (reftex-label-alist-builtin): Add | ||
| 181 | support for the lstlisting and minted environments, and for the | ||
| 182 | ctable macro. | ||
| 183 | * textmodes/reftex.el (reftex-compile-variables): Also recognize | ||
| 184 | labels written in keyvals syntax. | ||
| 185 | |||
| 186 | 2012-07-27 Jay Belanger <jay.p.belanger@gmail.com> | ||
| 187 | |||
| 188 | * calc/calccomp.el (math-compose-expr): Use parentheses when | ||
| 189 | there is a product in the denominator of a fraction. | ||
| 190 | |||
| 1 | 2012-07-26 Eli Zaretskii <eliz@gnu.org> | 191 | 2012-07-26 Eli Zaretskii <eliz@gnu.org> |
| 2 | 192 | ||
| 3 | * makefile.w32-in ($(lisp)/calendar/cal-loaddefs.el) | 193 | * makefile.w32-in ($(lisp)/calendar/cal-loaddefs.el) |
| @@ -10309,7 +10499,7 @@ | |||
| 10309 | (tramp-completion-file-name-regexp-unified) | 10499 | (tramp-completion-file-name-regexp-unified) |
| 10310 | (tramp-completion-file-name-regexp-separate) | 10500 | (tramp-completion-file-name-regexp-separate) |
| 10311 | (tramp-completion-file-name-regexp-url): Don't use leading volume | 10501 | (tramp-completion-file-name-regexp-url): Don't use leading volume |
| 10312 | letter on win32 systems. (Bug#5303, Bug#9311) | 10502 | letter on w32 systems. (Bug#5303, Bug#9311) |
| 10313 | (tramp-drop-volume-letter): Simplify definition. | 10503 | (tramp-drop-volume-letter): Simplify definition. |
| 10314 | Suggested by Stefan Monnier <monnier@iro.umontreal.ca>. | 10504 | Suggested by Stefan Monnier <monnier@iro.umontreal.ca>. |
| 10315 | 10505 | ||
diff --git a/lisp/ChangeLog.8 b/lisp/ChangeLog.8 index ccc9b473de3..0380fb117db 100644 --- a/lisp/ChangeLog.8 +++ b/lisp/ChangeLog.8 | |||
| @@ -6906,7 +6906,7 @@ | |||
| 6906 | standard `print' and `nprint' programs, as well as `lpr' and | 6906 | standard `print' and `nprint' programs, as well as `lpr' and |
| 6907 | similar programs. Only write directly to the printer port if no | 6907 | similar programs. Only write directly to the printer port if no |
| 6908 | print program is specified. Work around a bug in Windows 9x | 6908 | print program is specified. Work around a bug in Windows 9x |
| 6909 | affecting Win32 version of Emacs by invoking command.com to write | 6909 | affecting the w32 version of Emacs by invoking command.com to write |
| 6910 | to the printer port instead of writing directly. | 6910 | to the printer port instead of writing directly. |
| 6911 | (direct-print-region-function): Use direct-print-region-helper to | 6911 | (direct-print-region-function): Use direct-print-region-helper to |
| 6912 | do most of the work. | 6912 | do most of the work. |
diff --git a/lisp/Makefile.in b/lisp/Makefile.in index 0cb142a7267..643b698c6e8 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in | |||
| @@ -139,6 +139,8 @@ all: compile-main $(lisp)/cus-load.el $(lisp)/finder-inf.el | |||
| 139 | 139 | ||
| 140 | doit: | 140 | doit: |
| 141 | 141 | ||
| 142 | .PHONY: all doit custom-deps finder-data autoloads update-subdirs | ||
| 143 | |||
| 142 | # custom-deps and finder-data both used to scan _all_ the *.el files. | 144 | # custom-deps and finder-data both used to scan _all_ the *.el files. |
| 143 | # This could lead to problems in parallel builds if automatically | 145 | # This could lead to problems in parallel builds if automatically |
| 144 | # generated *.el files (eg loaddefs etc) were being changed at the same time. | 146 | # generated *.el files (eg loaddefs etc) were being changed at the same time. |
| @@ -184,6 +186,8 @@ update-subdirs: doit | |||
| 184 | $(top_srcdir)/build-aux/update-subdirs $$file; \ | 186 | $(top_srcdir)/build-aux/update-subdirs $$file; \ |
| 185 | done; | 187 | done; |
| 186 | 188 | ||
| 189 | .PHONY: updates bzr-update update-authors | ||
| 190 | |||
| 187 | # Some modes of make-dist use this. | 191 | # Some modes of make-dist use this. |
| 188 | updates: update-subdirs autoloads finder-data custom-deps | 192 | updates: update-subdirs autoloads finder-data custom-deps |
| 189 | 193 | ||
| @@ -215,6 +219,7 @@ TAGS TAGS-LISP: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptags | |||
| 215 | # src/Makefile.in to rebuild a particular Lisp file, no questions asked. | 219 | # src/Makefile.in to rebuild a particular Lisp file, no questions asked. |
| 216 | # Use byte-compile-refresh-preloaded to try and work around some of | 220 | # Use byte-compile-refresh-preloaded to try and work around some of |
| 217 | # the most common problems of not bootstrapping from a clean state. | 221 | # the most common problems of not bootstrapping from a clean state. |
| 222 | .PHONY: compile-onefile | ||
| 218 | compile-onefile: | 223 | compile-onefile: |
| 219 | @echo Compiling $(THEFILE) | 224 | @echo Compiling $(THEFILE) |
| 220 | @# Use byte-compile-refresh-preloaded to try and work around some of | 225 | @# Use byte-compile-refresh-preloaded to try and work around some of |
| @@ -302,6 +307,8 @@ compile-always: doit | |||
| 302 | cd $(lisp); rm -f *.elc */*.elc */*/*.elc */*/*/*.elc | 307 | cd $(lisp); rm -f *.elc */*.elc */*/*.elc */*/*/*.elc |
| 303 | $(MAKE) $(MFLAGS) compile EMACS=$(EMACS) | 308 | $(MAKE) $(MFLAGS) compile EMACS=$(EMACS) |
| 304 | 309 | ||
| 310 | .PHONY: compile-calc backup-compiled-files compile-after-backup | ||
| 311 | |||
| 305 | compile-calc: | 312 | compile-calc: |
| 306 | for el in $(lisp)/calc/*.el; do \ | 313 | for el in $(lisp)/calc/*.el; do \ |
| 307 | echo Compiling $$el; \ | 314 | echo Compiling $$el; \ |
| @@ -334,6 +341,7 @@ compile-after-backup: backup-compiled-files compile-always | |||
| 334 | # files that use byte-compile-dynamic are updated. | 341 | # files that use byte-compile-dynamic are updated. |
| 335 | # There is no reason to use this rule unless you only have a single | 342 | # There is no reason to use this rule unless you only have a single |
| 336 | # core and CPU time is an issue. | 343 | # core and CPU time is an issue. |
| 344 | .PHONY: compile-one-process | ||
| 337 | compile-one-process: doit $(LOADDEFS) compile-first $(lisp)/progmodes/cc-mode.elc | 345 | compile-one-process: doit $(LOADDEFS) compile-first $(lisp)/progmodes/cc-mode.elc |
| 338 | $(emacs) $(BYTE_COMPILE_FLAGS) \ | 346 | $(emacs) $(BYTE_COMPILE_FLAGS) \ |
| 339 | --eval "(batch-byte-recompile-directory 0)" $(lisp) | 347 | --eval "(batch-byte-recompile-directory 0)" $(lisp) |
| @@ -356,6 +364,7 @@ MH_E_SRC = $(MH_E_DIR)/mh-acros.el $(MH_E_DIR)/mh-alias.el \ | |||
| 356 | $(MH_E_DIR)/mh-tool-bar.el $(MH_E_DIR)/mh-utils.el \ | 364 | $(MH_E_DIR)/mh-tool-bar.el $(MH_E_DIR)/mh-utils.el \ |
| 357 | $(MH_E_DIR)/mh-xface.el | 365 | $(MH_E_DIR)/mh-xface.el |
| 358 | 366 | ||
| 367 | .PHONY: mh-autoloads | ||
| 359 | mh-autoloads: $(MH_E_DIR)/mh-loaddefs.el | 368 | mh-autoloads: $(MH_E_DIR)/mh-loaddefs.el |
| 360 | $(MH_E_DIR)/mh-loaddefs.el: $(MH_E_SRC) | 369 | $(MH_E_DIR)/mh-loaddefs.el: $(MH_E_SRC) |
| 361 | $(emacs) -l autoload \ | 370 | $(emacs) -l autoload \ |
| @@ -418,6 +427,8 @@ $(CAL_DIR)/hol-loaddefs.el: $(CAL_SRC) | |||
| 418 | --eval "(setq make-backup-files nil)" \ | 427 | --eval "(setq make-backup-files nil)" \ |
| 419 | -f batch-update-autoloads $(CAL_DIR) | 428 | -f batch-update-autoloads $(CAL_DIR) |
| 420 | 429 | ||
| 430 | .PHONY: bootstrap-clean distclean maintainer-clean | ||
| 431 | |||
| 421 | bootstrap-clean: | 432 | bootstrap-clean: |
| 422 | cd $(lisp); rm -f *.elc */*.elc */*/*.elc */*/*/*.elc $(AUTOGENEL) | 433 | cd $(lisp); rm -f *.elc */*.elc */*/*.elc */*/*/*.elc $(AUTOGENEL) |
| 423 | 434 | ||
diff --git a/lisp/calc/README b/lisp/calc/README index e4b681d5625..b09ac6f79eb 100644 --- a/lisp/calc/README +++ b/lisp/calc/README | |||
| @@ -70,6 +70,12 @@ opinions. | |||
| 70 | Summary of changes to "Calc" | 70 | Summary of changes to "Calc" |
| 71 | ------- -- ------- -- ---- | 71 | ------- -- ------- -- ---- |
| 72 | 72 | ||
| 73 | Emacs 24.2 | ||
| 74 | |||
| 75 | Algebraic simplification mode is now the default. | ||
| 76 | To restrict to the limited simplifications given by the former | ||
| 77 | default simplification mode, use `m L'. | ||
| 78 | |||
| 73 | Emacs 24.1 | 79 | Emacs 24.1 |
| 74 | 80 | ||
| 75 | * Support for musical notes added. | 81 | * Support for musical notes added. |
diff --git a/lisp/calc/calc-alg.el b/lisp/calc/calc-alg.el index 50b31400a6a..3182e85a8c6 100644 --- a/lisp/calc/calc-alg.el +++ b/lisp/calc/calc-alg.el | |||
| @@ -356,6 +356,8 @@ | |||
| 356 | ;; math-simplify-step, which is called by math-simplify. | 356 | ;; math-simplify-step, which is called by math-simplify. |
| 357 | (defvar math-top-only) | 357 | (defvar math-top-only) |
| 358 | 358 | ||
| 359 | ;; math-normalize-error is declared in calc.el. | ||
| 360 | (defvar math-normalize-error) | ||
| 359 | (defun math-simplify (top-expr) | 361 | (defun math-simplify (top-expr) |
| 360 | (let ((math-simplifying t) | 362 | (let ((math-simplifying t) |
| 361 | (math-top-only (consp calc-simplify-mode)) | 363 | (math-top-only (consp calc-simplify-mode)) |
| @@ -383,10 +385,12 @@ | |||
| 383 | (calc-with-default-simplification | 385 | (calc-with-default-simplification |
| 384 | (while (let ((r simp-rules)) | 386 | (while (let ((r simp-rules)) |
| 385 | (setq res (math-normalize top-expr)) | 387 | (setq res (math-normalize top-expr)) |
| 386 | (while r | 388 | (if (not math-normalize-error) |
| 387 | (setq res (math-rewrite res (car r)) | 389 | (progn |
| 388 | r (cdr r))) | 390 | (while r |
| 389 | (not (equal top-expr (setq res (math-simplify-step res))))) | 391 | (setq res (math-rewrite res (car r)) |
| 392 | r (cdr r))) | ||
| 393 | (not (equal top-expr (setq res (math-simplify-step res))))))) | ||
| 390 | (setq top-expr res))))) | 394 | (setq top-expr res))))) |
| 391 | top-expr) | 395 | top-expr) |
| 392 | 396 | ||
diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index 818b19757be..954251f842b 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el | |||
| @@ -454,12 +454,12 @@ | |||
| 454 | (define-key calc-mode-map "mv" 'calc-matrix-mode) | 454 | (define-key calc-mode-map "mv" 'calc-matrix-mode) |
| 455 | (define-key calc-mode-map "mw" 'calc-working) | 455 | (define-key calc-mode-map "mw" 'calc-working) |
| 456 | (define-key calc-mode-map "mx" 'calc-always-load-extensions) | 456 | (define-key calc-mode-map "mx" 'calc-always-load-extensions) |
| 457 | (define-key calc-mode-map "mA" 'calc-alg-simplify-mode) | ||
| 458 | (define-key calc-mode-map "mB" 'calc-bin-simplify-mode) | 457 | (define-key calc-mode-map "mB" 'calc-bin-simplify-mode) |
| 459 | (define-key calc-mode-map "mC" 'calc-auto-recompute) | 458 | (define-key calc-mode-map "mC" 'calc-auto-recompute) |
| 460 | (define-key calc-mode-map "mD" 'calc-default-simplify-mode) | 459 | (define-key calc-mode-map "mD" 'calc-default-simplify-mode) |
| 461 | (define-key calc-mode-map "mE" 'calc-ext-simplify-mode) | 460 | (define-key calc-mode-map "mE" 'calc-ext-simplify-mode) |
| 462 | (define-key calc-mode-map "mF" 'calc-settings-file-name) | 461 | (define-key calc-mode-map "mF" 'calc-settings-file-name) |
| 462 | (define-key calc-mode-map "mL" 'calc-limited-simplify-mode) | ||
| 463 | (define-key calc-mode-map "mM" 'calc-more-recursion-depth) | 463 | (define-key calc-mode-map "mM" 'calc-more-recursion-depth) |
| 464 | (define-key calc-mode-map "mN" 'calc-num-simplify-mode) | 464 | (define-key calc-mode-map "mN" 'calc-num-simplify-mode) |
| 465 | (define-key calc-mode-map "mO" 'calc-no-simplify-mode) | 465 | (define-key calc-mode-map "mO" 'calc-no-simplify-mode) |
| @@ -1093,7 +1093,7 @@ calc-pi calc-radians-mode calc-sec calc-sech | |||
| 1093 | calc-sin calc-sincos calc-sinh calc-sqrt | 1093 | calc-sin calc-sincos calc-sinh calc-sqrt |
| 1094 | calc-tan calc-tanh calc-to-degrees calc-to-radians) | 1094 | calc-tan calc-tanh calc-to-degrees calc-to-radians) |
| 1095 | 1095 | ||
| 1096 | ("calc-mode" calc-alg-simplify-mode calc-algebraic-mode | 1096 | ("calc-mode" calc-limited-simplify-mode calc-algebraic-mode |
| 1097 | calc-always-load-extensions calc-auto-recompute calc-auto-why | 1097 | calc-always-load-extensions calc-auto-recompute calc-auto-why |
| 1098 | calc-bin-simplify-mode calc-break-vectors calc-center-justify | 1098 | calc-bin-simplify-mode calc-break-vectors calc-center-justify |
| 1099 | calc-default-simplify-mode calc-display-raw calc-eng-notation | 1099 | calc-default-simplify-mode calc-display-raw calc-eng-notation |
diff --git a/lisp/calc/calc-help.el b/lisp/calc/calc-help.el index 8ef917fb5f4..f48fae388d5 100644 --- a/lisp/calc/calc-help.el +++ b/lisp/calc/calc-help.el | |||
| @@ -642,7 +642,7 @@ C-w Describe how there is no warranty for Calc." | |||
| 642 | '("Deg, Rad, HMS; Frac; Polar; Inf; Alg, Total; Symb; Vec/mat" | 642 | '("Deg, Rad, HMS; Frac; Polar; Inf; Alg, Total; Symb; Vec/mat" |
| 643 | "Working; Xtensions; Mode-save; preserve Embedded modes" | 643 | "Working; Xtensions; Mode-save; preserve Embedded modes" |
| 644 | "SHIFT + Shifted-prefixes, mode-Filename; Record; reCompute" | 644 | "SHIFT + Shifted-prefixes, mode-Filename; Record; reCompute" |
| 645 | "SHIFT + simplify: Off, Num, Default, Bin, Alg, Ext, Units") | 645 | "SHIFT + simplify: Off, Num, Limited, Default, Bin, Ext, Units") |
| 646 | "mode" ?m)) | 646 | "mode" ?m)) |
| 647 | 647 | ||
| 648 | 648 | ||
diff --git a/lisp/calc/calc-mode.el b/lisp/calc/calc-mode.el index 3f583192bcf..8403d7f7de9 100644 --- a/lisp/calc/calc-mode.el +++ b/lisp/calc/calc-mode.el | |||
| @@ -504,7 +504,7 @@ | |||
| 504 | mode))) | 504 | mode))) |
| 505 | (message "%s" (if (eq calc-simplify-mode mode) | 505 | (message "%s" (if (eq calc-simplify-mode mode) |
| 506 | msg | 506 | msg |
| 507 | "Default simplifications enabled"))) | 507 | "Default algebraic simplifications enabled"))) |
| 508 | 508 | ||
| 509 | (defun calc-no-simplify-mode (arg) | 509 | (defun calc-no-simplify-mode (arg) |
| 510 | (interactive "P") | 510 | (interactive "P") |
| @@ -519,15 +519,18 @@ | |||
| 519 | "Default simplifications apply only if arguments are numeric"))) | 519 | "Default simplifications apply only if arguments are numeric"))) |
| 520 | 520 | ||
| 521 | (defun calc-default-simplify-mode (arg) | 521 | (defun calc-default-simplify-mode (arg) |
| 522 | (interactive "p") | 522 | (interactive "P") |
| 523 | (cond ((= arg 1) | 523 | (cond ((or (not arg) (= arg 3)) |
| 524 | (calc-wrapper | ||
| 525 | (calc-set-simplify-mode | ||
| 526 | 'alg nil "Default algebraic simplifications enabled"))) | ||
| 527 | ((= arg 1) | ||
| 524 | (calc-wrapper | 528 | (calc-wrapper |
| 525 | (calc-set-simplify-mode | 529 | (calc-set-simplify-mode |
| 526 | nil nil "Usual default simplifications are enabled"))) | 530 | nil nil "Limited simplifications occur by default"))) |
| 527 | ((= arg 0) (calc-num-simplify-mode 1)) | 531 | ((= arg 0) (calc-num-simplify-mode 1)) |
| 528 | ((< arg 0) (calc-no-simplify-mode 1)) | 532 | ((< arg 0) (calc-no-simplify-mode 1)) |
| 529 | ((= arg 2) (calc-bin-simplify-mode 1)) | 533 | ((= arg 2) (calc-bin-simplify-mode 1)) |
| 530 | ((= arg 3) (calc-alg-simplify-mode 1)) | ||
| 531 | ((= arg 4) (calc-ext-simplify-mode 1)) | 534 | ((= arg 4) (calc-ext-simplify-mode 1)) |
| 532 | ((= arg 5) (calc-units-simplify-mode 1)) | 535 | ((= arg 5) (calc-units-simplify-mode 1)) |
| 533 | (t (error "Prefix argument out of range")))) | 536 | (t (error "Prefix argument out of range")))) |
| @@ -539,11 +542,11 @@ | |||
| 539 | (format "Binary simplification occurs by default (word size=%d)" | 542 | (format "Binary simplification occurs by default (word size=%d)" |
| 540 | calc-word-size)))) | 543 | calc-word-size)))) |
| 541 | 544 | ||
| 542 | (defun calc-alg-simplify-mode (arg) | 545 | (defun calc-limited-simplify-mode (arg) |
| 543 | (interactive "P") | 546 | (interactive "P") |
| 544 | (calc-wrapper | 547 | (calc-wrapper |
| 545 | (calc-set-simplify-mode 'alg arg | 548 | (calc-set-simplify-mode nil arg |
| 546 | "Algebraic simplification occurs by default"))) | 549 | "Limited simplifications occur by default"))) |
| 547 | 550 | ||
| 548 | (defun calc-ext-simplify-mode (arg) | 551 | (defun calc-ext-simplify-mode (arg) |
| 549 | (interactive "P") | 552 | (interactive "P") |
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 7fb9148535a..dd1efd014fb 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el | |||
| @@ -698,11 +698,11 @@ If `C' is present, display outer brackets for matrices (centered).") | |||
| 698 | (defcalcmodevar calc-previous-modulo nil | 698 | (defcalcmodevar calc-previous-modulo nil |
| 699 | "Most recently used value of M in a modulo form.") | 699 | "Most recently used value of M in a modulo form.") |
| 700 | 700 | ||
| 701 | (defcalcmodevar calc-simplify-mode nil | 701 | (defcalcmodevar calc-simplify-mode 'alg |
| 702 | "Type of simplification applied to results. | 702 | "Type of simplification applied to results. |
| 703 | If `none', results are not simplified when pushed on the stack. | 703 | If `none', results are not simplified when pushed on the stack. |
| 704 | If `num', functions are simplified only when args are constant. | 704 | If `num', functions are simplified only when args are constant. |
| 705 | If nil, only fast simplifications are applied. | 705 | If nil, only limited simplifications are applied. |
| 706 | If `binary', `math-clip' is applied if appropriate. | 706 | If `binary', `math-clip' is applied if appropriate. |
| 707 | If `alg', `math-simplify' is applied. | 707 | If `alg', `math-simplify' is applied. |
| 708 | If `ext', `math-simplify-extended' is applied. | 708 | If `ext', `math-simplify-extended' is applied. |
| @@ -1757,10 +1757,10 @@ See calc-keypad for details." | |||
| 1757 | ((eq calc-simplify-mode 'num) "NumSimp ") | 1757 | ((eq calc-simplify-mode 'num) "NumSimp ") |
| 1758 | ((eq calc-simplify-mode 'binary) | 1758 | ((eq calc-simplify-mode 'binary) |
| 1759 | (format "BinSimp%d " calc-word-size)) | 1759 | (format "BinSimp%d " calc-word-size)) |
| 1760 | ((eq calc-simplify-mode 'alg) "AlgSimp ") | 1760 | ((eq calc-simplify-mode 'alg) "") |
| 1761 | ((eq calc-simplify-mode 'ext) "ExtSimp ") | 1761 | ((eq calc-simplify-mode 'ext) "ExtSimp ") |
| 1762 | ((eq calc-simplify-mode 'units) "UnitSimp ") | 1762 | ((eq calc-simplify-mode 'units) "UnitSimp ") |
| 1763 | (t "")) | 1763 | (t "LimSimp ")) |
| 1764 | 1764 | ||
| 1765 | ;; Display modes | 1765 | ;; Display modes |
| 1766 | (cond ((= calc-number-radix 10) "") | 1766 | (cond ((= calc-number-radix 10) "") |
| @@ -2583,7 +2583,11 @@ largest Emacs integer.") | |||
| 2583 | ;;; Reduce an object to canonical (normalized) form. [O o; Z Z] [Public] | 2583 | ;;; Reduce an object to canonical (normalized) form. [O o; Z Z] [Public] |
| 2584 | 2584 | ||
| 2585 | (defvar math-normalize-a) | 2585 | (defvar math-normalize-a) |
| 2586 | (defvar math-normalize-error nil | ||
| 2587 | "Non-nil if the last call the `math-normalize' returned an error.") | ||
| 2588 | |||
| 2586 | (defun math-normalize (math-normalize-a) | 2589 | (defun math-normalize (math-normalize-a) |
| 2590 | (setq math-normalize-error nil) | ||
| 2587 | (cond | 2591 | (cond |
| 2588 | ((not (consp math-normalize-a)) | 2592 | ((not (consp math-normalize-a)) |
| 2589 | (if (integerp math-normalize-a) | 2593 | (if (integerp math-normalize-a) |
| @@ -2672,31 +2676,38 @@ largest Emacs integer.") | |||
| 2672 | (fboundp (car math-normalize-a)))) | 2676 | (fboundp (car math-normalize-a)))) |
| 2673 | (apply (car math-normalize-a) args))))) | 2677 | (apply (car math-normalize-a) args))))) |
| 2674 | (wrong-number-of-arguments | 2678 | (wrong-number-of-arguments |
| 2679 | (setq math-normalize-error t) | ||
| 2675 | (calc-record-why "*Wrong number of arguments" | 2680 | (calc-record-why "*Wrong number of arguments" |
| 2676 | (cons (car math-normalize-a) args)) | 2681 | (cons (car math-normalize-a) args)) |
| 2677 | nil) | 2682 | nil) |
| 2678 | (wrong-type-argument | 2683 | (wrong-type-argument |
| 2684 | (setq math-normalize-error t) | ||
| 2679 | (or calc-next-why | 2685 | (or calc-next-why |
| 2680 | (calc-record-why "Wrong type of argument" | 2686 | (calc-record-why "Wrong type of argument" |
| 2681 | (cons (car math-normalize-a) args))) | 2687 | (cons (car math-normalize-a) args))) |
| 2682 | nil) | 2688 | nil) |
| 2683 | (args-out-of-range | 2689 | (args-out-of-range |
| 2690 | (setq math-normalize-error t) | ||
| 2684 | (calc-record-why "*Argument out of range" | 2691 | (calc-record-why "*Argument out of range" |
| 2685 | (cons (car math-normalize-a) args)) | 2692 | (cons (car math-normalize-a) args)) |
| 2686 | nil) | 2693 | nil) |
| 2687 | (inexact-result | 2694 | (inexact-result |
| 2695 | (setq math-normalize-error t) | ||
| 2688 | (calc-record-why "No exact representation for result" | 2696 | (calc-record-why "No exact representation for result" |
| 2689 | (cons (car math-normalize-a) args)) | 2697 | (cons (car math-normalize-a) args)) |
| 2690 | nil) | 2698 | nil) |
| 2691 | (math-overflow | 2699 | (math-overflow |
| 2700 | (setq math-normalize-error t) | ||
| 2692 | (calc-record-why "*Floating-point overflow occurred" | 2701 | (calc-record-why "*Floating-point overflow occurred" |
| 2693 | (cons (car math-normalize-a) args)) | 2702 | (cons (car math-normalize-a) args)) |
| 2694 | nil) | 2703 | nil) |
| 2695 | (math-underflow | 2704 | (math-underflow |
| 2705 | (setq math-normalize-error t) | ||
| 2696 | (calc-record-why "*Floating-point underflow occurred" | 2706 | (calc-record-why "*Floating-point underflow occurred" |
| 2697 | (cons (car math-normalize-a) args)) | 2707 | (cons (car math-normalize-a) args)) |
| 2698 | nil) | 2708 | nil) |
| 2699 | (void-variable | 2709 | (void-variable |
| 2710 | (setq math-normalize-error t) | ||
| 2700 | (if (eq (nth 1 err) 'var-EvalRules) | 2711 | (if (eq (nth 1 err) 'var-EvalRules) |
| 2701 | (progn | 2712 | (progn |
| 2702 | (setq var-EvalRules nil) | 2713 | (setq var-EvalRules nil) |
diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog index d98ef42438c..b946e756ff8 100644 --- a/lisp/cedet/ChangeLog +++ b/lisp/cedet/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2012-07-29 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | inaccessable -> inaccessible spelling fix (Bug#10052) | ||
| 4 | * semantic/wisent/comp.el (wisent-inaccessible-symbols): | ||
| 5 | Rename from wisent-inaccessable-symbols, fixing a misspelling. | ||
| 6 | Caller changed. | ||
| 7 | |||
| 1 | 2012-07-09 Andreas Schwab <schwab@linux-m68k.org> | 8 | 2012-07-09 Andreas Schwab <schwab@linux-m68k.org> |
| 2 | 9 | ||
| 3 | * ede/project-am.el: Fix typo. | 10 | * ede/project-am.el: Fix typo. |
diff --git a/lisp/cedet/semantic/wisent/comp.el b/lisp/cedet/semantic/wisent/comp.el index b0daabd1063..30dbafaa6cc 100644 --- a/lisp/cedet/semantic/wisent/comp.el +++ b/lisp/cedet/semantic/wisent/comp.el | |||
| @@ -550,7 +550,7 @@ S must be a vector of integers." | |||
| 550 | N Ns))) | 550 | N Ns))) |
| 551 | (setq N Np))) | 551 | (setq N Np))) |
| 552 | 552 | ||
| 553 | (defun wisent-inaccessable-symbols () | 553 | (defun wisent-inaccessible-symbols () |
| 554 | "Find out which productions are reachable and which symbols are used." | 554 | "Find out which productions are reachable and which symbols are used." |
| 555 | ;; Starting with an empty set of productions and a set of symbols | 555 | ;; Starting with an empty set of productions and a set of symbols |
| 556 | ;; which only has the start symbol in it, iterate over all | 556 | ;; which only has the start symbol in it, iterate over all |
| @@ -709,7 +709,7 @@ S must be a vector of integers." | |||
| 709 | nuseless-productions 0) | 709 | nuseless-productions 0) |
| 710 | 710 | ||
| 711 | (wisent-useless-nonterminals) | 711 | (wisent-useless-nonterminals) |
| 712 | (wisent-inaccessable-symbols) | 712 | (wisent-inaccessible-symbols) |
| 713 | 713 | ||
| 714 | (when (> (+ nuseless-nonterminals nuseless-productions) 0) | 714 | (when (> (+ nuseless-nonterminals nuseless-productions) 0) |
| 715 | (wisent-total-useless) | 715 | (wisent-total-useless) |
diff --git a/lisp/dos-w32.el b/lisp/dos-w32.el index f68af7a73be..4839d6b9239 100644 --- a/lisp/dos-w32.el +++ b/lisp/dos-w32.el | |||
| @@ -361,7 +361,7 @@ filesystem mounted on drive Z:, FILESYSTEM could be \"Z:\"." | |||
| 361 | (apply 'call-process lpr-prog nil errbuf nil rest)) | 361 | (apply 'call-process lpr-prog nil errbuf nil rest)) |
| 362 | ;; Run command.com to access printer port on Windows 9x, unless | 362 | ;; Run command.com to access printer port on Windows 9x, unless |
| 363 | ;; we are supposed to append to an existing (non-empty) file, | 363 | ;; we are supposed to append to an existing (non-empty) file, |
| 364 | ;; to work around a bug in Windows 9x that prevents Win32 | 364 | ;; to work around a bug in Windows 9x that prevents Windows |
| 365 | ;; programs from accessing LPT ports reliably. | 365 | ;; programs from accessing LPT ports reliably. |
| 366 | ((and (eq system-type 'windows-nt) | 366 | ((and (eq system-type 'windows-nt) |
| 367 | (getenv "winbootdir") | 367 | (getenv "winbootdir") |
diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el index 76a8c410676..9f0826bf515 100644 --- a/lisp/emulation/viper-init.el +++ b/lisp/emulation/viper-init.el | |||
| @@ -316,7 +316,7 @@ Use `M-x viper-set-expert-level' to change this.") | |||
| 316 | )) | 316 | )) |
| 317 | 317 | ||
| 318 | ;; viper hook to run on input-method deactivation | 318 | ;; viper hook to run on input-method deactivation |
| 319 | (defun viper-inactivate-input-method-action () | 319 | (defun viper-deactivate-input-method-action () |
| 320 | (if (null viper-mule-hook-flag) | 320 | (if (null viper-mule-hook-flag) |
| 321 | () | 321 | () |
| 322 | (setq viper-special-input-method nil) | 322 | (setq viper-special-input-method nil) |
| @@ -328,9 +328,9 @@ Use `M-x viper-set-expert-level' to change this.") | |||
| 328 | (or current-input-method default-input-method)) | 328 | (or current-input-method default-input-method)) |
| 329 | ""))))) | 329 | ""))))) |
| 330 | 330 | ||
| 331 | (defun viper-inactivate-input-method () | 331 | (defun viper-deactivate-input-method () |
| 332 | (cond ((and (featurep 'emacs) (fboundp 'inactivate-input-method)) | 332 | (cond ((and (featurep 'emacs) (fboundp 'deactivate-input-method)) |
| 333 | (inactivate-input-method)) | 333 | (deactivate-input-method)) |
| 334 | ((and (featurep 'xemacs) (boundp 'current-input-method)) | 334 | ((and (featurep 'xemacs) (boundp 'current-input-method)) |
| 335 | ;; XEmacs had broken quail-mode for some time, so we are working around | 335 | ;; XEmacs had broken quail-mode for some time, so we are working around |
| 336 | ;; it here | 336 | ;; it here |
| @@ -339,7 +339,9 @@ Use `M-x viper-set-expert-level' to change this.") | |||
| 339 | (quail-delete-overlays)) | 339 | (quail-delete-overlays)) |
| 340 | (setq describe-current-input-method-function nil) | 340 | (setq describe-current-input-method-function nil) |
| 341 | (setq current-input-method nil) | 341 | (setq current-input-method nil) |
| 342 | (run-hooks 'input-method-inactivate-hook) | 342 | (run-hooks |
| 343 | 'input-method-inactivate-hook ; for backward compatibility | ||
| 344 | 'input-method-deactivate-hook) | ||
| 343 | (force-mode-line-update)) | 345 | (force-mode-line-update)) |
| 344 | )) | 346 | )) |
| 345 | (defun viper-activate-input-method () | 347 | (defun viper-activate-input-method () |
| @@ -356,7 +358,7 @@ Use `M-x viper-set-expert-level' to change this.") | |||
| 356 | ;; activate input method | 358 | ;; activate input method |
| 357 | (viper-activate-input-method)) | 359 | (viper-activate-input-method)) |
| 358 | (t ; deactivate input method | 360 | (t ; deactivate input method |
| 359 | (viper-inactivate-input-method))) | 361 | (viper-deactivate-input-method))) |
| 360 | )) | 362 | )) |
| 361 | 363 | ||
| 362 | 364 | ||
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index 4219688a4ba..81fbfb0394c 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el | |||
| @@ -971,9 +971,9 @@ It also can't undo some Viper settings." | |||
| 971 | (if (featurep 'emacs) | 971 | (if (featurep 'emacs) |
| 972 | (eval-after-load "mule-cmds" | 972 | (eval-after-load "mule-cmds" |
| 973 | '(progn | 973 | '(progn |
| 974 | (defadvice inactivate-input-method (after viper-mule-advice activate) | 974 | (defadvice deactivate-input-method (after viper-mule-advice activate) |
| 975 | "Set viper-special-input-method to disable intl. input methods." | 975 | "Set viper-special-input-method to disable intl. input methods." |
| 976 | (viper-inactivate-input-method-action)) | 976 | (viper-deactivate-input-method-action)) |
| 977 | (defadvice activate-input-method (after viper-mule-advice activate) | 977 | (defadvice activate-input-method (after viper-mule-advice activate) |
| 978 | "Set viper-special-input-method to enable intl. input methods." | 978 | "Set viper-special-input-method to enable intl. input methods." |
| 979 | (viper-activate-input-method-action)) | 979 | (viper-activate-input-method-action)) |
| @@ -985,14 +985,14 @@ It also can't undo some Viper settings." | |||
| 985 | '(progn | 985 | '(progn |
| 986 | (add-hook 'input-method-activate-hook | 986 | (add-hook 'input-method-activate-hook |
| 987 | 'viper-activate-input-method-action t) | 987 | 'viper-activate-input-method-action t) |
| 988 | (add-hook 'input-method-inactivate-hook | 988 | (add-hook 'input-method-deactivate-hook |
| 989 | 'viper-inactivate-input-method-action t))) | 989 | 'viper-deactivate-input-method-action t))) |
| 990 | ) | 990 | ) |
| 991 | (eval-after-load "mule-cmds" | 991 | (eval-after-load "mule-cmds" |
| 992 | '(defadvice toggle-input-method (around viper-mule-advice activate) | 992 | '(defadvice toggle-input-method (around viper-mule-advice activate) |
| 993 | "Adjust input-method toggling in vi-state." | 993 | "Adjust input-method toggling in vi-state." |
| 994 | (if (and viper-special-input-method (eq viper-current-state 'vi-state)) | 994 | (if (and viper-special-input-method (eq viper-current-state 'vi-state)) |
| 995 | (viper-inactivate-input-method) | 995 | (viper-deactivate-input-method) |
| 996 | ad-do-it))) | 996 | ad-do-it))) |
| 997 | 997 | ||
| 998 | ) ; viper-set-hooks | 998 | ) ; viper-set-hooks |
diff --git a/lisp/follow.el b/lisp/follow.el index 0dea1917f85..a74862cb5d0 100644 --- a/lisp/follow.el +++ b/lisp/follow.el | |||
| @@ -334,8 +334,8 @@ property `follow-mode-use-cache' to non-nil.") | |||
| 334 | (defvar follow-active-menu nil | 334 | (defvar follow-active-menu nil |
| 335 | "The menu visible when Follow mode is active.") | 335 | "The menu visible when Follow mode is active.") |
| 336 | 336 | ||
| 337 | (defvar follow-deactive-menu nil | 337 | (defvar follow-inactive-menu nil |
| 338 | "The menu visible when Follow mode is deactivated.") | 338 | "The menu visible when Follow mode is inactive.") |
| 339 | 339 | ||
| 340 | (defvar follow-inside-post-command-hook nil | 340 | (defvar follow-inside-post-command-hook nil |
| 341 | "Non-nil when inside Follow modes `post-command-hook'. | 341 | "Non-nil when inside Follow modes `post-command-hook'. |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 83cb55d3594..b123b77273e 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,26 @@ | |||
| 1 | 2012-07-29 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 2 | |||
| 3 | * auth-source.el (auth-sources, auth-source-backend-parse) | ||
| 4 | (auth-source-macos-keychain-search) | ||
| 5 | (auth-source-macos-keychain-search-items) | ||
| 6 | (auth-source-macos-keychain-result-append) | ||
| 7 | (auth-source-macos-keychain-create): Support Mac OS X Keychains in | ||
| 8 | auth-source.el through the /usr/bin/security utility. | ||
| 9 | (auth-sources): Fix syntax error. | ||
| 10 | (auth-source-macos-keychain-result-append): Fix variable name. | ||
| 11 | (auth-sources, auth-source-macos-keychain-result-append): More fixes. | ||
| 12 | |||
| 13 | 2012-07-27 Julien Danjou <julien@danjou.info> | ||
| 14 | |||
| 15 | * message.el (fboundp): Add a defalias on `mail-dont-reply-to' for | ||
| 16 | Emacs < 24.1 | ||
| 17 | |||
| 18 | 2012-07-27 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 19 | |||
| 20 | * message.el (message-kill-address): Don't kill last newline. | ||
| 21 | (message-skip-to-next-address): Don't move to the next header. | ||
| 22 | (message-fill-field-address): Work properly. | ||
| 23 | |||
| 1 | 2012-07-25 Julien Danjou <julien@danjou.info> | 24 | 2012-07-25 Julien Danjou <julien@danjou.info> |
| 2 | 25 | ||
| 3 | * gnus-art.el (gnus-kill-sticky-article-buffers): Reintroduce. | 26 | * gnus-art.el (gnus-kill-sticky-article-buffers): Reintroduce. |
diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el index 47359500dc4..79358b401b8 100644 --- a/lisp/gnus/auth-source.el +++ b/lisp/gnus/auth-source.el | |||
| @@ -254,6 +254,13 @@ can get pretty complex." | |||
| 254 | (const :tag "Default Secrets API Collection" 'default) | 254 | (const :tag "Default Secrets API Collection" 'default) |
| 255 | (const :tag "Login Secrets API Collection" "secrets:Login") | 255 | (const :tag "Login Secrets API Collection" "secrets:Login") |
| 256 | (const :tag "Temp Secrets API Collection" "secrets:session") | 256 | (const :tag "Temp Secrets API Collection" "secrets:session") |
| 257 | |||
| 258 | (const :tag "Default internet Mac OS Keychain" | ||
| 259 | 'macos-keychain-internet) | ||
| 260 | |||
| 261 | (const :tag "Default generic Mac OS Keychain" | ||
| 262 | 'macos-keychain-generic) | ||
| 263 | |||
| 257 | (list :tag "Source definition" | 264 | (list :tag "Source definition" |
| 258 | (const :format "" :value :source) | 265 | (const :format "" :value :source) |
| 259 | (choice :tag "Authentication backend choice" | 266 | (choice :tag "Authentication backend choice" |
| @@ -266,7 +273,21 @@ can get pretty complex." | |||
| 266 | (const :tag "Default" 'default) | 273 | (const :tag "Default" 'default) |
| 267 | (const :tag "Login" "Login") | 274 | (const :tag "Login" "Login") |
| 268 | (const | 275 | (const |
| 269 | :tag "Temporary" "session")))) | 276 | :tag "Temporary" "session"))) |
| 277 | (list | ||
| 278 | :tag "Mac OS internet Keychain" | ||
| 279 | (const :format "" | ||
| 280 | :value :macos-keychain-internet) | ||
| 281 | (choice :tag "Collection to use" | ||
| 282 | (string :tag "internet Keychain path") | ||
| 283 | (const :tag "default" 'default))) | ||
| 284 | (list | ||
| 285 | :tag "Mac OS generic Keychain" | ||
| 286 | (const :format "" | ||
| 287 | :value :macos-keychain-generic) | ||
| 288 | (choice :tag "Collection to use" | ||
| 289 | (string :tag "generic Keychain path") | ||
| 290 | (const :tag "default" 'default)))) | ||
| 270 | (repeat :tag "Extra Parameters" :inline t | 291 | (repeat :tag "Extra Parameters" :inline t |
| 271 | (choice :tag "Extra parameter" | 292 | (choice :tag "Extra parameter" |
| 272 | (list | 293 | (list |
| @@ -377,6 +398,10 @@ with \"[a/b/c] \" if CHOICES is '\(?a ?b ?c\)." | |||
| 377 | ;; (auth-source-backend-parse "myfile.gpg") | 398 | ;; (auth-source-backend-parse "myfile.gpg") |
| 378 | ;; (auth-source-backend-parse 'default) | 399 | ;; (auth-source-backend-parse 'default) |
| 379 | ;; (auth-source-backend-parse "secrets:Login") | 400 | ;; (auth-source-backend-parse "secrets:Login") |
| 401 | ;; (auth-source-backend-parse 'macos-keychain-internet) | ||
| 402 | ;; (auth-source-backend-parse 'macos-keychain-generic) | ||
| 403 | ;; (auth-source-backend-parse "macos-keychain-internet:/path/here.keychain") | ||
| 404 | ;; (auth-source-backend-parse "macos-keychain-generic:/path/here.keychain") | ||
| 380 | 405 | ||
| 381 | (defun auth-source-backend-parse (entry) | 406 | (defun auth-source-backend-parse (entry) |
| 382 | "Creates an auth-source-backend from an ENTRY in `auth-sources'." | 407 | "Creates an auth-source-backend from an ENTRY in `auth-sources'." |
| @@ -391,6 +416,28 @@ with \"[a/b/c] \" if CHOICES is '\(?a ?b ?c\)." | |||
| 391 | ;; matching any user, host, and protocol | 416 | ;; matching any user, host, and protocol |
| 392 | ((and (stringp entry) (string-match "^secrets:\\(.+\\)" entry)) | 417 | ((and (stringp entry) (string-match "^secrets:\\(.+\\)" entry)) |
| 393 | (auth-source-backend-parse `(:source (:secrets ,(match-string 1 entry))))) | 418 | (auth-source-backend-parse `(:source (:secrets ,(match-string 1 entry))))) |
| 419 | |||
| 420 | ;; take 'macos-keychain-internet and recurse to get it as a Mac OS | ||
| 421 | ;; Keychain collection matching any user, host, and protocol | ||
| 422 | ((eq entry 'macos-keychain-internet) | ||
| 423 | (auth-source-backend-parse '(:source (:macos-keychain-internet default)))) | ||
| 424 | ;; take 'macos-keychain-generic and recurse to get it as a Mac OS | ||
| 425 | ;; Keychain collection matching any user, host, and protocol | ||
| 426 | ((eq entry 'macos-keychain-generic) | ||
| 427 | (auth-source-backend-parse '(:source (:macos-keychain-generic default)))) | ||
| 428 | ;; take macos-keychain-internet:XYZ and recurse to get it as MacOS | ||
| 429 | ;; Keychain "XYZ" matching any user, host, and protocol | ||
| 430 | ((and (stringp entry) (string-match "^macos-keychain-internet:\\(.+\\)" | ||
| 431 | entry)) | ||
| 432 | (auth-source-backend-parse `(:source (:macos-keychain-internet | ||
| 433 | ,(match-string 1 entry))))) | ||
| 434 | ;; take macos-keychain-generic:XYZ and recurse to get it as MacOS | ||
| 435 | ;; Keychain "XYZ" matching any user, host, and protocol | ||
| 436 | ((and (stringp entry) (string-match "^macos-keychain-generic:\\(.+\\)" | ||
| 437 | entry)) | ||
| 438 | (auth-source-backend-parse `(:source (:macos-keychain-generic | ||
| 439 | ,(match-string 1 entry))))) | ||
| 440 | |||
| 394 | ;; take just a file name and recurse to get it as a netrc file | 441 | ;; take just a file name and recurse to get it as a netrc file |
| 395 | ;; matching any user, host, and protocol | 442 | ;; matching any user, host, and protocol |
| 396 | ((stringp entry) | 443 | ((stringp entry) |
| @@ -413,6 +460,33 @@ with \"[a/b/c] \" if CHOICES is '\(?a ?b ?c\)." | |||
| 413 | :search-function 'auth-source-netrc-search | 460 | :search-function 'auth-source-netrc-search |
| 414 | :create-function 'auth-source-netrc-create))) | 461 | :create-function 'auth-source-netrc-create))) |
| 415 | 462 | ||
| 463 | ;; the MacOS Keychain | ||
| 464 | ((and | ||
| 465 | (not (null (plist-get entry :source))) ; the source must not be nil | ||
| 466 | (listp (plist-get entry :source)) ; and it must be a list | ||
| 467 | (or | ||
| 468 | (plist-get (plist-get entry :source) :macos-keychain-generic) | ||
| 469 | (plist-get (plist-get entry :source) :macos-keychain-internet))) | ||
| 470 | |||
| 471 | (let* ((source-spec (plist-get entry :source)) | ||
| 472 | (keychain-generic (plist-get source-spec :macos-keychain-generic)) | ||
| 473 | (keychain-type (if keychain-generic | ||
| 474 | 'macos-keychain-generic | ||
| 475 | 'macos-keychain-internet)) | ||
| 476 | (source (plist-get source-spec (if keychain-generic | ||
| 477 | :macos-keychain-generic | ||
| 478 | :macos-keychain-internet)))) | ||
| 479 | |||
| 480 | (when (symbolp source) | ||
| 481 | (setq source (symbol-name source))) | ||
| 482 | |||
| 483 | (auth-source-backend | ||
| 484 | (format "Mac OS Keychain (%s)" source) | ||
| 485 | :source source | ||
| 486 | :type keychain-type | ||
| 487 | :search-function 'auth-source-macos-keychain-search | ||
| 488 | :create-function 'auth-source-macos-keychain-create))) | ||
| 489 | |||
| 416 | ;; the Secrets API. We require the package, in order to have a | 490 | ;; the Secrets API. We require the package, in order to have a |
| 417 | ;; defined value for `secrets-enabled'. | 491 | ;; defined value for `secrets-enabled'. |
| 418 | ((and | 492 | ((and |
| @@ -694,6 +768,7 @@ must call it to obtain the actual value." | |||
| 694 | (let* ((bmatches (apply | 768 | (let* ((bmatches (apply |
| 695 | (slot-value backend 'search-function) | 769 | (slot-value backend 'search-function) |
| 696 | :backend backend | 770 | :backend backend |
| 771 | :type (slot-value backend :type) | ||
| 697 | ;; note we're overriding whatever the spec | 772 | ;; note we're overriding whatever the spec |
| 698 | ;; has for :require, :create, and :delete | 773 | ;; has for :require, :create, and :delete |
| 699 | :require require | 774 | :require require |
| @@ -1515,6 +1590,193 @@ authentication tokens: | |||
| 1515 | ;; (apply 'secrets-create-item (auth-get-source entry) name passwd spec) | 1590 | ;; (apply 'secrets-create-item (auth-get-source entry) name passwd spec) |
| 1516 | (debug spec)) | 1591 | (debug spec)) |
| 1517 | 1592 | ||
| 1593 | ;;; Backend specific parsing: Mac OS Keychain (using /usr/bin/security) backend | ||
| 1594 | |||
| 1595 | ;; (let ((auth-sources '(macos-keychain-internet))) (auth-source-search :max 1 :create t)) | ||
| 1596 | ;; (let ((auth-sources '(macos-keychain-internet))) (auth-source-search :max 1 :delete t)) | ||
| 1597 | ;; (let ((auth-sources '(macos-keychain-internet))) (auth-source-search :max 1)) | ||
| 1598 | ;; (let ((auth-sources '(macos-keychain-internet))) (auth-source-search)) | ||
| 1599 | |||
| 1600 | ;; (let ((auth-sources '(macos-keychain-generic))) (auth-source-search :max 1 :create t)) | ||
| 1601 | ;; (let ((auth-sources '(macos-keychain-generic))) (auth-source-search :max 1 :delete t)) | ||
| 1602 | ;; (let ((auth-sources '(macos-keychain-generic))) (auth-source-search :max 1)) | ||
| 1603 | ;; (let ((auth-sources '(macos-keychain-generic))) (auth-source-search)) | ||
| 1604 | |||
| 1605 | ;; (let ((auth-sources '("macos-keychain-internet:/Users/tzz/Library/Keychains/login.keychain"))) (auth-source-search :max 1)) | ||
| 1606 | ;; (let ((auth-sources '("macos-keychain-generic:Login"))) (auth-source-search :max 1 :host "git.gnus.org")) | ||
| 1607 | |||
| 1608 | (defun* auth-source-macos-keychain-search (&rest | ||
| 1609 | spec | ||
| 1610 | &key backend create delete label | ||
| 1611 | type max host user port | ||
| 1612 | &allow-other-keys) | ||
| 1613 | "Search the MacOS Keychain; spec is like `auth-source'. | ||
| 1614 | |||
| 1615 | All search keys must match exactly. If you need substring | ||
| 1616 | matching, do a wider search and narrow it down yourself. | ||
| 1617 | |||
| 1618 | You'll get back all the properties of the token as a plist. | ||
| 1619 | |||
| 1620 | The :type key is either 'macos-keychain-internet or | ||
| 1621 | 'macos-keychain-generic. | ||
| 1622 | |||
| 1623 | For the internet keychain type, the :label key searches the | ||
| 1624 | item's labels (\"-l LABEL\" passed to \"/usr/bin/security\"). | ||
| 1625 | Similarly, :host maps to \"-s HOST\", :user maps to \"-a USER\", | ||
| 1626 | and :port maps to \"-P PORT\" or \"-r PROT\" | ||
| 1627 | (note PROT has to be a 4-character string). | ||
| 1628 | |||
| 1629 | For the generic keychain type, the :label key searches the item's | ||
| 1630 | labels (\"-l LABEL\" passed to \"/usr/bin/security\"). | ||
| 1631 | Similarly, :host maps to \"-c HOST\" (the \"creator\" keychain | ||
| 1632 | field), :user maps to \"-a USER\", and :port maps to \"-s PORT\". | ||
| 1633 | |||
| 1634 | Here's an example that looks for the first item in the default | ||
| 1635 | generic MacOS Keychain: | ||
| 1636 | |||
| 1637 | \(let ((auth-sources '(macos-keychain-generic))) | ||
| 1638 | (auth-source-search :max 1) | ||
| 1639 | |||
| 1640 | Here's another that looks for the first item in the internet | ||
| 1641 | MacOS Keychain collection whose label is 'gnus': | ||
| 1642 | |||
| 1643 | \(let ((auth-sources '(macos-keychain-internet))) | ||
| 1644 | (auth-source-search :max 1 :label \"gnus\") | ||
| 1645 | |||
| 1646 | And this one looks for the first item in the internet keychain | ||
| 1647 | entries for git.gnus.org: | ||
| 1648 | |||
| 1649 | \(let ((auth-sources '(macos-keychain-internet\"))) | ||
| 1650 | (auth-source-search :max 1 :host \"git.gnus.org\")) | ||
| 1651 | " | ||
| 1652 | ;; TODO | ||
| 1653 | (assert (not create) nil | ||
| 1654 | "The MacOS Keychain auth-source backend doesn't support creation yet") | ||
| 1655 | ;; TODO | ||
| 1656 | ;; (macos-keychain-delete-item coll elt) | ||
| 1657 | (assert (not delete) nil | ||
| 1658 | "The MacOS Keychain auth-source backend doesn't support deletion yet") | ||
| 1659 | |||
| 1660 | (let* ((coll (oref backend source)) | ||
| 1661 | (max (or max 5000)) ; sanity check: default to stop at 5K | ||
| 1662 | (ignored-keys '(:create :delete :max :backend :label)) | ||
| 1663 | (search-keys (loop for i below (length spec) by 2 | ||
| 1664 | unless (memq (nth i spec) ignored-keys) | ||
| 1665 | collect (nth i spec))) | ||
| 1666 | ;; build a search spec without the ignored keys | ||
| 1667 | ;; if a search key is nil or t (match anything), we skip it | ||
| 1668 | (search-spec (apply 'append (mapcar | ||
| 1669 | (lambda (k) | ||
| 1670 | (if (or (null (plist-get spec k)) | ||
| 1671 | (eq t (plist-get spec k))) | ||
| 1672 | nil | ||
| 1673 | (list k (plist-get spec k)))) | ||
| 1674 | search-keys))) | ||
| 1675 | ;; needed keys (always including host, login, port, and secret) | ||
| 1676 | (returned-keys (mm-delete-duplicates (append | ||
| 1677 | '(:host :login :port :secret) | ||
| 1678 | search-keys))) | ||
| 1679 | (items (apply 'auth-source-macos-keychain-search-items | ||
| 1680 | coll | ||
| 1681 | type | ||
| 1682 | max | ||
| 1683 | search-spec)) | ||
| 1684 | |||
| 1685 | ;; ensure each item has each key in `returned-keys' | ||
| 1686 | (items (mapcar (lambda (plist) | ||
| 1687 | (append | ||
| 1688 | (apply 'append | ||
| 1689 | (mapcar (lambda (req) | ||
| 1690 | (if (plist-get plist req) | ||
| 1691 | nil | ||
| 1692 | (list req nil))) | ||
| 1693 | returned-keys)) | ||
| 1694 | plist)) | ||
| 1695 | items))) | ||
| 1696 | items)) | ||
| 1697 | |||
| 1698 | (defun* auth-source-macos-keychain-search-items (coll type max | ||
| 1699 | &rest spec | ||
| 1700 | &key label type | ||
| 1701 | host user port | ||
| 1702 | &allow-other-keys) | ||
| 1703 | |||
| 1704 | (let* ((keychain-generic (eq type 'macos-keychain-generic)) | ||
| 1705 | (args `(,(if keychain-generic | ||
| 1706 | "find-generic-password" | ||
| 1707 | "find-internet-password") | ||
| 1708 | "-g")) | ||
| 1709 | (ret (list :type type))) | ||
| 1710 | (when label | ||
| 1711 | (setq args (append args (list "-l" label)))) | ||
| 1712 | (when host | ||
| 1713 | (setq args (append args (list (if keychain-generic "-c" "-s") host)))) | ||
| 1714 | (when user | ||
| 1715 | (setq args (append args (list "-a" user)))) | ||
| 1716 | |||
| 1717 | (when port | ||
| 1718 | (if keychain-generic | ||
| 1719 | (setq args (append args (list "-s" port))) | ||
| 1720 | (setq args (append args (list | ||
| 1721 | (if (string-match "[0-9]+" port) "-P" "-r") | ||
| 1722 | port))))) | ||
| 1723 | |||
| 1724 | (unless (equal coll "default") | ||
| 1725 | (setq args (append args (list coll)))) | ||
| 1726 | |||
| 1727 | (with-temp-buffer | ||
| 1728 | (apply 'call-process "/usr/bin/security" nil t nil args) | ||
| 1729 | (goto-char (point-min)) | ||
| 1730 | (while (not (eobp)) | ||
| 1731 | (cond | ||
| 1732 | ((looking-at "^password: \"\\(.+\\)\"$") | ||
| 1733 | (auth-source-macos-keychain-result-append | ||
| 1734 | ret | ||
| 1735 | keychain-generic | ||
| 1736 | "secret" | ||
| 1737 | (lexical-let ((v (match-string 1))) | ||
| 1738 | (lambda () v)))) | ||
| 1739 | ;; TODO: check if this is really the label | ||
| 1740 | ;; match 0x00000007 <blob>="AppleID" | ||
| 1741 | ((looking-at "^[ ]+0x00000007 <blob>=\"\\(.+\\)\"") | ||
| 1742 | (auth-source-macos-keychain-result-append | ||
| 1743 | ret | ||
| 1744 | keychain-generic | ||
| 1745 | "label" | ||
| 1746 | (match-string 1))) | ||
| 1747 | ;; match "crtr"<uint32>="aapl" | ||
| 1748 | ;; match "svce"<blob>="AppleID" | ||
| 1749 | ((looking-at "^[ ]+\"\\([a-z]+\\)\"[^=]+=\"\\(.+\\)\"") | ||
| 1750 | (auth-source-macos-keychain-result-append | ||
| 1751 | ret | ||
| 1752 | keychain-generic | ||
| 1753 | (match-string 1) | ||
| 1754 | (match-string 2)))) | ||
| 1755 | (forward-line))) | ||
| 1756 | ;; return `ret' iff it has the :secret key | ||
| 1757 | (and (plist-get ret :secret) (list ret)))) | ||
| 1758 | |||
| 1759 | (defun auth-source-macos-keychain-result-append (result generic k v) | ||
| 1760 | (push v result) | ||
| 1761 | (setq k (cond | ||
| 1762 | ((equal k "acct") "user") | ||
| 1763 | ;; for generic keychains, creator is host, service is port | ||
| 1764 | ((and generic (equal k "crtr")) "host") | ||
| 1765 | ((and generic (equal k "svce")) "port") | ||
| 1766 | ;; for internet keychains, protocol is port, server is host | ||
| 1767 | ((and (not generic) (equal k "ptcl")) "port") | ||
| 1768 | ((and (not generic) (equal k "srvr")) "host") | ||
| 1769 | (t k))) | ||
| 1770 | |||
| 1771 | (push (intern (format ":%s" k)) result)) | ||
| 1772 | |||
| 1773 | (defun* auth-source-macos-keychain-create (&rest | ||
| 1774 | spec | ||
| 1775 | &key backend type max host user port | ||
| 1776 | &allow-other-keys) | ||
| 1777 | ;; TODO | ||
| 1778 | (debug spec)) | ||
| 1779 | |||
| 1518 | ;;; Backend specific parsing: PLSTORE backend | 1780 | ;;; Backend specific parsing: PLSTORE backend |
| 1519 | 1781 | ||
| 1520 | (defun* auth-source-plstore-search (&rest | 1782 | (defun* auth-source-plstore-search (&rest |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index ecc797314c4..939d56bbfd8 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -1933,10 +1933,13 @@ You must have the \"hashcash\" binary installed, see `hashcash-path'." | |||
| 1933 | (autoload 'nndraft-request-associate-buffer "nndraft") | 1933 | (autoload 'nndraft-request-associate-buffer "nndraft") |
| 1934 | (autoload 'nndraft-request-expire-articles "nndraft") | 1934 | (autoload 'nndraft-request-expire-articles "nndraft") |
| 1935 | (autoload 'nnvirtual-find-group-art "nnvirtual") | 1935 | (autoload 'nnvirtual-find-group-art "nnvirtual") |
| 1936 | (autoload 'mail-dont-reply-to "mail-utils") | ||
| 1937 | (autoload 'rmail-msg-is-pruned "rmail") | 1936 | (autoload 'rmail-msg-is-pruned "rmail") |
| 1938 | (autoload 'rmail-output "rmailout") | 1937 | (autoload 'rmail-output "rmailout") |
| 1939 | 1938 | ||
| 1939 | ;; Emacs < 24.1 do not have mail-dont-reply-to | ||
| 1940 | (unless (fboundp 'mail-dont-reply-to) | ||
| 1941 | (defalias 'mail-dont-reply-to 'rmail-dont-reply-to)) | ||
| 1942 | |||
| 1940 | 1943 | ||
| 1941 | 1944 | ||
| 1942 | ;;; | 1945 | ;;; |
| @@ -2603,7 +2606,7 @@ Point is left at the beginning of the narrowed-to region." | |||
| 2603 | (interactive) | 2606 | (interactive) |
| 2604 | (let ((start (point))) | 2607 | (let ((start (point))) |
| 2605 | (message-skip-to-next-address) | 2608 | (message-skip-to-next-address) |
| 2606 | (kill-region start (point)))) | 2609 | (kill-region start (if (bolp) (1- (point)) (point))))) |
| 2607 | 2610 | ||
| 2608 | 2611 | ||
| 2609 | (autoload 'Info-goto-node "info") | 2612 | (autoload 'Info-goto-node "info") |
| @@ -6099,7 +6102,7 @@ Headers already prepared in the buffer are not modified." | |||
| 6099 | (while (and (not (= (point) end)) | 6102 | (while (and (not (= (point) end)) |
| 6100 | (or (not (eq char ?,)) | 6103 | (or (not (eq char ?,)) |
| 6101 | quoted)) | 6104 | quoted)) |
| 6102 | (skip-chars-forward "^,\"" (point-max)) | 6105 | (skip-chars-forward "^,\"" end) |
| 6103 | (when (eq (setq char (following-char)) ?\") | 6106 | (when (eq (setq char (following-char)) ?\") |
| 6104 | (setq quoted (not quoted))) | 6107 | (setq quoted (not quoted))) |
| 6105 | (unless (= (point) end) | 6108 | (unless (= (point) end) |
| @@ -6136,17 +6139,22 @@ If the current line has `message-yank-prefix', insert it on the new line." | |||
| 6136 | (point-max)))) | 6139 | (point-max)))) |
| 6137 | 6140 | ||
| 6138 | (defun message-fill-field-address () | 6141 | (defun message-fill-field-address () |
| 6139 | (while (not (eobp)) | 6142 | (let (end last) |
| 6140 | (message-skip-to-next-address) | 6143 | (while (not end) |
| 6141 | (let (last) | 6144 | (message-skip-to-next-address) |
| 6142 | (if (and (> (current-column) 78) | 6145 | (cond ((bolp) |
| 6143 | last) | 6146 | (end-of-line 0) |
| 6144 | (progn | 6147 | (setq end 1)) |
| 6145 | (save-excursion | 6148 | ((eobp) |
| 6146 | (goto-char last) | 6149 | (setq end 0))) |
| 6147 | (insert "\n\t")) | 6150 | (when (and (> (current-column) 78) |
| 6148 | (setq last (1+ (point)))) | 6151 | last) |
| 6149 | (setq last (1+ (point))))))) | 6152 | (save-excursion |
| 6153 | (goto-char last) | ||
| 6154 | (delete-char (- (skip-chars-backward " \t"))) | ||
| 6155 | (insert "\n\t"))) | ||
| 6156 | (setq last (point))) | ||
| 6157 | (forward-line end))) | ||
| 6150 | 6158 | ||
| 6151 | (defun message-fill-field-general () | 6159 | (defun message-fill-field-general () |
| 6152 | (let ((begin (point)) | 6160 | (let ((begin (point)) |
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 93c0cbf47f1..a6ea2c1796c 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el | |||
| @@ -92,7 +92,7 @@ | |||
| 92 | (bindings--define-key map [set-keyboard-coding-system] | 92 | (bindings--define-key map [set-keyboard-coding-system] |
| 93 | '(menu-item "For Keyboard" set-keyboard-coding-system | 93 | '(menu-item "For Keyboard" set-keyboard-coding-system |
| 94 | :help "How to decode keyboard input")) | 94 | :help "How to decode keyboard input")) |
| 95 | 95 | ||
| 96 | (bindings--define-key map [separator-2] menu-bar-separator) | 96 | (bindings--define-key map [separator-2] menu-bar-separator) |
| 97 | (bindings--define-key map [set-file-name-coding-system] | 97 | (bindings--define-key map [set-file-name-coding-system] |
| 98 | '(menu-item "For File Name" set-file-name-coding-system | 98 | '(menu-item "For File Name" set-file-name-coding-system |
| @@ -128,7 +128,7 @@ | |||
| 128 | `(menu-item "Describe Language Environment" | 128 | `(menu-item "Describe Language Environment" |
| 129 | ,describe-language-environment-map | 129 | ,describe-language-environment-map |
| 130 | :help "Show multilingual settings for a specific language")) | 130 | :help "Show multilingual settings for a specific language")) |
| 131 | 131 | ||
| 132 | (bindings--define-key map [separator-coding-system] menu-bar-separator) | 132 | (bindings--define-key map [separator-coding-system] menu-bar-separator) |
| 133 | (bindings--define-key map [view-hello-file] | 133 | (bindings--define-key map [view-hello-file] |
| 134 | '(menu-item "Show Multilingual Sample Text" view-hello-file | 134 | '(menu-item "Show Multilingual Sample Text" view-hello-file |
| @@ -1331,15 +1331,15 @@ of `history-length', which see.") | |||
| 1331 | (make-variable-buffer-local 'input-method-history) | 1331 | (make-variable-buffer-local 'input-method-history) |
| 1332 | (put 'input-method-history 'permanent-local t) | 1332 | (put 'input-method-history 'permanent-local t) |
| 1333 | 1333 | ||
| 1334 | (defvar inactivate-current-input-method-function nil | 1334 | (defvar deactivate-current-input-method-function nil |
| 1335 | "Function to call for inactivating the current input method. | 1335 | "Function to call for deactivating the current input method. |
| 1336 | Every input method should set this to an appropriate value when activated. | 1336 | Every input method should set this to an appropriate value when activated. |
| 1337 | This function is called with no argument. | 1337 | This function is called with no argument. |
| 1338 | 1338 | ||
| 1339 | This function should never change the value of `current-input-method'. | 1339 | This function should never change the value of `current-input-method'. |
| 1340 | It is set to nil by the function `inactivate-input-method'.") | 1340 | It is set to nil by the function `deactivate-input-method'.") |
| 1341 | (make-variable-buffer-local 'inactivate-current-input-method-function) | 1341 | (make-variable-buffer-local 'deactivate-current-input-method-function) |
| 1342 | (put 'inactivate-current-input-method-function 'permanent-local t) | 1342 | (put 'deactivate-current-input-method-function 'permanent-local t) |
| 1343 | 1343 | ||
| 1344 | (defvar describe-current-input-method-function nil | 1344 | (defvar describe-current-input-method-function nil |
| 1345 | "Function to call for describing the current input method. | 1345 | "Function to call for describing the current input method. |
| @@ -1426,7 +1426,7 @@ If INPUT-METHOD is nil, deactivate any current input method." | |||
| 1426 | (setq input-method (symbol-name input-method))) | 1426 | (setq input-method (symbol-name input-method))) |
| 1427 | (if (and current-input-method | 1427 | (if (and current-input-method |
| 1428 | (not (string= current-input-method input-method))) | 1428 | (not (string= current-input-method input-method))) |
| 1429 | (inactivate-input-method)) | 1429 | (deactivate-input-method)) |
| 1430 | (unless (or current-input-method (null input-method)) | 1430 | (unless (or current-input-method (null input-method)) |
| 1431 | (let ((slot (assoc input-method input-method-alist))) | 1431 | (let ((slot (assoc input-method input-method-alist))) |
| 1432 | (if (null slot) | 1432 | (if (null slot) |
| @@ -1447,7 +1447,7 @@ If INPUT-METHOD is nil, deactivate any current input method." | |||
| 1447 | (run-hooks 'input-method-activate-hook) | 1447 | (run-hooks 'input-method-activate-hook) |
| 1448 | (force-mode-line-update))))) | 1448 | (force-mode-line-update))))) |
| 1449 | 1449 | ||
| 1450 | (defun inactivate-input-method () | 1450 | (defun deactivate-input-method () |
| 1451 | "Turn off the current input method." | 1451 | "Turn off the current input method." |
| 1452 | (when current-input-method | 1452 | (when current-input-method |
| 1453 | (if input-method-history | 1453 | (if input-method-history |
| @@ -1460,12 +1460,18 @@ If INPUT-METHOD is nil, deactivate any current input method." | |||
| 1460 | (progn | 1460 | (progn |
| 1461 | (setq input-method-function nil | 1461 | (setq input-method-function nil |
| 1462 | current-input-method-title nil) | 1462 | current-input-method-title nil) |
| 1463 | (funcall inactivate-current-input-method-function)) | 1463 | (funcall deactivate-current-input-method-function)) |
| 1464 | (unwind-protect | 1464 | (unwind-protect |
| 1465 | (run-hooks 'input-method-inactivate-hook) | 1465 | (run-hooks |
| 1466 | 'input-method-inactivate-hook ; for backward compatibility | ||
| 1467 | 'input-method-deactivate-hook) | ||
| 1466 | (setq current-input-method nil) | 1468 | (setq current-input-method nil) |
| 1467 | (force-mode-line-update))))) | 1469 | (force-mode-line-update))))) |
| 1468 | 1470 | ||
| 1471 | (define-obsolete-function-alias | ||
| 1472 | 'inactivate-input-method | ||
| 1473 | 'deactivate-input-method "24.2") | ||
| 1474 | |||
| 1469 | (defun set-input-method (input-method &optional interactive) | 1475 | (defun set-input-method (input-method &optional interactive) |
| 1470 | "Select and activate input method INPUT-METHOD for the current buffer. | 1476 | "Select and activate input method INPUT-METHOD for the current buffer. |
| 1471 | This also sets the default input method to the one you specify. | 1477 | This also sets the default input method to the one you specify. |
| @@ -1476,7 +1482,7 @@ When called interactively, the optional arg INTERACTIVE is non-nil, | |||
| 1476 | which marks the variable `default-input-method' as set for Custom buffers. | 1482 | which marks the variable `default-input-method' as set for Custom buffers. |
| 1477 | 1483 | ||
| 1478 | To deactivate the input method interactively, use \\[toggle-input-method]. | 1484 | To deactivate the input method interactively, use \\[toggle-input-method]. |
| 1479 | To deactivate it programmatically, use `inactivate-input-method'." | 1485 | To deactivate it programmatically, use `deactivate-input-method'." |
| 1480 | (interactive | 1486 | (interactive |
| 1481 | (let* ((default (or (car input-method-history) default-input-method))) | 1487 | (let* ((default (or (car input-method-history) default-input-method))) |
| 1482 | (list (read-input-method-name | 1488 | (list (read-input-method-name |
| @@ -1513,7 +1519,7 @@ which marks the variable `default-input-method' as set for Custom buffers." | |||
| 1513 | (if toggle-input-method-active | 1519 | (if toggle-input-method-active |
| 1514 | (error "Recursive use of `toggle-input-method'")) | 1520 | (error "Recursive use of `toggle-input-method'")) |
| 1515 | (if (and current-input-method (not arg)) | 1521 | (if (and current-input-method (not arg)) |
| 1516 | (inactivate-input-method) | 1522 | (deactivate-input-method) |
| 1517 | (let ((toggle-input-method-active t) | 1523 | (let ((toggle-input-method-active t) |
| 1518 | (default (or (car input-method-history) default-input-method))) | 1524 | (default (or (car input-method-history) default-input-method))) |
| 1519 | (if (and arg default (equal current-input-method default) | 1525 | (if (and arg default (equal current-input-method default) |
| @@ -1640,13 +1646,18 @@ just activated." | |||
| 1640 | :type 'hook | 1646 | :type 'hook |
| 1641 | :group 'mule) | 1647 | :group 'mule) |
| 1642 | 1648 | ||
| 1643 | (defcustom input-method-inactivate-hook nil | 1649 | (define-obsolete-variable-alias |
| 1644 | "Normal hook run just after an input method is inactivated. | 1650 | 'input-method-inactivate-hook |
| 1651 | 'input-method-deactivate-hook "24.2") | ||
| 1652 | |||
| 1653 | (defcustom input-method-deactivate-hook nil | ||
| 1654 | "Normal hook run just after an input method is deactivated. | ||
| 1645 | 1655 | ||
| 1646 | The variable `current-input-method' still keeps the input method name | 1656 | The variable `current-input-method' still keeps the input method name |
| 1647 | just inactivated." | 1657 | just deactivated." |
| 1648 | :type 'hook | 1658 | :type 'hook |
| 1649 | :group 'mule) | 1659 | :group 'mule |
| 1660 | :version "24.2") | ||
| 1650 | 1661 | ||
| 1651 | (defcustom input-method-after-insert-chunk-hook nil | 1662 | (defcustom input-method-after-insert-chunk-hook nil |
| 1652 | "Normal hook run just after an input method insert some chunk of text." | 1663 | "Normal hook run just after an input method insert some chunk of text." |
| @@ -2662,15 +2673,6 @@ See also `locale-charset-language-names', `locale-language-names', | |||
| 2662 | (unless frame (setq locale-coding-system code-page-coding)) | 2673 | (unless frame (setq locale-coding-system code-page-coding)) |
| 2663 | (set-keyboard-coding-system code-page-coding frame) | 2674 | (set-keyboard-coding-system code-page-coding frame) |
| 2664 | (set-terminal-coding-system code-page-coding frame) | 2675 | (set-terminal-coding-system code-page-coding frame) |
| 2665 | ;; Set default-file-name-coding-system last, so that Emacs | ||
| 2666 | ;; doesn't try to use cpNNNN when it defines keyboard and | ||
| 2667 | ;; terminal encoding. That's because the above two lines | ||
| 2668 | ;; will want to load code-pages.el, where cpNNNN are | ||
| 2669 | ;; defined; if default-file-name-coding-system were set to | ||
| 2670 | ;; cpNNNN while these two lines run, Emacs will want to use | ||
| 2671 | ;; it for encoding the file name it wants to load. And that | ||
| 2672 | ;; will fail, since cpNNNN is not yet usable until | ||
| 2673 | ;; code-pages.el finishes loading. | ||
| 2674 | (setq default-file-name-coding-system code-page-coding)))) | 2676 | (setq default-file-name-coding-system code-page-coding)))) |
| 2675 | 2677 | ||
| 2676 | (when (eq system-type 'darwin) | 2678 | (when (eq system-type 'darwin) |
diff --git a/lisp/international/quail.el b/lisp/international/quail.el index fecc9427731..65ef807c238 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el | |||
| @@ -540,32 +540,36 @@ non-Quail commands." | |||
| 540 | (if (and (overlayp quail-conv-overlay) (overlay-start quail-conv-overlay)) | 540 | (if (and (overlayp quail-conv-overlay) (overlay-start quail-conv-overlay)) |
| 541 | (delete-overlay quail-conv-overlay))) | 541 | (delete-overlay quail-conv-overlay))) |
| 542 | 542 | ||
| 543 | (defun quail-inactivate () | 543 | (defun quail-deactivate () |
| 544 | "Inactivate Quail input method. | 544 | "Deactivate Quail input method. |
| 545 | 545 | ||
| 546 | This function runs the normal hook `quail-inactivate-hook'." | 546 | This function runs the normal hook `quail-deactivate-hook'." |
| 547 | (interactive) | 547 | (interactive) |
| 548 | (quail-activate -1)) | 548 | (quail-activate -1)) |
| 549 | 549 | ||
| 550 | (define-obsolete-function-alias 'quail-inactivate 'quail-deactivate "24.2") | ||
| 551 | |||
| 550 | (defun quail-activate (&optional arg) | 552 | (defun quail-activate (&optional arg) |
| 551 | "Activate Quail input method. | 553 | "Activate Quail input method. |
| 552 | With ARG, activate Quail input method if and only if arg is positive. | 554 | With ARG, activate Quail input method if and only if arg is positive. |
| 553 | 555 | ||
| 554 | This function runs `quail-activate-hook' if it activates the input | 556 | This function runs `quail-activate-hook' if it activates the input |
| 555 | method, `quail-inactivate-hook' if it deactivates it. | 557 | method, `quail-deactivate-hook' if it deactivates it. |
| 556 | 558 | ||
| 557 | While this input method is active, the variable | 559 | While this input method is active, the variable |
| 558 | `input-method-function' is bound to the function `quail-input-method'." | 560 | `input-method-function' is bound to the function `quail-input-method'." |
| 559 | (if (and arg | 561 | (if (and arg |
| 560 | (< (prefix-numeric-value arg) 0)) | 562 | (< (prefix-numeric-value arg) 0)) |
| 561 | ;; Let's inactivate Quail input method. | 563 | ;; Let's deactivate Quail input method. |
| 562 | (unwind-protect | 564 | (unwind-protect |
| 563 | (progn | 565 | (progn |
| 564 | (quail-delete-overlays) | 566 | (quail-delete-overlays) |
| 565 | (setq describe-current-input-method-function nil) | 567 | (setq describe-current-input-method-function nil) |
| 566 | (quail-hide-guidance) | 568 | (quail-hide-guidance) |
| 567 | (remove-hook 'post-command-hook 'quail-show-guidance t) | 569 | (remove-hook 'post-command-hook 'quail-show-guidance t) |
| 568 | (run-hooks 'quail-inactivate-hook)) | 570 | (run-hooks |
| 571 | 'quail-inactivate-hook ; for backward compatibility | ||
| 572 | 'quail-deactivate-hook)) | ||
| 569 | (kill-local-variable 'input-method-function)) | 573 | (kill-local-variable 'input-method-function)) |
| 570 | ;; Let's activate Quail input method. | 574 | ;; Let's activate Quail input method. |
| 571 | (if (null quail-current-package) | 575 | (if (null quail-current-package) |
| @@ -575,7 +579,7 @@ While this input method is active, the variable | |||
| 575 | (setq name (car (car quail-package-alist))) | 579 | (setq name (car (car quail-package-alist))) |
| 576 | (error "No Quail package loaded")) | 580 | (error "No Quail package loaded")) |
| 577 | (quail-select-package name))) | 581 | (quail-select-package name))) |
| 578 | (setq inactivate-current-input-method-function 'quail-inactivate) | 582 | (setq deactivate-current-input-method-function 'quail-deactivate) |
| 579 | (setq describe-current-input-method-function 'quail-help) | 583 | (setq describe-current-input-method-function 'quail-help) |
| 580 | (quail-delete-overlays) | 584 | (quail-delete-overlays) |
| 581 | (setq quail-guidance-str "") | 585 | (setq quail-guidance-str "") |
| @@ -589,8 +593,12 @@ While this input method is active, the variable | |||
| 589 | (make-local-variable 'input-method-function) | 593 | (make-local-variable 'input-method-function) |
| 590 | (setq input-method-function 'quail-input-method))) | 594 | (setq input-method-function 'quail-input-method))) |
| 591 | 595 | ||
| 596 | (define-obsolete-variable-alias | ||
| 597 | 'quail-inactivate-hook | ||
| 598 | 'quail-deactivate-hook "24.2") | ||
| 599 | |||
| 592 | (defun quail-exit-from-minibuffer () | 600 | (defun quail-exit-from-minibuffer () |
| 593 | (inactivate-input-method) | 601 | (deactivate-input-method) |
| 594 | (if (<= (minibuffer-depth) 1) | 602 | (if (<= (minibuffer-depth) 1) |
| 595 | (remove-hook 'minibuffer-exit-hook 'quail-exit-from-minibuffer))) | 603 | (remove-hook 'minibuffer-exit-hook 'quail-exit-from-minibuffer))) |
| 596 | 604 | ||
diff --git a/lisp/international/robin.el b/lisp/international/robin.el index 73a06bb2ccd..fee4c330e6e 100644 --- a/lisp/international/robin.el +++ b/lisp/international/robin.el | |||
| @@ -390,12 +390,14 @@ A nil value means no package is selected.") | |||
| 390 | (setq robin-current-package-name name) | 390 | (setq robin-current-package-name name) |
| 391 | (robin-activate))) | 391 | (robin-activate))) |
| 392 | 392 | ||
| 393 | (defun robin-inactivate () | 393 | (defun robin-deactivate () |
| 394 | "Inactivate robin input method." | 394 | "Deactivate robin input method." |
| 395 | 395 | ||
| 396 | (interactive) | 396 | (interactive) |
| 397 | (robin-activate -1)) | 397 | (robin-activate -1)) |
| 398 | 398 | ||
| 399 | (define-obsolete-function-alias 'robin-inactivate 'robin-deactivate "24.2") | ||
| 400 | |||
| 399 | (defun robin-activate (&optional arg) | 401 | (defun robin-activate (&optional arg) |
| 400 | "Activate robin input method. | 402 | "Activate robin input method. |
| 401 | 403 | ||
| @@ -406,18 +408,20 @@ While this input method is active, the variable | |||
| 406 | (if (and arg | 408 | (if (and arg |
| 407 | (< (prefix-numeric-value arg) 0)) | 409 | (< (prefix-numeric-value arg) 0)) |
| 408 | 410 | ||
| 409 | ;; inactivate robin input method. | 411 | ;; deactivate robin input method. |
| 410 | (unwind-protect | 412 | (unwind-protect |
| 411 | (progn | 413 | (progn |
| 412 | (setq robin-mode nil) | 414 | (setq robin-mode nil) |
| 413 | (setq describe-current-input-method-function nil) | 415 | (setq describe-current-input-method-function nil) |
| 414 | (run-hooks 'robin-inactivate-hook)) | 416 | (run-hooks |
| 417 | 'robin-inactivate-hook ; for backward compatibility | ||
| 418 | 'robin-deactivate-hook)) | ||
| 415 | (kill-local-variable 'input-method-function)) | 419 | (kill-local-variable 'input-method-function)) |
| 416 | 420 | ||
| 417 | ;; activate robin input method. | 421 | ;; activate robin input method. |
| 418 | (setq robin-mode t | 422 | (setq robin-mode t |
| 419 | describe-current-input-method-function 'robin-help | 423 | describe-current-input-method-function 'robin-help |
| 420 | inactivate-current-input-method-function 'robin-inactivate) | 424 | deactivate-current-input-method-function 'robin-deactivate) |
| 421 | (if (eq (selected-window) (minibuffer-window)) | 425 | (if (eq (selected-window) (minibuffer-window)) |
| 422 | (add-hook 'minibuffer-exit-hook 'robin-exit-from-minibuffer)) | 426 | (add-hook 'minibuffer-exit-hook 'robin-exit-from-minibuffer)) |
| 423 | (run-hooks 'input-method-activate-hook | 427 | (run-hooks 'input-method-activate-hook |
| @@ -425,8 +429,12 @@ While this input method is active, the variable | |||
| 425 | (set (make-local-variable 'input-method-function) | 429 | (set (make-local-variable 'input-method-function) |
| 426 | 'robin-input-method))) | 430 | 'robin-input-method))) |
| 427 | 431 | ||
| 432 | (define-obsolete-variable-alias | ||
| 433 | 'robin-inactivate-hook | ||
| 434 | 'robin-deactivate-hook "24.2") | ||
| 435 | |||
| 428 | (defun robin-exit-from-minibuffer () | 436 | (defun robin-exit-from-minibuffer () |
| 429 | (inactivate-input-method) | 437 | (deactivate-input-method) |
| 430 | (if (<= (minibuffer-depth) 1) | 438 | (if (<= (minibuffer-depth) 1) |
| 431 | (remove-hook 'minibuffer-exit-hook 'robin-exit-from-minibuffer))) | 439 | (remove-hook 'minibuffer-exit-hook 'robin-exit-from-minibuffer))) |
| 432 | 440 | ||
diff --git a/lisp/language/korea-util.el b/lisp/language/korea-util.el index ee8ebb7b2e7..abd5b29ba6e 100644 --- a/lisp/language/korea-util.el +++ b/lisp/language/korea-util.el | |||
| @@ -41,7 +41,7 @@ | |||
| 41 | "Turn on or off a Korean text input method for the current buffer." | 41 | "Turn on or off a Korean text input method for the current buffer." |
| 42 | (interactive) | 42 | (interactive) |
| 43 | (if current-input-method | 43 | (if current-input-method |
| 44 | (inactivate-input-method) | 44 | (deactivate-input-method) |
| 45 | (activate-input-method | 45 | (activate-input-method |
| 46 | (concat "korean-hangul" default-korean-keyboard)))) | 46 | (concat "korean-hangul" default-korean-keyboard)))) |
| 47 | 47 | ||
diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el index c6d1d228780..520271940f2 100644 --- a/lisp/mail/feedmail.el +++ b/lisp/mail/feedmail.el | |||
| @@ -2334,7 +2334,7 @@ mapped to mostly alphanumerics for safety." | |||
| 2334 | (if (and is-fqm is-in-this-dir) | 2334 | (if (and is-fqm is-in-this-dir) |
| 2335 | (setq filename buffer-file-name) | 2335 | (setq filename buffer-file-name) |
| 2336 | (setq filename (feedmail-create-queue-filename queue-directory))) | 2336 | (setq filename (feedmail-create-queue-filename queue-directory))) |
| 2337 | ;; make binary file on DOS/Win95/WinNT, etc | 2337 | ;; make binary file on DOS/Windows 95/Windows NT, etc |
| 2338 | (let ((buffer-file-type feedmail-force-binary-write)) | 2338 | (let ((buffer-file-type feedmail-force-binary-write)) |
| 2339 | (write-file filename)) | 2339 | (write-file filename)) |
| 2340 | ;; convenient for moving from draft to q, for example | 2340 | ;; convenient for moving from draft to q, for example |
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 3b262e3fb53..b75841489c9 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el | |||
| @@ -616,7 +616,7 @@ This also saves the value of `send-mail-function' via Customize." | |||
| 616 | ;; (kill-local-variable 'enable-multibyte-characters) | 616 | ;; (kill-local-variable 'enable-multibyte-characters) |
| 617 | (set-buffer-multibyte (default-value 'enable-multibyte-characters)) | 617 | (set-buffer-multibyte (default-value 'enable-multibyte-characters)) |
| 618 | (if current-input-method | 618 | (if current-input-method |
| 619 | (inactivate-input-method)) | 619 | (deactivate-input-method)) |
| 620 | 620 | ||
| 621 | ;; Local variables for Mail mode. | 621 | ;; Local variables for Mail mode. |
| 622 | (setq mail-send-actions actions) | 622 | (setq mail-send-actions actions) |
diff --git a/lisp/makefile.w32-in b/lisp/makefile.w32-in index 92d939af018..756d2b949fa 100644 --- a/lisp/makefile.w32-in +++ b/lisp/makefile.w32-in | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # -*- Makefile -*- for GNU Emacs on the Microsoft W32 API. | 1 | # -*- Makefile -*- for GNU Emacs on the Microsoft Windows API. |
| 2 | # Copyright (C) 2000-2012 Free Software Foundation, Inc. | 2 | # Copyright (C) 2000-2012 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | # This file is part of GNU Emacs. | 4 | # This file is part of GNU Emacs. |
| @@ -168,12 +168,12 @@ $(lisp)/cus-load.el: | |||
| 168 | 168 | ||
| 169 | # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as | 169 | # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as |
| 170 | # this can break with GNU Make 3.81 and later if sh.exe is used. | 170 | # this can break with GNU Make 3.81 and later if sh.exe is used. |
| 171 | custom-deps: $(lisp)/cus-load.el $(lisp)/loaddefs.el doit | 171 | custom-deps: $(lisp)/cus-load.el $(lisp)/loaddefs.el $(lisp)/subdirs.el doit |
| 172 | @echo Directories: $(WINS_UPDATES) | 172 | @echo Directories: $(WINS_UPDATES) |
| 173 | -$(emacs) -l cus-dep --eval $(ARGQUOTE)(setq find-file-hook nil)$(ARGQUOTE) \ | 173 | -$(emacs) -l cus-dep --eval $(ARGQUOTE)(setq find-file-hook nil)$(ARGQUOTE) \ |
| 174 | -f custom-make-dependencies $(lisp) $(WINS_UPDATES) | 174 | -f custom-make-dependencies $(lisp) $(WINS_UPDATES) |
| 175 | 175 | ||
| 176 | finder-data: $(lisp)/loaddefs.el doit | 176 | finder-data: $(lisp)/loaddefs.el $(lisp)/subdirs.el doit |
| 177 | @echo Directories: $(WINS_UPDATES) | 177 | @echo Directories: $(WINS_UPDATES) |
| 178 | $(emacs) -l finder -f finder-compile-keywords-make-dist $(lisp) $(WINS_UPDATES) | 178 | $(emacs) -l finder -f finder-compile-keywords-make-dist $(lisp) $(WINS_UPDATES) |
| 179 | 179 | ||
| @@ -243,7 +243,7 @@ update-subdirs-SH: doit | |||
| 243 | $(srcdir)/build-aux/update-subdirs $$file; \ | 243 | $(srcdir)/build-aux/update-subdirs $$file; \ |
| 244 | done; | 244 | done; |
| 245 | 245 | ||
| 246 | updates: update-subdirs autoloads mh-autoloads finder-data custom-deps | 246 | updates: $(lisp)/subdirs.el autoloads mh-autoloads finder-data custom-deps |
| 247 | 247 | ||
| 248 | # This is useful after "bzr up". | 248 | # This is useful after "bzr up". |
| 249 | bzr-update: recompile autoloads finder-data custom-deps | 249 | bzr-update: recompile autoloads finder-data custom-deps |
| @@ -311,7 +311,7 @@ TAGS-LISP-CMD: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsf | |||
| 311 | # compiled find the right files. | 311 | # compiled find the right files. |
| 312 | 312 | ||
| 313 | # Need separate version for sh and native cmd.exe | 313 | # Need separate version for sh and native cmd.exe |
| 314 | compile: update-subdirs compile-$(SHELLTYPE) doit | 314 | compile: $(lisp)/subdirs.el compile-$(SHELLTYPE) doit |
| 315 | 315 | ||
| 316 | compile-CMD: autoloads | 316 | compile-CMD: autoloads |
| 317 | # -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g | 317 | # -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g |
| @@ -340,7 +340,7 @@ compile-SH: autoloads | |||
| 340 | # unconditionally. Some files don't actually get compiled because they | 340 | # unconditionally. Some files don't actually get compiled because they |
| 341 | # set the local variable no-byte-compile. | 341 | # set the local variable no-byte-compile. |
| 342 | 342 | ||
| 343 | compile-always: update-subdirs compile-always-$(SHELLTYPE) doit | 343 | compile-always: $(lisp)/subdirs.el compile-always-$(SHELLTYPE) doit |
| 344 | 344 | ||
| 345 | compile-always-CMD: | 345 | compile-always-CMD: |
| 346 | # -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g | 346 | # -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g |
| @@ -383,7 +383,7 @@ backup-compiled-files: | |||
| 383 | compile-after-backup: backup-compiled-files compile-always | 383 | compile-after-backup: backup-compiled-files compile-always |
| 384 | 384 | ||
| 385 | compile-first: $(lisp)/emacs-lisp/bytecomp.elc $(lisp)/emacs-lisp/byte-opt.elc \ | 385 | compile-first: $(lisp)/emacs-lisp/bytecomp.elc $(lisp)/emacs-lisp/byte-opt.elc \ |
| 386 | $(lisp)/emacs-lisp/autoload.elc | 386 | $(lisp)/emacs-lisp/autoload.elc $(lisp)/subdirs.el |
| 387 | 387 | ||
| 388 | # Recompile all Lisp files which are newer than their .elc files. | 388 | # Recompile all Lisp files which are newer than their .elc files. |
| 389 | # Note that this doesn't create .elc files. It only recompiles if an | 389 | # Note that this doesn't create .elc files. It only recompiles if an |
| @@ -393,7 +393,7 @@ compile-first: $(lisp)/emacs-lisp/bytecomp.elc $(lisp)/emacs-lisp/byte-opt.elc | |||
| 393 | recompile: compile-first autoloads doit $(lisp)/progmodes/cc-mode.elc | 393 | recompile: compile-first autoloads doit $(lisp)/progmodes/cc-mode.elc |
| 394 | $(emacs) --eval $(ARGQUOTE)(batch-byte-recompile-directory 0)$(ARGQUOTE) $(lisp) | 394 | $(emacs) --eval $(ARGQUOTE)(batch-byte-recompile-directory 0)$(ARGQUOTE) $(lisp) |
| 395 | 395 | ||
| 396 | $(lisp)/calendar/cal-loaddefs.el: update-subdirs | 396 | $(lisp)/calendar/cal-loaddefs.el: $(lisp)/subdirs.el |
| 397 | "$(EMACS)" $(EMACSOPT) -l autoload \ | 397 | "$(EMACS)" $(EMACSOPT) -l autoload \ |
| 398 | --eval "(setq generate-autoload-cookie \";;;###cal-autoload\")" \ | 398 | --eval "(setq generate-autoload-cookie \";;;###cal-autoload\")" \ |
| 399 | --eval "(setq find-file-suppress-same-file-warnings t)" \ | 399 | --eval "(setq find-file-suppress-same-file-warnings t)" \ |
| @@ -401,7 +401,7 @@ $(lisp)/calendar/cal-loaddefs.el: update-subdirs | |||
| 401 | -f w32-batch-update-autoloads "$(lisp)/calendar/cal-loaddefs.el" \ | 401 | -f w32-batch-update-autoloads "$(lisp)/calendar/cal-loaddefs.el" \ |
| 402 | $(MAKE) ./calendar | 402 | $(MAKE) ./calendar |
| 403 | 403 | ||
| 404 | $(lisp)/calendar/diary-loaddefs.el: update-subdirs | 404 | $(lisp)/calendar/diary-loaddefs.el: $(lisp)/subdirs.el |
| 405 | "$(EMACS)" $(EMACSOPT) -l autoload \ | 405 | "$(EMACS)" $(EMACSOPT) -l autoload \ |
| 406 | --eval "(setq generate-autoload-cookie \";;;###diary-autoload\")" \ | 406 | --eval "(setq generate-autoload-cookie \";;;###diary-autoload\")" \ |
| 407 | --eval "(setq find-file-suppress-same-file-warnings t)" \ | 407 | --eval "(setq find-file-suppress-same-file-warnings t)" \ |
| @@ -409,7 +409,7 @@ $(lisp)/calendar/diary-loaddefs.el: update-subdirs | |||
| 409 | -f w32-batch-update-autoloads $(lisp)/calendar/diary-loaddefs.el \ | 409 | -f w32-batch-update-autoloads $(lisp)/calendar/diary-loaddefs.el \ |
| 410 | $(MAKE) ./calendar | 410 | $(MAKE) ./calendar |
| 411 | 411 | ||
| 412 | $(lisp)/calendar/hol-loaddefs.el: update-subdirs | 412 | $(lisp)/calendar/hol-loaddefs.el: $(lisp)/subdirs.el |
| 413 | "$(EMACS)" $(EMACSOPT) -l autoload \ | 413 | "$(EMACS)" $(EMACSOPT) -l autoload \ |
| 414 | --eval "(setq generate-autoload-cookie \";;;###holiday-autoload\")" \ | 414 | --eval "(setq generate-autoload-cookie \";;;###holiday-autoload\")" \ |
| 415 | --eval "(setq find-file-suppress-same-file-warnings t)" \ | 415 | --eval "(setq find-file-suppress-same-file-warnings t)" \ |
| @@ -437,7 +437,7 @@ MH_E_SRC = $(lisp)/mh-e/mh-acros.el $(lisp)/mh-e/mh-alias.el \ | |||
| 437 | # See the commentary for autoloads above for why we use ./mh-e below | 437 | # See the commentary for autoloads above for why we use ./mh-e below |
| 438 | # instead of $(lisp)/mh-e. | 438 | # instead of $(lisp)/mh-e. |
| 439 | mh-autoloads: $(lisp)/mh-e/mh-loaddefs.el | 439 | mh-autoloads: $(lisp)/mh-e/mh-loaddefs.el |
| 440 | $(lisp)/mh-e/mh-loaddefs.el: $(MH_E_SRC) update-subdirs | 440 | $(lisp)/mh-e/mh-loaddefs.el: $(MH_E_SRC) $(lisp)/subdirs.el |
| 441 | "$(EMACS)" $(EMACSOPT) \ | 441 | "$(EMACS)" $(EMACSOPT) \ |
| 442 | -l autoload \ | 442 | -l autoload \ |
| 443 | --eval $(ARGQUOTE)(setq generate-autoload-cookie $(DQUOTE);;;###mh-autoload$(DQUOTE))$(ARGQUOTE) \ | 443 | --eval $(ARGQUOTE)(setq generate-autoload-cookie $(DQUOTE);;;###mh-autoload$(DQUOTE))$(ARGQUOTE) \ |
| @@ -456,7 +456,7 @@ TRAMP_SRC = $(lisp)/net/tramp.el $(lisp)/net/tramp-cache.el \ | |||
| 456 | $(lisp)/net/tramp-smb.el $(lisp)/net/tramp-uu.el \ | 456 | $(lisp)/net/tramp-smb.el $(lisp)/net/tramp-uu.el \ |
| 457 | $(lisp)/net/trampver.el | 457 | $(lisp)/net/trampver.el |
| 458 | 458 | ||
| 459 | $(lisp)/net/tramp-loaddefs.el: $(TRAMP_SRC) update-subdirs | 459 | $(lisp)/net/tramp-loaddefs.el: $(TRAMP_SRC) $(lisp)/subdirs.el |
| 460 | "$(EMACS)" $(EMACSOPT) \ | 460 | "$(EMACS)" $(EMACSOPT) \ |
| 461 | -l autoload \ | 461 | -l autoload \ |
| 462 | --eval $(ARGQUOTE)(setq generate-autoload-cookie $(DQUOTE);;;###tramp-autoload$(DQUOTE))$(ARGQUOTE) \ | 462 | --eval $(ARGQUOTE)(setq generate-autoload-cookie $(DQUOTE);;;###tramp-autoload$(DQUOTE))$(ARGQUOTE) \ |
| @@ -481,6 +481,7 @@ $(lisp)/net/tramp-loaddefs.el: $(TRAMP_SRC) update-subdirs | |||
| 481 | # Need separate version for sh and native cmd.exe | 481 | # Need separate version for sh and native cmd.exe |
| 482 | bootstrap-clean: | 482 | bootstrap-clean: |
| 483 | - $(DEL) $(lisp)/loaddefs.el | 483 | - $(DEL) $(lisp)/loaddefs.el |
| 484 | - $(DEL) $(lisp)/subdirs.el | ||
| 484 | $(MAKE) $(MFLAGS) bootstrap-clean-$(SHELLTYPE) | 485 | $(MAKE) $(MFLAGS) bootstrap-clean-$(SHELLTYPE) |
| 485 | 486 | ||
| 486 | bootstrap-clean-CMD: | 487 | bootstrap-clean-CMD: |
| @@ -496,7 +497,7 @@ bootstrap-clean-SH: | |||
| 496 | # When done, remove bootstrap-emacs from ../bin, so that | 497 | # When done, remove bootstrap-emacs from ../bin, so that |
| 497 | # it will not be mistaken for an installed binary. | 498 | # it will not be mistaken for an installed binary. |
| 498 | 499 | ||
| 499 | bootstrap: update-subdirs compile finder-data custom-deps | 500 | bootstrap: $(lisp)/subdirs.el compile finder-data custom-deps |
| 500 | - $(DEL) "$(EMACS)" | 501 | - $(DEL) "$(EMACS)" |
| 501 | 502 | ||
| 502 | # | 503 | # |
| @@ -600,7 +601,8 @@ $(lisp)/progmodes/cc-langs.elc: $(lisp)/progmodes/cc-vars.elc \ | |||
| 600 | $(lisp)/progmodes/cc-mode.elc: $(lisp)/progmodes/cc-langs.elc \ | 601 | $(lisp)/progmodes/cc-mode.elc: $(lisp)/progmodes/cc-langs.elc \ |
| 601 | $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc \ | 602 | $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc \ |
| 602 | $(lisp)/progmodes/cc-styles.elc $(lisp)/progmodes/cc-cmds.elc \ | 603 | $(lisp)/progmodes/cc-styles.elc $(lisp)/progmodes/cc-cmds.elc \ |
| 603 | $(lisp)/progmodes/cc-align.elc $(lisp)/progmodes/cc-menus.elc | 604 | $(lisp)/progmodes/cc-align.elc $(lisp)/progmodes/cc-menus.elc \ |
| 605 | $(lisp)/subdirs.el | ||
| 604 | 606 | ||
| 605 | $(lisp)/progmodes/cc-styles.elc: $(lisp)/progmodes/cc-vars.elc \ | 607 | $(lisp)/progmodes/cc-styles.elc: $(lisp)/progmodes/cc-vars.elc \ |
| 606 | $(lisp)/progmodes/cc-align.elc | 608 | $(lisp)/progmodes/cc-align.elc |
diff --git a/lisp/mh-e/ChangeLog.1 b/lisp/mh-e/ChangeLog.1 index 94ac7a2f3b7..15b7380b737 100644 --- a/lisp/mh-e/ChangeLog.1 +++ b/lisp/mh-e/ChangeLog.1 | |||
| @@ -9493,9 +9493,9 @@ | |||
| 9493 | * mh-utils.el (mh-find-progs): Run PATH search only when mh-progs, | 9493 | * mh-utils.el (mh-find-progs): Run PATH search only when mh-progs, |
| 9494 | mh-lib and mh-lib-progs are not all already set. This allows the | 9494 | mh-lib and mh-lib-progs are not all already set. This allows the |
| 9495 | user to set them using a simple setq prior to loading mh-e. This | 9495 | user to set them using a simple setq prior to loading mh-e. This |
| 9496 | is useful for implementation of mh-e on win32. Note that many | 9496 | is useful for implementation of mh-e on w32. Note that many |
| 9497 | commands still call mh-find-path which also parses the mh_profile | 9497 | commands still call mh-find-path which also parses the mh_profile |
| 9498 | file (that may still fail on win32), so this is still done often. | 9498 | file (that may still fail on w32), so this is still done often. |
| 9499 | But it lets us change the mh_profile file and have mh-e see the | 9499 | But it lets us change the mh_profile file and have mh-e see the |
| 9500 | changed file without exiting emacs and starting over so I left | 9500 | changed file without exiting emacs and starting over so I left |
| 9501 | that in. | 9501 | that in. |
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index dd695c29c78..1501fa41baa 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el | |||
| @@ -2618,7 +2618,7 @@ away in the internal cache." | |||
| 2618 | (format | 2618 | (format |
| 2619 | "list data file %s not readable" | 2619 | "list data file %s not readable" |
| 2620 | temp)))) | 2620 | temp)))) |
| 2621 | ;; remove ^M inserted by the win32 ftp client | 2621 | ;; remove ^M inserted by the w32 ftp client |
| 2622 | (while (re-search-forward "\r$" nil t) | 2622 | (while (re-search-forward "\r$" nil t) |
| 2623 | (replace-match "")) | 2623 | (replace-match "")) |
| 2624 | (goto-char 1) | 2624 | (goto-char 1) |
diff --git a/lisp/notifications.el b/lisp/notifications.el index c762bb104ee..792298c26b7 100644 --- a/lisp/notifications.el +++ b/lisp/notifications.el | |||
| @@ -93,8 +93,9 @@ | |||
| 93 | 93 | ||
| 94 | (defun notifications-on-action-signal (id action) | 94 | (defun notifications-on-action-signal (id action) |
| 95 | "Dispatch signals to callback functions from `notifications-on-action-map'." | 95 | "Dispatch signals to callback functions from `notifications-on-action-map'." |
| 96 | (let* ((unique-name (dbus-event-service-name last-input-event)) | 96 | (let* ((bus (dbus-event-bus-name last-input-event)) |
| 97 | (entry (assoc (cons unique-name id) notifications-on-action-map))) | 97 | (unique-name (dbus-event-service-name last-input-event)) |
| 98 | (entry (assoc (list bus unique-name id) notifications-on-action-map))) | ||
| 98 | (when entry | 99 | (when entry |
| 99 | (funcall (cadr entry) id action) | 100 | (funcall (cadr entry) id action) |
| 100 | (when (and (not (setq notifications-on-action-map | 101 | (when (and (not (setq notifications-on-action-map |
| @@ -107,8 +108,9 @@ | |||
| 107 | "Dispatch signals to callback functions from `notifications-on-closed-map'." | 108 | "Dispatch signals to callback functions from `notifications-on-closed-map'." |
| 108 | ;; notification-daemon prior 0.4.0 does not send a reason. So we | 109 | ;; notification-daemon prior 0.4.0 does not send a reason. So we |
| 109 | ;; make it optional, and assume `undefined' as default. | 110 | ;; make it optional, and assume `undefined' as default. |
| 110 | (let* ((unique-name (dbus-event-service-name last-input-event)) | 111 | (let* ((bus (dbus-event-bus-name last-input-event)) |
| 111 | (entry (assoc (cons unique-name id) notifications-on-close-map)) | 112 | (unique-name (dbus-event-service-name last-input-event)) |
| 113 | (entry (assoc (list bus unique-name id) notifications-on-close-map)) | ||
| 112 | (reason (or reason 4))) | 114 | (reason (or reason 4))) |
| 113 | (when entry | 115 | (when entry |
| 114 | (funcall (cadr entry) | 116 | (funcall (cadr entry) |
| @@ -123,6 +125,7 @@ | |||
| 123 | "Send notification via D-Bus using the Freedesktop notification protocol. | 125 | "Send notification via D-Bus using the Freedesktop notification protocol. |
| 124 | Various PARAMS can be set: | 126 | Various PARAMS can be set: |
| 125 | 127 | ||
| 128 | :bus The D-Bus bus, if different from `:session'. | ||
| 126 | :title The notification title. | 129 | :title The notification title. |
| 127 | :body The notification body text. | 130 | :body The notification body text. |
| 128 | :app-name The name of the application sending the notification. | 131 | :app-name The name of the application sending the notification. |
| @@ -196,7 +199,8 @@ This function returns a notification id, an integer, which can be | |||
| 196 | used to manipulate the notification item with | 199 | used to manipulate the notification item with |
| 197 | `notifications-close-notification' or the `:replaces-id' argument | 200 | `notifications-close-notification' or the `:replaces-id' argument |
| 198 | of another `notifications-notify' call." | 201 | of another `notifications-notify' call." |
| 199 | (let ((title (plist-get params :title)) | 202 | (let ((bus (or (plist-get params :bus) :session)) |
| 203 | (title (plist-get params :title)) | ||
| 200 | (body (plist-get params :body)) | 204 | (body (plist-get params :body)) |
| 201 | (app-name (plist-get params :app-name)) | 205 | (app-name (plist-get params :app-name)) |
| 202 | (replaces-id (plist-get params :replaces-id)) | 206 | (replaces-id (plist-get params :replaces-id)) |
| @@ -272,9 +276,9 @@ of another `notifications-notify' call." | |||
| 272 | (when y | 276 | (when y |
| 273 | (add-to-list 'hints `(:dict-entry "y" (:variant :int32 ,y)) t)) | 277 | (add-to-list 'hints `(:dict-entry "y" (:variant :int32 ,y)) t)) |
| 274 | 278 | ||
| 275 | ;; Call Notify method | 279 | ;; Call Notify method. |
| 276 | (setq id | 280 | (setq id |
| 277 | (dbus-call-method :session | 281 | (dbus-call-method bus |
| 278 | notifications-service | 282 | notifications-service |
| 279 | notifications-path | 283 | notifications-path |
| 280 | notifications-interface | 284 | notifications-interface |
| @@ -302,14 +306,14 @@ of another `notifications-notify' call." | |||
| 302 | ;; restarted. | 306 | ;; restarted. |
| 303 | (let ((on-action (plist-get params :on-action)) | 307 | (let ((on-action (plist-get params :on-action)) |
| 304 | (on-close (plist-get params :on-close)) | 308 | (on-close (plist-get params :on-close)) |
| 305 | (unique-name (dbus-get-name-owner :session notifications-service))) | 309 | (unique-name (dbus-get-name-owner bus notifications-service))) |
| 306 | (when on-action | 310 | (when on-action |
| 307 | (add-to-list 'notifications-on-action-map | 311 | (add-to-list 'notifications-on-action-map |
| 308 | (list (cons unique-name id) on-action)) | 312 | (list (list bus unique-name id) on-action)) |
| 309 | (unless notifications-on-action-object | 313 | (unless notifications-on-action-object |
| 310 | (setq notifications-on-action-object | 314 | (setq notifications-on-action-object |
| 311 | (dbus-register-signal | 315 | (dbus-register-signal |
| 312 | :session | 316 | bus |
| 313 | nil | 317 | nil |
| 314 | notifications-path | 318 | notifications-path |
| 315 | notifications-interface | 319 | notifications-interface |
| @@ -318,11 +322,11 @@ of another `notifications-notify' call." | |||
| 318 | 322 | ||
| 319 | (when on-close | 323 | (when on-close |
| 320 | (add-to-list 'notifications-on-close-map | 324 | (add-to-list 'notifications-on-close-map |
| 321 | (list (cons unique-name id) on-close)) | 325 | (list (list bus unique-name id) on-close)) |
| 322 | (unless notifications-on-close-object | 326 | (unless notifications-on-close-object |
| 323 | (setq notifications-on-close-object | 327 | (setq notifications-on-close-object |
| 324 | (dbus-register-signal | 328 | (dbus-register-signal |
| 325 | :session | 329 | bus |
| 326 | nil | 330 | nil |
| 327 | notifications-path | 331 | notifications-path |
| 328 | notifications-interface | 332 | notifications-interface |
| @@ -332,9 +336,10 @@ of another `notifications-notify' call." | |||
| 332 | ;; Return notification id | 336 | ;; Return notification id |
| 333 | id)) | 337 | id)) |
| 334 | 338 | ||
| 335 | (defun notifications-close-notification (id) | 339 | (defun notifications-close-notification (id &optional bus) |
| 336 | "Close a notification with identifier ID." | 340 | "Close a notification with identifier ID. |
| 337 | (dbus-call-method :session | 341 | BUS can be a string denoting a D-Bus connection, the default is `:session'." |
| 342 | (dbus-call-method (or bus :session) | ||
| 338 | notifications-service | 343 | notifications-service |
| 339 | notifications-path | 344 | notifications-path |
| 340 | notifications-interface | 345 | notifications-interface |
| @@ -343,8 +348,9 @@ of another `notifications-notify' call." | |||
| 343 | 348 | ||
| 344 | (defvar dbus-debug) ; used in the macroexpansion of dbus-ignore-errors | 349 | (defvar dbus-debug) ; used in the macroexpansion of dbus-ignore-errors |
| 345 | 350 | ||
| 346 | (defun notifications-get-capabilities () | 351 | (defun notifications-get-capabilities (&optional bus) |
| 347 | "Return the capabilities of the notification server, a list of strings. | 352 | "Return the capabilities of the notification server, a list of strings. |
| 353 | BUS can be a string denoting a D-Bus connection, the default is `:session'. | ||
| 348 | The following capabilities can be expected: | 354 | The following capabilities can be expected: |
| 349 | 355 | ||
| 350 | :actions The server will provide the specified actions | 356 | :actions The server will provide the specified actions |
| @@ -367,7 +373,7 @@ Further vendor-specific caps start with `:x-vendor', like `:x-gnome-foo-cap'." | |||
| 367 | (dbus-ignore-errors | 373 | (dbus-ignore-errors |
| 368 | (mapcar | 374 | (mapcar |
| 369 | (lambda (x) (intern (concat ":" x))) | 375 | (lambda (x) (intern (concat ":" x))) |
| 370 | (dbus-call-method :session | 376 | (dbus-call-method (or bus :session) |
| 371 | notifications-service | 377 | notifications-service |
| 372 | notifications-path | 378 | notifications-path |
| 373 | notifications-interface | 379 | notifications-interface |
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index eae83f044a0..cf9c32006ac 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2012-07-29 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Don't use the abbreviation "win" to refer to Windows (Bug#10421). | ||
| 4 | * ob-lilypond.el (ly-w32-ly-path): Rename from ly-win32-ly-path. | ||
| 5 | (ly-w32-pdf-path): Rename from ly-win32-pdf-path. | ||
| 6 | (ly-w32-midi-path): Rename from ly-win32-midi-path. | ||
| 7 | (ly-determine-ly-path, ly-determine-pdf-path, ly-determine-midi-path): | ||
| 8 | Check for "windows-nt", not "win32", in system-type. | ||
| 9 | |||
| 1 | 2012-06-02 Chong Yidong <cyd@gnu.org> | 10 | 2012-06-02 Chong Yidong <cyd@gnu.org> |
| 2 | 11 | ||
| 3 | * org-clock.el (org-clock-string-limit) | 12 | * org-clock.el (org-clock-string-limit) |
diff --git a/lisp/org/ob-lilypond.el b/lisp/org/ob-lilypond.el index a1e4c9f83e4..b3e77f32e55 100644 --- a/lisp/org/ob-lilypond.el +++ b/lisp/org/ob-lilypond.el | |||
| @@ -66,9 +66,9 @@ the midi file is not automatically played. Default value is t") | |||
| 66 | (defvar ly-nix-pdf-path "evince") | 66 | (defvar ly-nix-pdf-path "evince") |
| 67 | (defvar ly-nix-midi-path "timidity") | 67 | (defvar ly-nix-midi-path "timidity") |
| 68 | 68 | ||
| 69 | (defvar ly-win32-ly-path "lilypond") | 69 | (defvar ly-w32-ly-path "lilypond") |
| 70 | (defvar ly-win32-pdf-path "") | 70 | (defvar ly-w32-pdf-path "") |
| 71 | (defvar ly-win32-midi-path "") | 71 | (defvar ly-w32-midi-path "") |
| 72 | 72 | ||
| 73 | (defvar ly-gen-png nil | 73 | (defvar ly-gen-png nil |
| 74 | "Image generation (png) can be turned on by default by setting | 74 | "Image generation (png) can be turned on by default by setting |
| @@ -329,8 +329,8 @@ If TEST is non-nil, it contains a simulation of the OS for test purposes" | |||
| 329 | (or test system-type))) | 329 | (or test system-type))) |
| 330 | (cond ((string= sys-type "darwin") | 330 | (cond ((string= sys-type "darwin") |
| 331 | ly-OSX-ly-path) | 331 | ly-OSX-ly-path) |
| 332 | ((string= sys-type "win32") | 332 | ((string= sys-type "windows-nt") |
| 333 | ly-win32-ly-path) | 333 | ly-w32-ly-path) |
| 334 | (t ly-nix-ly-path)))) | 334 | (t ly-nix-ly-path)))) |
| 335 | 335 | ||
| 336 | (defun ly-determine-pdf-path (&optional test) | 336 | (defun ly-determine-pdf-path (&optional test) |
| @@ -341,8 +341,8 @@ If TEST is non-nil, it contains a simulation of the OS for test purposes" | |||
| 341 | (or test system-type))) | 341 | (or test system-type))) |
| 342 | (cond ((string= sys-type "darwin") | 342 | (cond ((string= sys-type "darwin") |
| 343 | ly-OSX-pdf-path) | 343 | ly-OSX-pdf-path) |
| 344 | ((string= sys-type "win32") | 344 | ((string= sys-type "windows-nt") |
| 345 | ly-win32-pdf-path) | 345 | ly-w32-pdf-path) |
| 346 | (t ly-nix-pdf-path)))) | 346 | (t ly-nix-pdf-path)))) |
| 347 | 347 | ||
| 348 | (defun ly-determine-midi-path (&optional test) | 348 | (defun ly-determine-midi-path (&optional test) |
| @@ -353,8 +353,8 @@ If TEST is non-nil, it contains a simulation of the OS for test purposes" | |||
| 353 | (or test test system-type))) | 353 | (or test test system-type))) |
| 354 | (cond ((string= sys-type "darwin") | 354 | (cond ((string= sys-type "darwin") |
| 355 | ly-OSX-midi-path) | 355 | ly-OSX-midi-path) |
| 356 | ((string= sys-type "win32") | 356 | ((string= sys-type "windows-nt") |
| 357 | ly-win32-midi-path) | 357 | ly-w32-midi-path) |
| 358 | (t ly-nix-midi-path)))) | 358 | (t ly-nix-midi-path)))) |
| 359 | 359 | ||
| 360 | (defun ly-toggle-midi-play () | 360 | (defun ly-toggle-midi-play () |
diff --git a/lisp/printing.el b/lisp/printing.el index bf5b8a91f01..0152ed63dbb 100644 --- a/lisp/printing.el +++ b/lisp/printing.el | |||
| @@ -2141,7 +2141,7 @@ Useful links: | |||
| 2141 | `http://bama.ua.edu/cgi-bin/man-cgi?lp' | 2141 | `http://bama.ua.edu/cgi-bin/man-cgi?lp' |
| 2142 | `http://www.mediacollege.com/cgi-bin/man/page.cgi?section=all&topic=lp' | 2142 | `http://www.mediacollege.com/cgi-bin/man/page.cgi?section=all&topic=lp' |
| 2143 | 2143 | ||
| 2144 | * GNU utilities for Win32 (cp.exe) | 2144 | * GNU utilities for w32 (cp.exe) |
| 2145 | `http://unxutils.sourceforge.net/' | 2145 | `http://unxutils.sourceforge.net/' |
| 2146 | " | 2146 | " |
| 2147 | :type '(repeat | 2147 | :type '(repeat |
diff --git a/lisp/progmodes/cc-menus.el b/lisp/progmodes/cc-menus.el index a53d65f6307..76e3002abd2 100644 --- a/lisp/progmodes/cc-menus.el +++ b/lisp/progmodes/cc-menus.el | |||
| @@ -399,14 +399,10 @@ Example: | |||
| 399 | str2 "@protocol"))) | 399 | str2 "@protocol"))) |
| 400 | (setq str (cc-imenu-objc-remove-white-space str)) | 400 | (setq str (cc-imenu-objc-remove-white-space str)) |
| 401 | (setq methodlist (cons (cons str2 | 401 | (setq methodlist (cons (cons str2 |
| 402 | (match-beginning langnum)) | 402 | (match-beginning langnum)) |
| 403 | methodlist)) | 403 | methodlist)) |
| 404 | (setq toplist (cons nil (cons (cons str | 404 | (setq toplist (cons (cons str methodlist) toplist) |
| 405 | methodlist) toplist)) | ||
| 406 | methodlist nil)))) | 405 | methodlist nil)))) |
| 407 | ;; | ||
| 408 | (if (eq (car toplist) nil) | ||
| 409 | (setq toplist (cdr toplist))) | ||
| 410 | 406 | ||
| 411 | ;; In this buffer, there is only one or zero @{interface|implementation|protocol}. | 407 | ;; In this buffer, there is only one or zero @{interface|implementation|protocol}. |
| 412 | (if (< classcount 2) | 408 | (if (< classcount 2) |
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 23a34b85194..80afdc0bedf 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el | |||
| @@ -2487,20 +2487,23 @@ HANDLER-NAME handler uses customization of CUSTOM-DEFUN. See | |||
| 2487 | (let ((file (bindat-get-field breakpoint 'fullname)) | 2487 | (let ((file (bindat-get-field breakpoint 'fullname)) |
| 2488 | (flag (bindat-get-field breakpoint 'enabled)) | 2488 | (flag (bindat-get-field breakpoint 'enabled)) |
| 2489 | (bptno (bindat-get-field breakpoint 'number))) | 2489 | (bptno (bindat-get-field breakpoint 'number))) |
| 2490 | (unless (file-exists-p file) | 2490 | (unless (and file (file-exists-p file)) |
| 2491 | (setq file (cdr (assoc bptno gdb-location-alist)))) | 2491 | (setq file (cdr (assoc bptno gdb-location-alist)))) |
| 2492 | (if (and file | 2492 | (if (or (null file) |
| 2493 | (not (string-equal file "File not found"))) | 2493 | (string-equal file "File not found")) |
| 2494 | (with-current-buffer | 2494 | ;; If the full filename is not recorded in the |
| 2495 | (find-file-noselect file 'nowarn) | 2495 | ;; breakpoint structure or in `gdb-location-alist', use |
| 2496 | (gdb-init-buffer) | 2496 | ;; -file-list-exec-source-file to extract it. |
| 2497 | ;; Only want one breakpoint icon at each location. | 2497 | (when (setq file (bindat-get-field breakpoint 'file)) |
| 2498 | (gdb-put-breakpoint-icon (string-equal flag "y") bptno | 2498 | (gdb-input (concat "list " file ":1") 'ignore) |
| 2499 | (string-to-number line))) | 2499 | (gdb-input "-file-list-exec-source-file" |
| 2500 | (gdb-input (concat "list " file ":1") 'ignore) | 2500 | `(lambda () (gdb-get-location |
| 2501 | (gdb-input "-file-list-exec-source-file" | 2501 | ,bptno ,line ,flag)))) |
| 2502 | `(lambda () (gdb-get-location | 2502 | (with-current-buffer (find-file-noselect file 'nowarn) |
| 2503 | ,bptno ,line ,flag))))))))) | 2503 | (gdb-init-buffer) |
| 2504 | ;; Only want one breakpoint icon at each location. | ||
| 2505 | (gdb-put-breakpoint-icon (string-equal flag "y") bptno | ||
| 2506 | (string-to-number line))))))))) | ||
| 2504 | 2507 | ||
| 2505 | (defvar gdb-source-file-regexp "fullname=\"\\(.*?\\)\"") | 2508 | (defvar gdb-source-file-regexp "fullname=\"\\(.*?\\)\"") |
| 2506 | 2509 | ||
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 132951aedc8..4617ecc420d 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -250,6 +250,7 @@ | |||
| 250 | (define-key map "\C-c\C-tt" 'python-skeleton-try) | 250 | (define-key map "\C-c\C-tt" 'python-skeleton-try) |
| 251 | (define-key map "\C-c\C-tw" 'python-skeleton-while) | 251 | (define-key map "\C-c\C-tw" 'python-skeleton-while) |
| 252 | ;; Shell interaction | 252 | ;; Shell interaction |
| 253 | (define-key map "\C-c\C-p" 'run-python) | ||
| 253 | (define-key map "\C-c\C-s" 'python-shell-send-string) | 254 | (define-key map "\C-c\C-s" 'python-shell-send-string) |
| 254 | (define-key map "\C-c\C-r" 'python-shell-send-region) | 255 | (define-key map "\C-c\C-r" 'python-shell-send-region) |
| 255 | (define-key map "\C-\M-x" 'python-shell-send-defun) | 256 | (define-key map "\C-\M-x" 'python-shell-send-defun) |
| @@ -1544,7 +1545,7 @@ variable. | |||
| 1544 | 'python-shell-completion-complete-at-point nil 'local) | 1545 | 'python-shell-completion-complete-at-point nil 'local) |
| 1545 | (add-to-list (make-local-variable 'comint-dynamic-complete-functions) | 1546 | (add-to-list (make-local-variable 'comint-dynamic-complete-functions) |
| 1546 | 'python-shell-completion-complete-at-point) | 1547 | 'python-shell-completion-complete-at-point) |
| 1547 | (define-key inferior-python-mode-map (kbd "<tab>") | 1548 | (define-key inferior-python-mode-map "\t" |
| 1548 | 'python-shell-completion-complete-or-indent) | 1549 | 'python-shell-completion-complete-or-indent) |
| 1549 | (when python-shell-enable-font-lock | 1550 | (when python-shell-enable-font-lock |
| 1550 | (set (make-local-variable 'font-lock-defaults) | 1551 | (set (make-local-variable 'font-lock-defaults) |
| @@ -1571,30 +1572,33 @@ non-nil the buffer is shown." | |||
| 1571 | (with-current-buffer buffer | 1572 | (with-current-buffer buffer |
| 1572 | (inferior-python-mode) | 1573 | (inferior-python-mode) |
| 1573 | (python-util-clone-local-variables current-buffer)))) | 1574 | (python-util-clone-local-variables current-buffer)))) |
| 1574 | (when pop | 1575 | (and pop (pop-to-buffer proc-buffer-name t)) |
| 1575 | (pop-to-buffer proc-buffer-name)) | ||
| 1576 | proc-buffer-name))) | 1576 | proc-buffer-name))) |
| 1577 | 1577 | ||
| 1578 | (defun run-python (dedicated cmd) | 1578 | ;;;###autoload |
| 1579 | (defun run-python (cmd &optional dedicated show) | ||
| 1579 | "Run an inferior Python process. | 1580 | "Run an inferior Python process. |
| 1580 | Input and output via buffer named after | 1581 | Input and output via buffer named after |
| 1581 | `python-shell-buffer-name'. If there is a process already | 1582 | `python-shell-buffer-name'. If there is a process already |
| 1582 | running in that buffer, just switch to it. | 1583 | running in that buffer, just switch to it. |
| 1583 | With argument, allows you to define DEDICATED, so a dedicated | 1584 | |
| 1584 | process for the current buffer is open, and define CMD so you can | 1585 | With argument, allows you to define CMD so you can edit the |
| 1585 | edit the command used to call the interpreter (default is value | 1586 | command used to call the interpreter and define DEDICATED, so a |
| 1586 | of `python-shell-interpreter' and arguments defined in | 1587 | dedicated process for the current buffer is open. When numeric |
| 1587 | `python-shell-interpreter-args'). Runs the hook | 1588 | prefix arg is other than 0 or 4 do not SHOW. |
| 1588 | `inferior-python-mode-hook' (after the `comint-mode-hook' is | 1589 | |
| 1589 | run). | 1590 | Runs the hook `inferior-python-mode-hook' (after the |
| 1590 | \(Type \\[describe-mode] in the process buffer for a list of commands.)" | 1591 | `comint-mode-hook' is run). \(Type \\[describe-mode] in the |
| 1592 | process buffer for a list of commands.)" | ||
| 1591 | (interactive | 1593 | (interactive |
| 1592 | (if current-prefix-arg | 1594 | (if current-prefix-arg |
| 1593 | (list | 1595 | (list |
| 1596 | (read-string "Run Python: " (python-shell-parse-command)) | ||
| 1594 | (y-or-n-p "Make dedicated process? ") | 1597 | (y-or-n-p "Make dedicated process? ") |
| 1595 | (read-string "Run Python: " (python-shell-parse-command))) | 1598 | (= (prefix-numeric-value current-prefix-arg) 4)) |
| 1596 | (list nil (python-shell-parse-command)))) | 1599 | (list (python-shell-parse-command) nil t))) |
| 1597 | (python-shell-make-comint cmd (python-shell-get-process-name dedicated)) | 1600 | (python-shell-make-comint |
| 1601 | cmd (python-shell-get-process-name dedicated) show) | ||
| 1598 | dedicated) | 1602 | dedicated) |
| 1599 | 1603 | ||
| 1600 | (defun run-python-internal () | 1604 | (defun run-python-internal () |
| @@ -1611,7 +1615,6 @@ with user shells. Runs the hook | |||
| 1611 | `inferior-python-mode-hook' (after the `comint-mode-hook' is | 1615 | `inferior-python-mode-hook' (after the `comint-mode-hook' is |
| 1612 | run). \(Type \\[describe-mode] in the process buffer for a list | 1616 | run). \(Type \\[describe-mode] in the process buffer for a list |
| 1613 | of commands.)" | 1617 | of commands.)" |
| 1614 | (interactive) | ||
| 1615 | (set-process-query-on-exit-flag | 1618 | (set-process-query-on-exit-flag |
| 1616 | (get-buffer-process | 1619 | (get-buffer-process |
| 1617 | (python-shell-make-comint | 1620 | (python-shell-make-comint |
| @@ -1638,7 +1641,7 @@ of commands.)" | |||
| 1638 | (global-proc-buffer-name (format "*%s*" global-proc-name)) | 1641 | (global-proc-buffer-name (format "*%s*" global-proc-name)) |
| 1639 | (dedicated-running (comint-check-proc dedicated-proc-buffer-name)) | 1642 | (dedicated-running (comint-check-proc dedicated-proc-buffer-name)) |
| 1640 | (global-running (comint-check-proc global-proc-buffer-name)) | 1643 | (global-running (comint-check-proc global-proc-buffer-name)) |
| 1641 | (current-prefix-arg 4)) | 1644 | (current-prefix-arg 16)) |
| 1642 | (when (and (not dedicated-running) (not global-running)) | 1645 | (when (and (not dedicated-running) (not global-running)) |
| 1643 | (if (call-interactively 'run-python) | 1646 | (if (call-interactively 'run-python) |
| 1644 | (setq dedicated-running t) | 1647 | (setq dedicated-running t) |
| @@ -1945,7 +1948,6 @@ completions on the current context." | |||
| 1945 | 1948 | ||
| 1946 | (defun python-shell-completion-complete-at-point () | 1949 | (defun python-shell-completion-complete-at-point () |
| 1947 | "Perform completion at point in inferior Python process." | 1950 | "Perform completion at point in inferior Python process." |
| 1948 | (interactive) | ||
| 1949 | (and comint-last-prompt-overlay | 1951 | (and comint-last-prompt-overlay |
| 1950 | (> (point-marker) (overlay-end comint-last-prompt-overlay)) | 1952 | (> (point-marker) (overlay-end comint-last-prompt-overlay)) |
| 1951 | (python-shell-completion--do-completion-at-point | 1953 | (python-shell-completion--do-completion-at-point |
| @@ -2060,7 +2062,6 @@ Argument OUTPUT is a string with the output from the comint process." | |||
| 2060 | For this to work the best as possible you should call | 2062 | For this to work the best as possible you should call |
| 2061 | `python-shell-send-buffer' from time to time so context in | 2063 | `python-shell-send-buffer' from time to time so context in |
| 2062 | inferior python process is updated properly." | 2064 | inferior python process is updated properly." |
| 2063 | (interactive) | ||
| 2064 | (let ((process (python-shell-get-process))) | 2065 | (let ((process (python-shell-get-process))) |
| 2065 | (if (not process) | 2066 | (if (not process) |
| 2066 | (error "Completion needs an inferior Python process running") | 2067 | (error "Completion needs an inferior Python process running") |
diff --git a/lisp/rect.el b/lisp/rect.el index 1bf7364e20d..c5e9a790ca2 100644 --- a/lisp/rect.el +++ b/lisp/rect.el | |||
| @@ -219,6 +219,7 @@ even beep.)" | |||
| 219 | (condition-case nil | 219 | (condition-case nil |
| 220 | (setq killed-rectangle (delete-extract-rectangle start end fill)) | 220 | (setq killed-rectangle (delete-extract-rectangle start end fill)) |
| 221 | ((buffer-read-only text-read-only) | 221 | ((buffer-read-only text-read-only) |
| 222 | (setq deactivate-mark t) | ||
| 222 | (setq killed-rectangle (extract-rectangle start end)) | 223 | (setq killed-rectangle (extract-rectangle start end)) |
| 223 | (if kill-read-only-ok | 224 | (if kill-read-only-ok |
| 224 | (progn (message "Read only text copied to kill ring") nil) | 225 | (progn (message "Read only text copied to kill ring") nil) |
| @@ -230,7 +231,9 @@ even beep.)" | |||
| 230 | "Copy the region-rectangle and save it as the last killed one." | 231 | "Copy the region-rectangle and save it as the last killed one." |
| 231 | (interactive "r") | 232 | (interactive "r") |
| 232 | (setq killed-rectangle (extract-rectangle start end)) | 233 | (setq killed-rectangle (extract-rectangle start end)) |
| 233 | (setq deactivate-mark t)) | 234 | (setq deactivate-mark t) |
| 235 | (if (called-interactively-p 'interactive) | ||
| 236 | (indicate-copied-region (length (car killed-rectangle))))) | ||
| 234 | 237 | ||
| 235 | ;;;###autoload | 238 | ;;;###autoload |
| 236 | (defun yank-rectangle () | 239 | (defun yank-rectangle () |
diff --git a/lisp/register.el b/lisp/register.el index 52c236e49be..2816c9831de 100644 --- a/lisp/register.el +++ b/lisp/register.el | |||
| @@ -336,7 +336,11 @@ Called from program, takes four args: REGISTER, START, END and DELETE-FLAG. | |||
| 336 | START and END are buffer positions indicating what to copy." | 336 | START and END are buffer positions indicating what to copy." |
| 337 | (interactive "cCopy to register: \nr\nP") | 337 | (interactive "cCopy to register: \nr\nP") |
| 338 | (set-register register (filter-buffer-substring start end)) | 338 | (set-register register (filter-buffer-substring start end)) |
| 339 | (if delete-flag (delete-region start end))) | 339 | (setq deactivate-mark t) |
| 340 | (cond (delete-flag | ||
| 341 | (delete-region start end)) | ||
| 342 | ((called-interactively-p 'interactive) | ||
| 343 | (indicate-copied-region)))) | ||
| 340 | 344 | ||
| 341 | (defun append-to-register (register start end &optional delete-flag) | 345 | (defun append-to-register (register start end &optional delete-flag) |
| 342 | "Append region to text in register REGISTER. | 346 | "Append region to text in register REGISTER. |
| @@ -350,7 +354,10 @@ START and END are buffer positions indicating what to append." | |||
| 350 | register (cond ((not reg) text) | 354 | register (cond ((not reg) text) |
| 351 | ((stringp reg) (concat reg text)) | 355 | ((stringp reg) (concat reg text)) |
| 352 | (t (error "Register does not contain text"))))) | 356 | (t (error "Register does not contain text"))))) |
| 353 | (if delete-flag (delete-region start end))) | 357 | (cond (delete-flag |
| 358 | (delete-region start end)) | ||
| 359 | ((called-interactively-p 'interactive) | ||
| 360 | (indicate-copied-region)))) | ||
| 354 | 361 | ||
| 355 | (defun prepend-to-register (register start end &optional delete-flag) | 362 | (defun prepend-to-register (register start end &optional delete-flag) |
| 356 | "Prepend region to text in register REGISTER. | 363 | "Prepend region to text in register REGISTER. |
| @@ -364,7 +371,10 @@ START and END are buffer positions indicating what to prepend." | |||
| 364 | register (cond ((not reg) text) | 371 | register (cond ((not reg) text) |
| 365 | ((stringp reg) (concat text reg)) | 372 | ((stringp reg) (concat text reg)) |
| 366 | (t (error "Register does not contain text"))))) | 373 | (t (error "Register does not contain text"))))) |
| 367 | (if delete-flag (delete-region start end))) | 374 | (cond (delete-flag |
| 375 | (delete-region start end)) | ||
| 376 | ((called-interactively-p 'interactive) | ||
| 377 | (indicate-copied-region)))) | ||
| 368 | 378 | ||
| 369 | (defun copy-rectangle-to-register (register start end &optional delete-flag) | 379 | (defun copy-rectangle-to-register (register start end &optional delete-flag) |
| 370 | "Copy rectangular region into register REGISTER. | 380 | "Copy rectangular region into register REGISTER. |
| @@ -374,10 +384,15 @@ To insert this register in the buffer, use \\[insert-register]. | |||
| 374 | Called from a program, takes four args: REGISTER, START, END and DELETE-FLAG. | 384 | Called from a program, takes four args: REGISTER, START, END and DELETE-FLAG. |
| 375 | START and END are buffer positions giving two corners of rectangle." | 385 | START and END are buffer positions giving two corners of rectangle." |
| 376 | (interactive "cCopy rectangle to register: \nr\nP") | 386 | (interactive "cCopy rectangle to register: \nr\nP") |
| 377 | (set-register register | 387 | (let ((rectangle (if delete-flag |
| 378 | (if delete-flag | 388 | (delete-extract-rectangle start end) |
| 379 | (delete-extract-rectangle start end) | 389 | (extract-rectangle start end)))) |
| 380 | (extract-rectangle start end)))) | 390 | (set-register register rectangle) |
| 391 | (when (and (null delete-flag) | ||
| 392 | (called-interactively-p 'interactive)) | ||
| 393 | (setq deactivate-mark t) | ||
| 394 | (indicate-copied-region (length (car rectangle)))))) | ||
| 395 | |||
| 381 | 396 | ||
| 382 | (provide 'register) | 397 | (provide 'register) |
| 383 | ;;; register.el ends here | 398 | ;;; register.el ends here |
diff --git a/lisp/simple.el b/lisp/simple.el index 3240ede0299..e1d6760e72b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -564,13 +564,28 @@ On nonblank line, delete any immediately following blank lines." | |||
| 564 | (if (looking-at "^[ \t]*\n\\'") | 564 | (if (looking-at "^[ \t]*\n\\'") |
| 565 | (delete-region (point) (point-max))))) | 565 | (delete-region (point) (point-max))))) |
| 566 | 566 | ||
| 567 | (defcustom delete-trailing-lines t | ||
| 568 | "If non-nil, \\[delete-trailing-whitespace] deletes trailing lines. | ||
| 569 | Trailing lines are deleted only if `delete-trailing-whitespace' | ||
| 570 | is called on the entire buffer (rather than an active region)." | ||
| 571 | :type 'boolean | ||
| 572 | :group 'editing | ||
| 573 | :version "24.2") | ||
| 574 | |||
| 567 | (defun delete-trailing-whitespace (&optional start end) | 575 | (defun delete-trailing-whitespace (&optional start end) |
| 568 | "Delete all the trailing whitespace across the current buffer. | 576 | "Delete trailing whitespace between START and END. |
| 569 | All whitespace after the last non-whitespace character in a line is deleted. | 577 | If called interactively, START and END are the start/end of the |
| 570 | This respects narrowing, created by \\[narrow-to-region] and friends. | 578 | region if the mark is active, or of the buffer's accessible |
| 571 | A formfeed is not considered whitespace by this function. | 579 | portion if the mark is inactive. |
| 572 | If END is nil, also delete all trailing lines at the end of the buffer. | 580 | |
| 573 | If the region is active, only delete whitespace within the region." | 581 | This command deletes whitespace characters after the last |
| 582 | non-whitespace character in each line between START and END. It | ||
| 583 | does not consider formfeed characters to be whitespace. | ||
| 584 | |||
| 585 | If this command acts on the entire buffer (i.e. if called | ||
| 586 | interactively with the mark inactive, or called from Lisp with | ||
| 587 | END nil), it also deletes all trailing lines at the end of the | ||
| 588 | buffer if the variable `delete-trailing-lines' is non-nil." | ||
| 574 | (interactive (progn | 589 | (interactive (progn |
| 575 | (barf-if-buffer-read-only) | 590 | (barf-if-buffer-read-only) |
| 576 | (if (use-region-p) | 591 | (if (use-region-p) |
| @@ -590,6 +605,7 @@ If the region is active, only delete whitespace within the region." | |||
| 590 | ;; Delete trailing empty lines. | 605 | ;; Delete trailing empty lines. |
| 591 | (goto-char end-marker) | 606 | (goto-char end-marker) |
| 592 | (when (and (not end) | 607 | (when (and (not end) |
| 608 | delete-trailing-lines | ||
| 593 | ;; Really the end of buffer. | 609 | ;; Really the end of buffer. |
| 594 | (save-restriction (widen) (eobp)) | 610 | (save-restriction (widen) (eobp)) |
| 595 | (<= (skip-chars-backward "\n") -2)) | 611 | (<= (skip-chars-backward "\n") -2)) |
| @@ -932,11 +948,8 @@ rather than line counts." | |||
| 932 | (concat " in " (buffer-name buffer)) | 948 | (concat " in " (buffer-name buffer)) |
| 933 | ""))) | 949 | ""))) |
| 934 | ;; Read the argument, offering that number (if any) as default. | 950 | ;; Read the argument, offering that number (if any) as default. |
| 935 | (list (read-number (format (if default "Goto line%s (%s): " | 951 | (list (read-number (format "Goto line%s: " buffer-prompt) |
| 936 | "Goto line%s: ") | 952 | (list default (line-number-at-pos))) |
| 937 | buffer-prompt | ||
| 938 | default) | ||
| 939 | default) | ||
| 940 | buffer)))) | 953 | buffer)))) |
| 941 | ;; Switch to the desired buffer, one way or another. | 954 | ;; Switch to the desired buffer, one way or another. |
| 942 | (if buffer | 955 | (if buffer |
| @@ -2248,6 +2261,33 @@ to `shell-command-history'." | |||
| 2248 | (or hist 'shell-command-history) | 2261 | (or hist 'shell-command-history) |
| 2249 | args))) | 2262 | args))) |
| 2250 | 2263 | ||
| 2264 | (defcustom async-shell-command-buffer 'confirm-new-buffer | ||
| 2265 | "What to do when the output buffer is used by another shell command. | ||
| 2266 | This option specifies how to resolve the conflict where a new command | ||
| 2267 | wants to direct its output to the buffer `*Async Shell Command*', | ||
| 2268 | but this buffer is already taken by another running shell command. | ||
| 2269 | |||
| 2270 | The value `confirm-kill-process' is used to ask for confirmation before | ||
| 2271 | killing the already running process and running a new process | ||
| 2272 | in the same buffer, `confirm-new-buffer' for confirmation before running | ||
| 2273 | the command in a new buffer with a name other than the default buffer name, | ||
| 2274 | `new-buffer' for doing the same without confirmation, | ||
| 2275 | `confirm-rename-buffer' for confirmation before renaming the existing | ||
| 2276 | output buffer and running a new command in the default buffer, | ||
| 2277 | `rename-buffer' for doing the same without confirmation." | ||
| 2278 | :type '(choice (const :tag "Confirm killing of running command" | ||
| 2279 | confirm-kill-process) | ||
| 2280 | (const :tag "Confirm creation of a new buffer" | ||
| 2281 | confirm-new-buffer) | ||
| 2282 | (const :tag "Create a new buffer" | ||
| 2283 | new-buffer) | ||
| 2284 | (const :tag "Confirm renaming of existing buffer" | ||
| 2285 | confirm-rename-buffer) | ||
| 2286 | (const :tag "Rename the existing buffer" | ||
| 2287 | rename-buffer)) | ||
| 2288 | :group 'shell | ||
| 2289 | :version "24.2") | ||
| 2290 | |||
| 2251 | (defun async-shell-command (command &optional output-buffer error-buffer) | 2291 | (defun async-shell-command (command &optional output-buffer error-buffer) |
| 2252 | "Execute string COMMAND asynchronously in background. | 2292 | "Execute string COMMAND asynchronously in background. |
| 2253 | 2293 | ||
| @@ -2402,12 +2442,40 @@ the use of a shell (with its need to quote arguments)." | |||
| 2402 | proc) | 2442 | proc) |
| 2403 | ;; Remove the ampersand. | 2443 | ;; Remove the ampersand. |
| 2404 | (setq command (substring command 0 (match-beginning 0))) | 2444 | (setq command (substring command 0 (match-beginning 0))) |
| 2405 | ;; If will kill a process, query first. | 2445 | ;; Ask the user what to do with already running process. |
| 2406 | (setq proc (get-buffer-process buffer)) | 2446 | (setq proc (get-buffer-process buffer)) |
| 2407 | (if proc | 2447 | (when proc |
| 2408 | (if (yes-or-no-p "A command is running. Kill it? ") | 2448 | (cond |
| 2449 | ((eq async-shell-command-buffer 'confirm-kill-process) | ||
| 2450 | ;; If will kill a process, query first. | ||
| 2451 | (if (yes-or-no-p "A command is running in the default buffer. Kill it? ") | ||
| 2409 | (kill-process proc) | 2452 | (kill-process proc) |
| 2410 | (error "Shell command in progress"))) | 2453 | (error "Shell command in progress"))) |
| 2454 | ((eq async-shell-command-buffer 'confirm-new-buffer) | ||
| 2455 | ;; If will create a new buffer, query first. | ||
| 2456 | (if (yes-or-no-p "A command is running in the default buffer. Use a new buffer? ") | ||
| 2457 | (setq buffer (generate-new-buffer | ||
| 2458 | (or output-buffer "*Async Shell Command*"))) | ||
| 2459 | (error "Shell command in progress"))) | ||
| 2460 | ((eq async-shell-command-buffer 'new-buffer) | ||
| 2461 | ;; It will create a new buffer. | ||
| 2462 | (setq buffer (generate-new-buffer | ||
| 2463 | (or output-buffer "*Async Shell Command*")))) | ||
| 2464 | ((eq async-shell-command-buffer 'confirm-rename-buffer) | ||
| 2465 | ;; If will rename the buffer, query first. | ||
| 2466 | (if (yes-or-no-p "A command is running in the default buffer. Rename it? ") | ||
| 2467 | (progn | ||
| 2468 | (with-current-buffer buffer | ||
| 2469 | (rename-uniquely)) | ||
| 2470 | (setq buffer (get-buffer-create | ||
| 2471 | (or output-buffer "*Async Shell Command*")))) | ||
| 2472 | (error "Shell command in progress"))) | ||
| 2473 | ((eq async-shell-command-buffer 'rename-buffer) | ||
| 2474 | ;; It will rename the buffer. | ||
| 2475 | (with-current-buffer buffer | ||
| 2476 | (rename-uniquely)) | ||
| 2477 | (setq buffer (get-buffer-create | ||
| 2478 | (or output-buffer "*Async Shell Command*")))))) | ||
| 2411 | (with-current-buffer buffer | 2479 | (with-current-buffer buffer |
| 2412 | (setq buffer-read-only nil) | 2480 | (setq buffer-read-only nil) |
| 2413 | ;; Setting buffer-read-only to nil doesn't suffice | 2481 | ;; Setting buffer-read-only to nil doesn't suffice |
| @@ -3337,38 +3405,50 @@ This command is similar to `copy-region-as-kill', except that it gives | |||
| 3337 | visual feedback indicating the extent of the region being copied." | 3405 | visual feedback indicating the extent of the region being copied." |
| 3338 | (interactive "r") | 3406 | (interactive "r") |
| 3339 | (copy-region-as-kill beg end) | 3407 | (copy-region-as-kill beg end) |
| 3340 | ;; This use of called-interactively-p is correct | 3408 | ;; This use of called-interactively-p is correct because the code it |
| 3341 | ;; because the code it controls just gives the user visual feedback. | 3409 | ;; controls just gives the user visual feedback. |
| 3342 | (if (called-interactively-p 'interactive) | 3410 | (if (called-interactively-p 'interactive) |
| 3343 | (let ((other-end (if (= (point) beg) end beg)) | 3411 | (indicate-copied-region))) |
| 3344 | (opoint (point)) | 3412 | |
| 3345 | ;; Inhibit quitting so we can make a quit here | 3413 | (defun indicate-copied-region (&optional message-len) |
| 3346 | ;; look like a C-g typed as a command. | 3414 | "Indicate that the region text has been copied interactively. |
| 3347 | (inhibit-quit t)) | 3415 | If the mark is visible in the selected window, blink the cursor |
| 3348 | (if (pos-visible-in-window-p other-end (selected-window)) | 3416 | between point and mark if there is currently no active region |
| 3349 | ;; Swap point-and-mark quickly so as to show the region that | 3417 | highlighting. |
| 3350 | ;; was selected. Don't do it if the region is highlighted. | 3418 | |
| 3351 | (unless (and (region-active-p) | 3419 | If the mark lies outside the selected window, display an |
| 3352 | (face-background 'region)) | 3420 | informative message containing a sample of the copied text. The |
| 3353 | ;; Swap point and mark. | 3421 | optional argument MESSAGE-LEN, if non-nil, specifies the length |
| 3354 | (set-marker (mark-marker) (point) (current-buffer)) | 3422 | of this sample text; it defaults to 40." |
| 3355 | (goto-char other-end) | 3423 | (let ((mark (mark t)) |
| 3356 | (sit-for blink-matching-delay) | 3424 | (point (point)) |
| 3357 | ;; Swap back. | 3425 | ;; Inhibit quitting so we can make a quit here |
| 3358 | (set-marker (mark-marker) other-end (current-buffer)) | 3426 | ;; look like a C-g typed as a command. |
| 3359 | (goto-char opoint) | 3427 | (inhibit-quit t)) |
| 3360 | ;; If user quit, deactivate the mark | 3428 | (if (pos-visible-in-window-p mark (selected-window)) |
| 3361 | ;; as C-g would as a command. | 3429 | ;; Swap point-and-mark quickly so as to show the region that |
| 3362 | (and quit-flag mark-active | 3430 | ;; was selected. Don't do it if the region is highlighted. |
| 3363 | (deactivate-mark))) | 3431 | (unless (and (region-active-p) |
| 3364 | (let* ((killed-text (current-kill 0)) | 3432 | (face-background 'region)) |
| 3365 | (message-len (min (length killed-text) 40))) | 3433 | ;; Swap point and mark. |
| 3366 | (if (= (point) beg) | 3434 | (set-marker (mark-marker) (point) (current-buffer)) |
| 3367 | ;; Don't say "killed"; that is misleading. | 3435 | (goto-char mark) |
| 3368 | (message "Saved text until \"%s\"" | 3436 | (sit-for blink-matching-delay) |
| 3369 | (substring killed-text (- message-len))) | 3437 | ;; Swap back. |
| 3370 | (message "Saved text from \"%s\"" | 3438 | (set-marker (mark-marker) mark (current-buffer)) |
| 3371 | (substring killed-text 0 message-len)))))))) | 3439 | (goto-char point) |
| 3440 | ;; If user quit, deactivate the mark | ||
| 3441 | ;; as C-g would as a command. | ||
| 3442 | (and quit-flag mark-active | ||
| 3443 | (deactivate-mark))) | ||
| 3444 | (let ((len (min (abs (- mark point)) | ||
| 3445 | (or message-len 40)))) | ||
| 3446 | (if (< point mark) | ||
| 3447 | ;; Don't say "killed"; that is misleading. | ||
| 3448 | (message "Saved text until \"%s\"" | ||
| 3449 | (buffer-substring-no-properties (- mark len) mark)) | ||
| 3450 | (message "Saved text from \"%s\"" | ||
| 3451 | (buffer-substring-no-properties mark (+ mark len)))))))) | ||
| 3372 | 3452 | ||
| 3373 | (defun append-next-kill (&optional interactive) | 3453 | (defun append-next-kill (&optional interactive) |
| 3374 | "Cause following command, if it kills, to append to previous kill. | 3454 | "Cause following command, if it kills, to append to previous kill. |
diff --git a/lisp/subr.el b/lisp/subr.el index 76fec5dd5ac..73bc1d99e05 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -2188,23 +2188,27 @@ by doing (clear-string STRING)." | |||
| 2188 | "Read a numeric value in the minibuffer, prompting with PROMPT. | 2188 | "Read a numeric value in the minibuffer, prompting with PROMPT. |
| 2189 | DEFAULT specifies a default value to return if the user just types RET. | 2189 | DEFAULT specifies a default value to return if the user just types RET. |
| 2190 | The value of DEFAULT is inserted into PROMPT." | 2190 | The value of DEFAULT is inserted into PROMPT." |
| 2191 | (let ((n nil)) | 2191 | (let ((n nil) |
| 2192 | (when default | 2192 | (default1 (if (consp default) (car default) default))) |
| 2193 | (when default1 | ||
| 2193 | (setq prompt | 2194 | (setq prompt |
| 2194 | (if (string-match "\\(\\):[ \t]*\\'" prompt) | 2195 | (if (string-match "\\(\\):[ \t]*\\'" prompt) |
| 2195 | (replace-match (format " (default %s)" default) t t prompt 1) | 2196 | (replace-match (format " (default %s)" default1) t t prompt 1) |
| 2196 | (replace-regexp-in-string "[ \t]*\\'" | 2197 | (replace-regexp-in-string "[ \t]*\\'" |
| 2197 | (format " (default %s) " default) | 2198 | (format " (default %s) " default1) |
| 2198 | prompt t t)))) | 2199 | prompt t t)))) |
| 2199 | (while | 2200 | (while |
| 2200 | (progn | 2201 | (progn |
| 2201 | (let ((str (read-from-minibuffer prompt nil nil nil nil | 2202 | (let ((str (read-from-minibuffer |
| 2202 | (and default | 2203 | prompt nil nil nil nil |
| 2203 | (number-to-string default))))) | 2204 | (when default |
| 2205 | (if (consp default) | ||
| 2206 | (mapcar 'number-to-string (delq nil default)) | ||
| 2207 | (number-to-string default)))))) | ||
| 2204 | (condition-case nil | 2208 | (condition-case nil |
| 2205 | (setq n (cond | 2209 | (setq n (cond |
| 2206 | ((zerop (length str)) default) | 2210 | ((zerop (length str)) default1) |
| 2207 | ((stringp str) (read str)))) | 2211 | ((stringp str) (string-to-number str)))) |
| 2208 | (error nil))) | 2212 | (error nil))) |
| 2209 | (unless (numberp n) | 2213 | (unless (numberp n) |
| 2210 | (message "Please enter a number.") | 2214 | (message "Please enter a number.") |
diff --git a/lisp/term/w32console.el b/lisp/term/w32console.el index d52a4e68932..ceaa936e79b 100644 --- a/lisp/term/w32console.el +++ b/lisp/term/w32console.el | |||
| @@ -52,6 +52,18 @@ | |||
| 52 | "Terminal initialization function for w32 console." | 52 | "Terminal initialization function for w32 console." |
| 53 | ;; Share function key initialization with w32 gui frames | 53 | ;; Share function key initialization with w32 gui frames |
| 54 | (x-setup-function-keys (selected-frame)) | 54 | (x-setup-function-keys (selected-frame)) |
| 55 | ;; Set terminal and keyboard encodings to the current OEM codepage. | ||
| 56 | (let ((oem-code-page-coding | ||
| 57 | (intern (format "cp%d" (w32-get-console-codepage)))) | ||
| 58 | (oem-code-page-output-coding | ||
| 59 | (intern (format "cp%d" (w32-get-console-output-codepage)))) | ||
| 60 | oem-cs-p oem-o-cs-p) | ||
| 61 | (setq oem-cs-p (coding-system-p oem-code-page-coding)) | ||
| 62 | (setq oem-o-cs-p (coding-system-p oem-code-page-output-coding)) | ||
| 63 | (when oem-cs-p | ||
| 64 | (set-keyboard-coding-system oem-code-page-coding) | ||
| 65 | (set-terminal-coding-system | ||
| 66 | (if oem-o-cs-p oem-code-page-output-coding oem-code-page-coding)))) | ||
| 55 | (let* ((colors w32-tty-standard-colors) | 67 | (let* ((colors w32-tty-standard-colors) |
| 56 | (color (car colors))) | 68 | (color (car colors))) |
| 57 | (tty-color-clear) | 69 | (tty-color-clear) |
diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index 4c875a35b3e..187c98af21f 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el | |||
| @@ -122,7 +122,14 @@ | |||
| 122 | ;;("\\label{*}" nil nil nil nil) | 122 | ;;("\\label{*}" nil nil nil nil) |
| 123 | )) | 123 | )) |
| 124 | 124 | ||
| 125 | ) | 125 | (ctable "The ctable package" |
| 126 | (("\\ctable[]{}{}{}" ?t "tab:" "\\ref{%s}" 1 ("table" "Tabelle")))) | ||
| 127 | |||
| 128 | (listings "The listings package" | ||
| 129 | (("lstlisting" ?l "lst:" "~\\ref{%s}" nil (regexp "[Ll]isting")))) | ||
| 130 | |||
| 131 | (minted "The minted package" | ||
| 132 | (("minted" ?l "lst:" "~\\ref{%s}" nil (regexp "[Ll]isting"))))) | ||
| 126 | "The default label environment descriptions. | 133 | "The default label environment descriptions. |
| 127 | Lower-case symbols correspond to a style file of the same name in the LaTeX | 134 | Lower-case symbols correspond to a style file of the same name in the LaTeX |
| 128 | distribution. Mixed-case symbols are convenience aliases.") | 135 | distribution. Mixed-case symbols are convenience aliases.") |
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index 8c349a2e20a..ae2f8fb8ea2 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el | |||
| @@ -1284,7 +1284,15 @@ This enforces rescanning the buffer on next use." | |||
| 1284 | ; (wbol "\\(\\`\\|[\n\r]\\)[ \t]*") | 1284 | ; (wbol "\\(\\`\\|[\n\r]\\)[ \t]*") |
| 1285 | (wbol "\\(^\\)[ \t]*") ; Need to keep the empty group because | 1285 | (wbol "\\(^\\)[ \t]*") ; Need to keep the empty group because |
| 1286 | ;;; because match number are hard coded | 1286 | ;;; because match number are hard coded |
| 1287 | (label-re "\\\\label{\\([^}]*\\)}") | 1287 | (label-re (concat "\\(?:" |
| 1288 | ;; Normal \label{...} | ||
| 1289 | "\\\\label{\\([^}]*\\)}" | ||
| 1290 | "\\|" | ||
| 1291 | ;; keyvals [..., label = {foo}, ...] | ||
| 1292 | ;; forms used by ctable, listings, | ||
| 1293 | ;; minted, ... | ||
| 1294 | "\\[[^]]*label[[:space:]]*=[[:space:]]*{?\\(?1:[^],}]+\\)}?[^[]*\\]" | ||
| 1295 | "\\)")) | ||
| 1288 | (include-re (concat wbol | 1296 | (include-re (concat wbol |
| 1289 | "\\\\\\(" | 1297 | "\\\\\\(" |
| 1290 | (mapconcat 'identity | 1298 | (mapconcat 'identity |
| @@ -1312,6 +1320,8 @@ This enforces rescanning the buffer on next use." | |||
| 1312 | "\\)\\([[{][^]}]*[]}]\\)*[[{]\\(%s\\)[]}]")) | 1320 | "\\)\\([[{][^]}]*[]}]\\)*[[{]\\(%s\\)[]}]")) |
| 1313 | (find-label-re-format | 1321 | (find-label-re-format |
| 1314 | (concat "\\(" | 1322 | (concat "\\(" |
| 1323 | "label[[:space:]]*=[[:space:]]*" | ||
| 1324 | "\\|" | ||
| 1315 | (mapconcat 'regexp-quote (append '("\\label") | 1325 | (mapconcat 'regexp-quote (append '("\\label") |
| 1316 | macros-with-labels) "\\|") | 1326 | macros-with-labels) "\\|") |
| 1317 | "\\)\\([[{][^]}]*[]}]\\)*[[{]\\(%s\\)[]}]")) | 1327 | "\\)\\([[{][^]}]*[]}]\\)*[[{]\\(%s\\)[]}]")) |
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el index 6e0562f4a4b..77dc7cc29bb 100644 --- a/lisp/textmodes/rst.el +++ b/lisp/textmodes/rst.el | |||
| @@ -103,6 +103,8 @@ | |||
| 103 | 103 | ||
| 104 | ;;; Code: | 104 | ;;; Code: |
| 105 | 105 | ||
| 106 | ;; FIXME: Add proper ";;;###autoload" comments. | ||
| 107 | |||
| 106 | ;; FIXME: When 24.1 is common place remove use of `lexical-let' and put "-*- | 108 | ;; FIXME: When 24.1 is common place remove use of `lexical-let' and put "-*- |
| 107 | ;; lexical-binding: t -*-" in the first line. | 109 | ;; lexical-binding: t -*-" in the first line. |
| 108 | 110 | ||
| @@ -123,7 +125,7 @@ | |||
| 123 | (defun rst-some (seq &optional pred) | 125 | (defun rst-some (seq &optional pred) |
| 124 | "Return non-nil if any element of SEQ yields non-nil when PRED is applied. | 126 | "Return non-nil if any element of SEQ yields non-nil when PRED is applied. |
| 125 | Apply PRED to each element of list SEQ until the first non-nil | 127 | Apply PRED to each element of list SEQ until the first non-nil |
| 126 | result is yielded and return this result. PRED defaults to | 128 | result is yielded and return this result. PRED defaults to |
| 127 | `identity'." | 129 | `identity'." |
| 128 | (unless pred | 130 | (unless pred |
| 129 | (setq pred 'identity)) | 131 | (setq pred 'identity)) |
| @@ -171,7 +173,7 @@ and before TAIL-RE and DELIM-RE in VAR or DEFAULT for no match." | |||
| 171 | ;; Use CVSHeader to really get information from CVS and not other version | 173 | ;; Use CVSHeader to really get information from CVS and not other version |
| 172 | ;; control systems. | 174 | ;; control systems. |
| 173 | (defconst rst-cvs-header | 175 | (defconst rst-cvs-header |
| 174 | "$CVSHeader: sm/rst_el/rst.el,v 1.287 2012-06-16 09:41:47 stefan Exp $") | 176 | "$CVSHeader: sm/rst_el/rst.el,v 1.301 2012-07-30 19:29:46 stefan Exp $") |
| 175 | (defconst rst-cvs-rev | 177 | (defconst rst-cvs-rev |
| 176 | (rst-extract-version "\\$" "CVSHeader: \\S + " "[0-9]+\\(?:\\.[0-9]+\\)+" | 178 | (rst-extract-version "\\$" "CVSHeader: \\S + " "[0-9]+\\(?:\\.[0-9]+\\)+" |
| 177 | " .*" rst-cvs-header "0.0") | 179 | " .*" rst-cvs-header "0.0") |
| @@ -185,22 +187,22 @@ and before TAIL-RE and DELIM-RE in VAR or DEFAULT for no match." | |||
| 185 | ;; Use LastChanged... to really get information from SVN. | 187 | ;; Use LastChanged... to really get information from SVN. |
| 186 | (defconst rst-svn-rev | 188 | (defconst rst-svn-rev |
| 187 | (rst-extract-version "\\$" "LastChangedRevision: " "[0-9]+" " " | 189 | (rst-extract-version "\\$" "LastChangedRevision: " "[0-9]+" " " |
| 188 | "$LastChangedRevision: 7444 $") | 190 | "$LastChangedRevision: 7490 $") |
| 189 | "The SVN revision of this file. | 191 | "The SVN revision of this file. |
| 190 | SVN revision is the upstream (docutils) revision.") | 192 | SVN revision is the upstream (docutils) revision.") |
| 191 | (defconst rst-svn-timestamp | 193 | (defconst rst-svn-timestamp |
| 192 | (rst-extract-version "\\$" "LastChangedDate: " ".+?+" " " | 194 | (rst-extract-version "\\$" "LastChangedDate: " ".+?+" " " |
| 193 | "$LastChangedDate: 2012-06-16 11:41:40 +0200 (Sat, 16 Jun 2012) $") | 195 | "$LastChangedDate: 2012-07-30 21:29:33 +0200 (Mon, 30 Jul 2012) $") |
| 194 | "The SVN time stamp of this file.") | 196 | "The SVN time stamp of this file.") |
| 195 | 197 | ||
| 196 | ;; Maintained by the release process. | 198 | ;; Maintained by the release process. |
| 197 | (defconst rst-official-version | 199 | (defconst rst-official-version |
| 198 | (rst-extract-version "%" "OfficialVersion: " "[0-9]+\\(?:\\.[0-9]+\\)+" " " | 200 | (rst-extract-version "%" "OfficialVersion: " "[0-9]+\\(?:\\.[0-9]+\\)+" " " |
| 199 | "%OfficialVersion: 1.3.0 %") | 201 | "%OfficialVersion: 1.3.1 %") |
| 200 | "Official version of the package.") | 202 | "Official version of the package.") |
| 201 | (defconst rst-official-cvs-rev | 203 | (defconst rst-official-cvs-rev |
| 202 | (rst-extract-version "[%$]" "Revision: " "[0-9]+\\(?:\\.[0-9]+\\)+" " " | 204 | (rst-extract-version "[%$]" "Revision: " "[0-9]+\\(?:\\.[0-9]+\\)+" " " |
| 203 | "%Revision: 1.287 %") | 205 | "%Revision: 1.301 %") |
| 204 | "CVS revision of this file in the official version.") | 206 | "CVS revision of this file in the official version.") |
| 205 | 207 | ||
| 206 | (defconst rst-version | 208 | (defconst rst-version |
| @@ -217,7 +219,9 @@ in parentheses follows the development revision and the time stamp.") | |||
| 217 | ("1.1.0" . "24.2") | 219 | ("1.1.0" . "24.2") |
| 218 | ("1.2.0" . "24.2") | 220 | ("1.2.0" . "24.2") |
| 219 | ("1.2.1" . "24.2") | 221 | ("1.2.1" . "24.2") |
| 220 | ("1.3.0" . "24.2"))) | 222 | ("1.3.0" . "24.2") |
| 223 | ("1.3.1" . "24.2") | ||
| 224 | )) | ||
| 221 | 225 | ||
| 222 | (unless (assoc rst-official-version rst-package-emacs-version-alist) | 226 | (unless (assoc rst-official-version rst-package-emacs-version-alist) |
| 223 | (error "Version %s not listed in `rst-package-emacs-version-alist'" | 227 | (error "Version %s not listed in `rst-package-emacs-version-alist'" |
| @@ -580,10 +584,13 @@ well but give an additional message." | |||
| 580 | ;; | 584 | ;; |
| 581 | ;; The adjustment function that adorns or rotates a section title. | 585 | ;; The adjustment function that adorns or rotates a section title. |
| 582 | (rst-define-key map [?\C-c ?\C-=] 'rst-adjust [?\C-c ?\C-a t]) | 586 | (rst-define-key map [?\C-c ?\C-=] 'rst-adjust [?\C-c ?\C-a t]) |
| 583 | (rst-define-key map [?\C-=] 'rst-adjust) ; (Does not work on the Mac OSX.) | 587 | (rst-define-key map [?\C-=] 'rst-adjust) ; Does not work on the Mac OSX and |
| 588 | ; on consoles. | ||
| 584 | 589 | ||
| 585 | ;; \C-c \C-a is the keymap for adornments. | 590 | ;; \C-c \C-a is the keymap for adornments. |
| 586 | (rst-define-key map [?\C-c ?\C-a ?\C-h] 'describe-prefix-bindings) | 591 | (rst-define-key map [?\C-c ?\C-a ?\C-h] 'describe-prefix-bindings) |
| 592 | ;; Another binding which works with all types of input. | ||
| 593 | (rst-define-key map [?\C-c ?\C-a ?\C-a] 'rst-adjust) | ||
| 587 | ;; Display the hierarchy of adornments implied by the current document | 594 | ;; Display the hierarchy of adornments implied by the current document |
| 588 | ;; contents. | 595 | ;; contents. |
| 589 | (rst-define-key map [?\C-c ?\C-a ?\C-d] 'rst-display-adornments-hierarchy) | 596 | (rst-define-key map [?\C-c ?\C-a ?\C-d] 'rst-display-adornments-hierarchy) |
| @@ -3954,7 +3961,9 @@ An association list of the tool-set to a list of the (command to use, | |||
| 3954 | extension of produced filename, options to the tool (nil or a | 3961 | extension of produced filename, options to the tool (nil or a |
| 3955 | string)) to be used for converting the document." | 3962 | string)) to be used for converting the document." |
| 3956 | ;; FIXME: These are not options but symbols which may be referenced by | 3963 | ;; FIXME: These are not options but symbols which may be referenced by |
| 3957 | ;; `rst-compile-*-toolset` below. | 3964 | ;; `rst-compile-*-toolset` below. The `:validate' keyword of |
| 3965 | ;; `defcustom' may help to define this properly in newer Emacs | ||
| 3966 | ;; versions (> 23.1). | ||
| 3958 | :type '(alist :options (html latex newlatex pseudoxml xml pdf s5) | 3967 | :type '(alist :options (html latex newlatex pseudoxml xml pdf s5) |
| 3959 | :key-type symbol | 3968 | :key-type symbol |
| 3960 | :value-type (list :tag "Specification" | 3969 | :value-type (list :tag "Specification" |
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 0fc48907f40..ae224f4102f 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog | |||
| @@ -1,3 +1,16 @@ | |||
| 1 | 2012-07-28 David Engster <deng@randomsample.de> | ||
| 2 | |||
| 3 | * url-dav.el (url-dav-supported-p): Added doc-string and remove | ||
| 4 | check for feature `xml' and function `xml-expand-namespace' which | ||
| 5 | never existed in Emacs proper. | ||
| 6 | (url-dav-process-response): Remove all indentation and newlines | ||
| 7 | from XML before parsing. Change call to `xml-parse-region' to do | ||
| 8 | namespace expansion with simple qualified names (Bug#11916). | ||
| 9 | (url-dav-request): Add autoload. | ||
| 10 | (url-dav-directory-files): Properly deal with empty directories. | ||
| 11 | Unhex URL before generating relative URLs. | ||
| 12 | (url-dav-file-directory-p): Fix check for 'DAV:collection. | ||
| 13 | |||
| 1 | 2012-07-11 Stefan Monnier <monnier@iro.umontreal.ca> | 14 | 2012-07-11 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 15 | ||
| 3 | * url.el, url-queue.el, url-parse.el, url-http.el, url-future.el: | 16 | * url.el, url-queue.el, url-parse.el, url-http.el, url-future.el: |
diff --git a/lisp/url/url-dav.el b/lisp/url/url-dav.el index 77e48b0e47d..4bb03369b9b 100644 --- a/lisp/url/url-dav.el +++ b/lisp/url/url-dav.el | |||
| @@ -53,10 +53,10 @@ | |||
| 53 | 53 | ||
| 54 | ;;;###autoload | 54 | ;;;###autoload |
| 55 | (defun url-dav-supported-p (url) | 55 | (defun url-dav-supported-p (url) |
| 56 | (and (featurep 'xml) | 56 | "Return WebDAV protocol version supported by URL. |
| 57 | (fboundp 'xml-expand-namespace) | 57 | Returns nil if WebDAV is not supported." |
| 58 | (url-intersection url-dav-supported-protocols | 58 | (url-intersection url-dav-supported-protocols |
| 59 | (plist-get (url-http-options url) 'dav)))) | 59 | (plist-get (url-http-options url) 'dav))) |
| 60 | 60 | ||
| 61 | (defun url-dav-node-text (node) | 61 | (defun url-dav-node-text (node) |
| 62 | "Return the text data from the XML node NODE." | 62 | "Return the text data from the XML node NODE." |
| @@ -385,7 +385,12 @@ XML document." | |||
| 385 | (when buffer | 385 | (when buffer |
| 386 | (unwind-protect | 386 | (unwind-protect |
| 387 | (with-current-buffer buffer | 387 | (with-current-buffer buffer |
| 388 | ;; First remove all indentation and line endings | ||
| 388 | (goto-char url-http-end-of-headers) | 389 | (goto-char url-http-end-of-headers) |
| 390 | (indent-rigidly (point) (point-max) -1000) | ||
| 391 | (save-excursion | ||
| 392 | (while (re-search-forward "\r?\n" nil t) | ||
| 393 | (replace-match ""))) | ||
| 389 | (setq overall-status url-http-response-status) | 394 | (setq overall-status url-http-response-status) |
| 390 | 395 | ||
| 391 | ;; XML documents can be transferred as either text/xml or | 396 | ;; XML documents can be transferred as either text/xml or |
| @@ -395,7 +400,7 @@ XML document." | |||
| 395 | url-http-content-type | 400 | url-http-content-type |
| 396 | (string-match "\\`\\(text\\|application\\)/xml" | 401 | (string-match "\\`\\(text\\|application\\)/xml" |
| 397 | url-http-content-type)) | 402 | url-http-content-type)) |
| 398 | (setq tree (xml-parse-region (point) (point-max))))) | 403 | (setq tree (xml-parse-region (point) (point-max) nil nil 'symbol-qnames)))) |
| 399 | ;; Clean up after ourselves. | 404 | ;; Clean up after ourselves. |
| 400 | (kill-buffer buffer))) | 405 | (kill-buffer buffer))) |
| 401 | 406 | ||
| @@ -411,6 +416,7 @@ XML document." | |||
| 411 | ;; nobody but us needs to know the difference. | 416 | ;; nobody but us needs to know the difference. |
| 412 | (list (cons url properties)))))) | 417 | (list (cons url properties)))))) |
| 413 | 418 | ||
| 419 | ;;;###autoload | ||
| 414 | (defun url-dav-request (url method tag body | 420 | (defun url-dav-request (url method tag body |
| 415 | &optional depth headers namespaces) | 421 | &optional depth headers namespaces) |
| 416 | "Perform WebDAV operation METHOD on URL. Return the parsed responses. | 422 | "Perform WebDAV operation METHOD on URL. Return the parsed responses. |
| @@ -768,8 +774,8 @@ files in the collection as well." | |||
| 768 | (defun url-dav-directory-files (url &optional full match nosort files-only) | 774 | (defun url-dav-directory-files (url &optional full match nosort files-only) |
| 769 | "Return a list of names of files in URL. | 775 | "Return a list of names of files in URL. |
| 770 | There are three optional arguments: | 776 | There are three optional arguments: |
| 771 | If FULL is non-nil, return absolute file names. Otherwise return names | 777 | If FULL is non-nil, return absolute URLs. Otherwise return names |
| 772 | that are relative to the specified directory. | 778 | that are relative to the specified URL. |
| 773 | If MATCH is non-nil, mention only file names that match the regexp MATCH. | 779 | If MATCH is non-nil, mention only file names that match the regexp MATCH. |
| 774 | If NOSORT is non-nil, the list is not sorted--its order is unpredictable. | 780 | If NOSORT is non-nil, the list is not sorted--its order is unpredictable. |
| 775 | NOSORT is useful if you plan to sort the result yourself." | 781 | NOSORT is useful if you plan to sort the result yourself." |
| @@ -779,8 +785,9 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable. | |||
| 779 | (files nil) | 785 | (files nil) |
| 780 | (parsed-url (url-generic-parse-url url))) | 786 | (parsed-url (url-generic-parse-url url))) |
| 781 | 787 | ||
| 782 | (if (= (length properties) 1) | 788 | (when (and (= (length properties) 1) |
| 783 | (signal 'file-error (list "Opening directory" "not a directory" url))) | 789 | (not (url-dav-file-directory-p url))) |
| 790 | (signal 'file-error (list "Opening directory" "not a directory" url))) | ||
| 784 | 791 | ||
| 785 | (while properties | 792 | (while properties |
| 786 | (setq child-props (pop properties) | 793 | (setq child-props (pop properties) |
| @@ -794,7 +801,9 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable. | |||
| 794 | ;; are not supposed to return fully-qualified names. | 801 | ;; are not supposed to return fully-qualified names. |
| 795 | (setq child-url (url-expand-file-name child-url parsed-url)) | 802 | (setq child-url (url-expand-file-name child-url parsed-url)) |
| 796 | (if (not full) | 803 | (if (not full) |
| 797 | (setq child-url (substring child-url (length url)))) | 804 | ;; Parts of the URL might be hex'ed. |
| 805 | (setq child-url (substring (url-unhex-string child-url) | ||
| 806 | (length url)))) | ||
| 798 | 807 | ||
| 799 | ;; We don't want '/' as the last character in filenames... | 808 | ;; We don't want '/' as the last character in filenames... |
| 800 | (if (string-match "/$" child-url) | 809 | (if (string-match "/$" child-url) |
| @@ -814,7 +823,8 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable. | |||
| 814 | (defun url-dav-file-directory-p (url) | 823 | (defun url-dav-file-directory-p (url) |
| 815 | "Return t if URL names an existing DAV collection." | 824 | "Return t if URL names an existing DAV collection." |
| 816 | (let ((properties (cdar (url-dav-get-properties url '(DAV:resourcetype))))) | 825 | (let ((properties (cdar (url-dav-get-properties url '(DAV:resourcetype))))) |
| 817 | (eq (plist-get properties 'DAV:resourcetype) 'DAV:collection))) | 826 | (when (member 'DAV:collection (plist-get properties 'DAV:resourcetype)) |
| 827 | t))) | ||
| 818 | 828 | ||
| 819 | (defun url-dav-make-directory (url &optional parents) | 829 | (defun url-dav-make-directory (url &optional parents) |
| 820 | "Create the directory DIR and any nonexistent parent dirs." | 830 | "Create the directory DIR and any nonexistent parent dirs." |
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 0f3298d2686..2d95b14244f 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el | |||
| @@ -1757,10 +1757,15 @@ saving the buffer." | |||
| 1757 | (call-interactively 'vc-version-diff) | 1757 | (call-interactively 'vc-version-diff) |
| 1758 | (when buffer-file-name (vc-buffer-sync not-urgent)) | 1758 | (when buffer-file-name (vc-buffer-sync not-urgent)) |
| 1759 | (let ((backend (vc-deduce-backend)) | 1759 | (let ((backend (vc-deduce-backend)) |
| 1760 | (default-directory default-directory) | ||
| 1760 | rootdir working-revision) | 1761 | rootdir working-revision) |
| 1761 | (unless backend | 1762 | (if backend |
| 1762 | (error "Buffer is not version controlled")) | 1763 | (setq rootdir (vc-call-backend backend 'root default-directory)) |
| 1763 | (setq rootdir (vc-call-backend backend 'root default-directory)) | 1764 | (setq rootdir (read-directory-name "Directory for VC root-diff: ")) |
| 1765 | (setq backend (vc-responsible-backend rootdir)) | ||
| 1766 | (if backend | ||
| 1767 | (setq default-directory rootdir) | ||
| 1768 | (error "Directory is not version controlled"))) | ||
| 1764 | (setq working-revision (vc-working-revision rootdir)) | 1769 | (setq working-revision (vc-working-revision rootdir)) |
| 1765 | ;; VC diff for the root directory produces output that is | 1770 | ;; VC diff for the root directory produces output that is |
| 1766 | ;; relative to it. Bind default-directory to the root directory | 1771 | ;; relative to it. Bind default-directory to the root directory |
| @@ -2213,10 +2218,15 @@ When called interactively with a prefix argument, prompt for LIMIT." | |||
| 2213 | (t | 2218 | (t |
| 2214 | (list (when (> vc-log-show-limit 0) vc-log-show-limit))))) | 2219 | (list (when (> vc-log-show-limit 0) vc-log-show-limit))))) |
| 2215 | (let ((backend (vc-deduce-backend)) | 2220 | (let ((backend (vc-deduce-backend)) |
| 2221 | (default-directory default-directory) | ||
| 2216 | rootdir working-revision) | 2222 | rootdir working-revision) |
| 2217 | (unless backend | 2223 | (if backend |
| 2218 | (error "Buffer is not version controlled")) | 2224 | (setq rootdir (vc-call-backend backend 'root default-directory)) |
| 2219 | (setq rootdir (vc-call-backend backend 'root default-directory)) | 2225 | (setq rootdir (read-directory-name "Directory for VC root-log: ")) |
| 2226 | (setq backend (vc-responsible-backend rootdir)) | ||
| 2227 | (if backend | ||
| 2228 | (setq default-directory rootdir) | ||
| 2229 | (error "Directory is not version controlled"))) | ||
| 2220 | (setq working-revision (vc-working-revision rootdir)) | 2230 | (setq working-revision (vc-working-revision rootdir)) |
| 2221 | (vc-print-log-internal backend (list rootdir) working-revision nil limit))) | 2231 | (vc-print-log-internal backend (list rootdir) working-revision nil limit))) |
| 2222 | 2232 | ||
diff --git a/lisp/xml.el b/lisp/xml.el index e2788e5e756..179fdd6b5cc 100644 --- a/lisp/xml.el +++ b/lisp/xml.el | |||
| @@ -126,7 +126,10 @@ tag. For example, | |||
| 126 | 126 | ||
| 127 | would be represented by | 127 | would be represented by |
| 128 | 128 | ||
| 129 | '(\"\" . \"foo\")." | 129 | '(\"\" . \"foo\"). |
| 130 | |||
| 131 | If you'd just like a plain symbol instead, use 'symbol-qnames in | ||
| 132 | the PARSE-NS argument." | ||
| 130 | 133 | ||
| 131 | (car node)) | 134 | (car node)) |
| 132 | 135 | ||
| @@ -313,7 +316,22 @@ only those characters, have whitespace syntax.") | |||
| 313 | "Parse the well-formed XML file FILE. | 316 | "Parse the well-formed XML file FILE. |
| 314 | Return the top node with all its children. | 317 | Return the top node with all its children. |
| 315 | If PARSE-DTD is non-nil, the DTD is parsed rather than skipped. | 318 | If PARSE-DTD is non-nil, the DTD is parsed rather than skipped. |
| 316 | If PARSE-NS is non-nil, then QNAMES are expanded." | 319 | |
| 320 | If PARSE-NS is non-nil, then QNAMES are expanded. By default, | ||
| 321 | the variable `xml-default-ns' is the mapping from namespaces to | ||
| 322 | URIs, and expanded names will be returned as a cons | ||
| 323 | |||
| 324 | (\"namespace:\" . \"foo\"). | ||
| 325 | |||
| 326 | If PARSE-NS is an alist, it will be used as the mapping from | ||
| 327 | namespace to URIs instead. | ||
| 328 | |||
| 329 | If it is the symbol 'symbol-qnames, expanded names will be | ||
| 330 | returned as a plain symbol 'namespace:foo instead of a cons. | ||
| 331 | |||
| 332 | Both features can be combined by providing a cons cell | ||
| 333 | |||
| 334 | (symbol-qnames . ALIST)." | ||
| 317 | (with-temp-buffer | 335 | (with-temp-buffer |
| 318 | (insert-file-contents file) | 336 | (insert-file-contents file) |
| 319 | (xml--parse-buffer parse-dtd parse-ns))) | 337 | (xml--parse-buffer parse-dtd parse-ns))) |
| @@ -329,7 +347,21 @@ If END is nil, it defaults to `point-max'. | |||
| 329 | If BUFFER is nil, it defaults to the current buffer. | 347 | If BUFFER is nil, it defaults to the current buffer. |
| 330 | If PARSE-DTD is non-nil, parse the DTD and return it as the first | 348 | If PARSE-DTD is non-nil, parse the DTD and return it as the first |
| 331 | element of the list. | 349 | element of the list. |
| 332 | If PARSE-NS is non-nil, expand QNAMES." | 350 | If PARSE-NS is non-nil, then QNAMES are expanded. By default, |
| 351 | the variable `xml-default-ns' is the mapping from namespaces to | ||
| 352 | URIs, and expanded names will be returned as a cons | ||
| 353 | |||
| 354 | (\"namespace:\" . \"foo\"). | ||
| 355 | |||
| 356 | If PARSE-NS is an alist, it will be used as the mapping from | ||
| 357 | namespace to URIs instead. | ||
| 358 | |||
| 359 | If it is the symbol 'symbol-qnames, expanded names will be | ||
| 360 | returned as a plain symbol 'namespace:foo instead of a cons. | ||
| 361 | |||
| 362 | Both features can be combined by providing a cons cell | ||
| 363 | |||
| 364 | (symbol-qnames . ALIST)." | ||
| 333 | ;; Use fixed syntax table to ensure regexp char classes and syntax | 365 | ;; Use fixed syntax table to ensure regexp char classes and syntax |
| 334 | ;; specs DTRT. | 366 | ;; specs DTRT. |
| 335 | (unless buffer | 367 | (unless buffer |
| @@ -386,26 +418,36 @@ is nil. | |||
| 386 | 418 | ||
| 387 | During namespace-aware parsing, any name without a namespace is | 419 | During namespace-aware parsing, any name without a namespace is |
| 388 | put into the namespace identified by DEFAULT. nil is used to | 420 | put into the namespace identified by DEFAULT. nil is used to |
| 389 | specify that the name shouldn't be given a namespace." | 421 | specify that the name shouldn't be given a namespace. |
| 422 | Expanded names will by default be returned as a cons. If you | ||
| 423 | would like to get plain symbols instead, provide a cons cell | ||
| 424 | |||
| 425 | (symbol-qnames . ALIST) | ||
| 426 | |||
| 427 | in the XML-NS argument." | ||
| 390 | (if (consp xml-ns) | 428 | (if (consp xml-ns) |
| 391 | (let* ((nsp (string-match ":" name)) | 429 | (let* ((symbol-qnames (eq (car-safe xml-ns) 'symbol-qnames)) |
| 430 | (nsp (string-match ":" name)) | ||
| 392 | (lname (if nsp (substring name (match-end 0)) name)) | 431 | (lname (if nsp (substring name (match-end 0)) name)) |
| 393 | (prefix (if nsp (substring name 0 (match-beginning 0)) default)) | 432 | (prefix (if nsp (substring name 0 (match-beginning 0)) default)) |
| 394 | (special (and (string-equal lname "xmlns") (not prefix))) | 433 | (special (and (string-equal lname "xmlns") (not prefix))) |
| 395 | ;; Setting default to nil will insure that there is not | 434 | ;; Setting default to nil will insure that there is not |
| 396 | ;; matching cons in xml-ns. In which case we | 435 | ;; matching cons in xml-ns. In which case we |
| 397 | (ns (or (cdr (assoc (if special "xmlns" prefix) | 436 | (ns (or (cdr (assoc (if special "xmlns" prefix) |
| 398 | xml-ns)) | 437 | (if symbol-qnames (cdr xml-ns) xml-ns))) |
| 399 | ""))) | 438 | ""))) |
| 400 | (cons ns (if special "" lname))) | 439 | (if (and symbol-qnames |
| 440 | (not (string= prefix "xmlns"))) | ||
| 441 | (intern (concat ns lname)) | ||
| 442 | (cons ns (if special "" lname)))) | ||
| 401 | (intern name))) | 443 | (intern name))) |
| 402 | 444 | ||
| 403 | (defun xml-parse-tag (&optional parse-dtd parse-ns) | 445 | (defun xml-parse-tag (&optional parse-dtd parse-ns) |
| 404 | "Parse the tag at point. | 446 | "Parse the tag at point. |
| 405 | If PARSE-DTD is non-nil, the DTD of the document, if any, is parsed and | 447 | If PARSE-DTD is non-nil, the DTD of the document, if any, is parsed and |
| 406 | returned as the first element in the list. | 448 | returned as the first element in the list. |
| 407 | If PARSE-NS is non-nil, expand QNAMES; if the value of PARSE-NS | 449 | If PARSE-NS is non-nil, expand QNAMES; for further details, see |
| 408 | is a list, use it as an alist mapping namespaces to URIs. | 450 | `xml-parse-region'. |
| 409 | 451 | ||
| 410 | Return one of: | 452 | Return one of: |
| 411 | - a list : the matching node | 453 | - a list : the matching node |
| @@ -425,9 +467,16 @@ Return one of: | |||
| 425 | 467 | ||
| 426 | (defun xml-parse-tag-1 (&optional parse-dtd parse-ns) | 468 | (defun xml-parse-tag-1 (&optional parse-dtd parse-ns) |
| 427 | "Like `xml-parse-tag', but possibly modify the buffer while working." | 469 | "Like `xml-parse-tag', but possibly modify the buffer while working." |
| 428 | (let ((xml-validating-parser (or parse-dtd xml-validating-parser)) | 470 | (let* ((xml-validating-parser (or parse-dtd xml-validating-parser)) |
| 429 | (xml-ns (cond ((consp parse-ns) parse-ns) | 471 | (xml-ns |
| 430 | (parse-ns xml-default-ns)))) | 472 | (cond ((eq parse-ns 'symbol-qnames) |
| 473 | (cons 'symbol-qnames xml-default-ns)) | ||
| 474 | ((or (consp (car-safe parse-ns)) | ||
| 475 | (and (eq (car-safe parse-ns) 'symbol-qnames) | ||
| 476 | (listp (cdr parse-ns)))) | ||
| 477 | parse-ns) | ||
| 478 | (parse-ns | ||
| 479 | xml-default-ns)))) | ||
| 431 | (cond | 480 | (cond |
| 432 | ;; Processing instructions, like <?xml version="1.0"?>. | 481 | ;; Processing instructions, like <?xml version="1.0"?>. |
| 433 | ((looking-at "<\\?") | 482 | ((looking-at "<\\?") |
| @@ -475,7 +524,9 @@ Return one of: | |||
| 475 | (equal "http://www.w3.org/2000/xmlns/" | 524 | (equal "http://www.w3.org/2000/xmlns/" |
| 476 | (caar attr))) | 525 | (caar attr))) |
| 477 | (push (cons (cdar attr) (cdr attr)) | 526 | (push (cons (cdar attr) (cdr attr)) |
| 478 | xml-ns)))) | 527 | (if (symbolp (car xml-ns)) |
| 528 | (cdr xml-ns) | ||
| 529 | xml-ns))))) | ||
| 479 | (setq children (list attrs (xml-maybe-do-ns node-name "" xml-ns))) | 530 | (setq children (list attrs (xml-maybe-do-ns node-name "" xml-ns))) |
| 480 | (cond | 531 | (cond |
| 481 | ;; is this an empty element ? | 532 | ;; is this an empty element ? |