diff options
| author | Paul Eggert | 2012-04-21 17:53:32 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-04-21 17:53:32 -0700 |
| commit | bbd347f5f7e99da1a559dad818b5fa8f59c0901e (patch) | |
| tree | 77c1fc54c2240b08d2859109d18cac8812a8ffb1 /lisp | |
| parent | e4ecdc9c71af4199129d5dd2db1a32ff6b725fe4 (diff) | |
| parent | 9ee7d8b93cb143b473e6dffb708e777bc6fe5bd0 (diff) | |
| download | emacs-bbd347f5f7e99da1a559dad818b5fa8f59c0901e.tar.gz emacs-bbd347f5f7e99da1a559dad818b5fa8f59c0901e.zip | |
Merge from trunk.
Diffstat (limited to 'lisp')
137 files changed, 2728 insertions, 1422 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 954daf68510..2ffd9ce77a8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,7 +1,710 @@ | |||
| 1 | 2012-04-21 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * progmodes/verilog-mode.el (verilog-mode): Check whether | ||
| 4 | which-func-modes is t before adding verilog-mode. | ||
| 5 | Reported by Andy Moreton <andrewjmoreton@gmail.com>. | ||
| 6 | |||
| 7 | 2012-04-21 Leo Liu <sdl.web@gmail.com> | ||
| 8 | |||
| 9 | * net/rcirc.el (rcirc): Avoid error when process-contact returns t. | ||
| 10 | |||
| 11 | 2012-04-21 Michael Vehrs <Michael.Burschik@gmx.de> | ||
| 12 | |||
| 13 | * woman.el: Add support for "T{ T}" tbl syntax, and fix the | ||
| 14 | filling of the last column of a table (Bug#5635). | ||
| 15 | (woman-find-next-control-line): New arg, specifying an additional | ||
| 16 | regexp component for the control line. | ||
| 17 | (woman2-roff-buffer): Use it. | ||
| 18 | (woman-break-table): New function. | ||
| 19 | (woman2-TS): Use it. | ||
| 20 | |||
| 21 | 2012-04-21 Chong Yidong <cyd@gnu.org> | ||
| 22 | |||
| 23 | * woman.el (woman-set-buffer-display-table, woman-decode-region) | ||
| 24 | (woman-horizontal-escapes, woman-negative-vertical-space) | ||
| 25 | (woman-tab-to-tab-stop, woman2-fc, woman2-TS) | ||
| 26 | (WoMan-warn-ignored): Use ?\s instead of ?\ . | ||
| 27 | |||
| 28 | 2012-04-20 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 29 | |||
| 30 | * minibuffer.el (completion-file-name-table): Complete user names. | ||
| 31 | |||
| 32 | 2012-04-20 Leo Liu <sdl.web@gmail.com> | ||
| 33 | |||
| 34 | * font-lock.el (lisp-font-lock-keywords-2): Add pcase, pcase-let | ||
| 35 | and pcase-let*. | ||
| 36 | |||
| 37 | 2012-04-20 Chong Yidong <cyd@gnu.org> | ||
| 38 | |||
| 39 | * server.el (server-execute): Respect initial-buffer-choice if it | ||
| 40 | is a string and there are no files to open (Bug#2825). | ||
| 41 | (server-create-window-system-frame, server-create-tty-frame): | ||
| 42 | Don't switch buffers here. | ||
| 43 | (server-process-filter): Only try to open a window system frame if | ||
| 44 | compiled with graphical support (Bug#8314). | ||
| 45 | |||
| 46 | 2012-04-20 Dan Nicolaescu <dann@gnu.org> | ||
| 47 | |||
| 48 | * battery.el (battery-echo-area-format): Display remaining time | ||
| 49 | for sysfs backend too (Bug#11269). | ||
| 50 | (battery-linux-sysfs): Fix conditional for the charge. | ||
| 51 | |||
| 52 | 2012-04-20 Chong Yidong <cyd@gnu.org> | ||
| 53 | |||
| 54 | * progmodes/gdb-mi.el (gdb): Revert previous change. | ||
| 55 | (gdb-inferior-io--init-proc): New function. | ||
| 56 | (gdb-init-1): Use it. | ||
| 57 | (gdb-inferior-io-sentinel): New sentinel for the gdb-inferior pty, | ||
| 58 | responsible for allocating a new pty and hooking it to gdb when | ||
| 59 | the old pty gets an EIO due to process exit. | ||
| 60 | (gdb-delchar-or-quit): New command. Bind it in gdb-mi buffers. | ||
| 61 | (gdb-tooltip-print): Don't use obsolete tooltip-use-echo-area. | ||
| 62 | (gdb-inferior-io--maybe-delete-pty): Move into gdb-reset. | ||
| 63 | |||
| 64 | 2012-04-20 Eli Zaretskii <eliz@gnu.org> | ||
| 65 | |||
| 66 | * window.el (window-min-size, window-sizable, window-min-delta) | ||
| 67 | (window-max-delta, window--resizable, window-resizable) | ||
| 68 | (window-total-size, window-full-height-p, window-full-width-p) | ||
| 69 | (window-in-direction, window--resize-mini-window, window-resize) | ||
| 70 | (window--resize-child-windows-normal) | ||
| 71 | (window--resize-child-windows, window--resize-siblings) | ||
| 72 | (window--resize-this-window, adjust-window-trailing-edge) | ||
| 73 | (enlarge-window, shrink-window): Doc fixes. | ||
| 74 | |||
| 75 | 2012-04-20 Chong Yidong <cyd@gnu.org> | ||
| 76 | |||
| 77 | * progmodes/gdb-mi.el (gdb-inferior-io--maybe-delete-pty): New | ||
| 78 | function to call delete-process on the gdb-inferior buffer's pty. | ||
| 79 | (gdb-reset): Use it, instead of relying on kill-buffer to kill the | ||
| 80 | pty process (Bug#11273). | ||
| 81 | (gdb-update): New arg to suppress talking to the gdb process. | ||
| 82 | (gdb-done-or-error): Use it. | ||
| 83 | (gdb-stopped-functions): Rename from gdb-stopped-hooks. | ||
| 84 | (gdb): Call gdb-inferior-io--maybe-delete-pty as a workaround for | ||
| 85 | sentinel not being called. | ||
| 86 | |||
| 87 | * comint.el (make-comint-in-buffer, comint-exec): Doc fix. | ||
| 88 | |||
| 89 | * progmodes/grep.el (grep, rgrep): Doc fix (Bug#11268). | ||
| 90 | |||
| 91 | 2012-04-20 Glenn Morris <rgm@gnu.org> | ||
| 92 | |||
| 93 | * net/network-stream.el (open-network-stream): Doc fix. | ||
| 94 | |||
| 95 | 2012-04-20 Chong Yidong <cyd@gnu.org> | ||
| 96 | |||
| 97 | * emacs-lisp/tabulated-list.el (tabulated-list-print): Fix typos. | ||
| 98 | |||
| 99 | 2012-04-20 Alan Mackenzie <acm@muc.de> | ||
| 100 | |||
| 101 | Ensure searching for keywords is case sensitive. | ||
| 102 | |||
| 103 | * progmodes/cc-cmds.el (c-electric-brace, c-electric-lt-gt) | ||
| 104 | (c-electric-paren, c-beginning-of-defun, c-end-of-defun) | ||
| 105 | (c-defun-name, c-mark-function, c-cpp-define-name) | ||
| 106 | (c-comment-indent, c-scan-conditionals, c-indent-defun) | ||
| 107 | (c-context-line-break): Bind case-fold-search to nil. | ||
| 108 | |||
| 109 | * progmodes/cc-mode.el (c-font-lock-fontify-region): Bind | ||
| 110 | case-fold-search to nil. | ||
| 111 | |||
| 112 | 2012-04-20 Chong Yidong <cyd@gnu.org> | ||
| 113 | |||
| 114 | * mail/sendmail.el (mail-bury): Call return action with the right | ||
| 115 | Rmail buffer (Bug#11242). | ||
| 116 | |||
| 117 | * server.el (server-process-filter): Handle corner case where both | ||
| 118 | tty and nowait options are present (Bug#11102). | ||
| 119 | |||
| 120 | 2012-04-20 Eli Zaretskii <eliz@gnu.org> | ||
| 121 | |||
| 122 | * version.el (emacs-bzr-version, emacs-bzr-get-version): Doc fixes. | ||
| 123 | (top level): Put into the executable the ident-style '$Id:' tag on | ||
| 124 | windows-nt as well. | ||
| 125 | |||
| 126 | 2012-04-19 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 127 | |||
| 128 | * electric.el (electric-indent-post-self-insert-function): Check that | ||
| 129 | electric-indent-mode is enabled in current buffer. | ||
| 130 | |||
| 131 | 2012-04-19 Juanma Barranquero <lekktu@gmail.com> | ||
| 132 | |||
| 133 | * imenu.el (imenu-progress-message): Restore; it is "used" in | ||
| 134 | erc/erc-imenu.el and net/snmp-mode.el. | ||
| 135 | |||
| 136 | 2012-04-19 Juanma Barranquero <lekktu@gmail.com> | ||
| 137 | |||
| 138 | * avoid.el (mouse-avoidance-mode): Mark unused arg. | ||
| 139 | (mouse-avoidance-nudge-mouse): Remove unused binding. | ||
| 140 | |||
| 141 | * bs.el (bs-toggle-readonly): Call `toggle-read-only' interactively. | ||
| 142 | |||
| 143 | * descr-text.el (describe-char): | ||
| 144 | * progmodes/python.el (python-describe-symbol): | ||
| 145 | Don't call `toggle-read-only', set `buffer-read-only'. | ||
| 146 | |||
| 147 | * imenu.el (imenu-default-goto-function): Mark unused args. | ||
| 148 | (imenu-progress-message): Remove obsolete macro; all callers changed. | ||
| 149 | |||
| 150 | * subr.el (keymap-canonicalize): Remove unused binding. | ||
| 151 | (read-passwd): Mark unused arg. | ||
| 152 | |||
| 153 | * tutorial.el (tutorial--display-changes): Remove unused binding. | ||
| 154 | (tutorial--save-tutorial-to): Remove unused variable. | ||
| 155 | |||
| 156 | * emacs-lisp/package.el (define-package, package-menu-mark-delete) | ||
| 157 | (package-menu-mark-install, package-menu-mark-unmark): Mark unused args. | ||
| 158 | (package-generate-autoloads, package-menu--generate) | ||
| 159 | (package-menu--find-upgrades): Remove unused bindings. | ||
| 160 | |||
| 161 | * emulation/cua-rect.el (cua-restrict-regexp-rectangle) | ||
| 162 | (cua-restrict-prefix-rectangle): Doc fixes. Remove unused bindings. | ||
| 163 | (cua--mouse-ignore, cua--delete-rectangle, cua--extract-rectangle) | ||
| 164 | (cua--indent-rectangle, cua-open-rectangle, cua-close-rectangle) | ||
| 165 | (cua-blank-rectangle, cua-string-rectangle, cua-replace-in-rectangle) | ||
| 166 | (cua-incr-rectangle, cua-sequence-rectangle, cua--convert-rectangle-as) | ||
| 167 | (cua--rectangle-aux-replace, cua--left-fill-rectangle) | ||
| 168 | (cua-scroll-rectangle-up, cua-scroll-rectangle-down) | ||
| 169 | (cua-delete-char-rectangle): Mark unused args. | ||
| 170 | (cua-align-rectangle): Remove unused binding. | ||
| 171 | |||
| 172 | * mail/rmail.el (compilation--message->loc) | ||
| 173 | (epa--find-coding-system-for-mime-charset): Declare. | ||
| 174 | |||
| 175 | * net/dbus.el (dbus-register-service): Declare. | ||
| 176 | (dbus-name-owner-changed-handler): Remove unused binding. | ||
| 177 | |||
| 178 | * nxml/nxml-mode.el (nxml-electric-slash, nxml-in-mixed-content-p) | ||
| 179 | (nxml-compute-indent-from-matching-start-tag): Remove unused variables. | ||
| 180 | (nxml-scan-backward-within): Mark unused arg. | ||
| 181 | (nxml-dynamic-markup-word): Remove unused binding. | ||
| 182 | |||
| 183 | * mouse.el (mouse-menu-major-mode-map): | ||
| 184 | * emacs-lisp/authors.el (authors-scan-change-log) | ||
| 185 | (authors-add-to-author-list): | ||
| 186 | * emacs-lisp/avl-tree.el (avl-tree--enter-balance): | ||
| 187 | * emacs-lisp/smie.el (smie-auto-fill): | ||
| 188 | * mail/sendmail.el (mail-bury): | ||
| 189 | * mail/unrmail.el (unrmail): | ||
| 190 | * net/tls.el (open-tls-stream): | ||
| 191 | * textmodes/picture.el (picture-mouse-set-point): | ||
| 192 | Remove unused bindings. | ||
| 193 | |||
| 194 | 2012-04-19 Michael Albinus <michael.albinus@gmx.de> | ||
| 195 | |||
| 196 | * net/tramp.el (tramp-action-password): Let-bind | ||
| 197 | `enable-recursive-minibuffers' to t. | ||
| 198 | |||
| 199 | 2012-04-18 Sam Steingold <sds@gnu.org> | ||
| 200 | |||
| 201 | * progmodes/gud.el (gud-key-prefix): Use :type 'key-sequence | ||
| 202 | instead of 'string to accommodate values like [f11]. | ||
| 203 | Always use `vconcat' instead of `concat' on it, like in `gud-def'. | ||
| 204 | * progmodes/gdb-mi.el: Likewise. | ||
| 205 | |||
| 206 | 2012-04-18 Leo Liu <sdl.web@gmail.com> | ||
| 207 | |||
| 208 | * abbrev.el (edit-abbrevs): Move point to the abbrev table of | ||
| 209 | current buffer. | ||
| 210 | (prepare-abbrev-list-buffer): Enter edit-abbrevs-mode only if | ||
| 211 | LOCAL is nil. | ||
| 212 | |||
| 213 | 2012-04-18 Chong Yidong <cyd@gnu.org> | ||
| 214 | |||
| 215 | * simple.el (line-move): Use forward-line if in batch mode | ||
| 216 | (Bug#11053). | ||
| 217 | |||
| 218 | 2012-04-18 Christopher Schmidt <christopher@ch.ristopher.com> | ||
| 219 | |||
| 220 | * files.el (after-find-file): Do not try to add a final newline if | ||
| 221 | the buffer is read-only (Bug#11156). | ||
| 222 | |||
| 223 | 2012-04-17 Richard Stallman <rms@gnu.org> | ||
| 224 | |||
| 225 | * mail/rmail.el (rmail-start-mail): | ||
| 226 | Pass (rmail-mail-return...) for the return-action. | ||
| 227 | Pass (rmail-yank-current-message...) for the yank-action. | ||
| 228 | (rmail-yank-current-message): New function. | ||
| 229 | (rmail-mail): Pass the Rmail buffer, not view buffer, for replybuffer. | ||
| 230 | (rmail-reply): Likewise. | ||
| 231 | (rmail-forward): Pass the Rmail buffer, not nil, for replybuffer. | ||
| 232 | |||
| 233 | * mail/sendmail.el (mail-bury): Choose the first rmail-mode | ||
| 234 | buffer, not the last. Reject temp buffers. Use the rmail-mode | ||
| 235 | buffer, not newbuf. | ||
| 236 | |||
| 237 | 2012-04-17 Juanma Barranquero <lekktu@gmail.com> | ||
| 238 | |||
| 239 | * server.el (server-ensure-safe-dir): Simplify. | ||
| 240 | |||
| 241 | 2012-04-17 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 242 | |||
| 243 | * emacs-lisp/smie.el: Provide smarter auto-filling. | ||
| 244 | (smie-auto-fill): New function. | ||
| 245 | (smie-setup): Use it. | ||
| 246 | |||
| 247 | * newcomment.el (comment-choose-indent): Obey comment-inline-offset. | ||
| 248 | |||
| 249 | 2012-04-17 Philipp Haselwarter <philipp.haselwarter@gmx.de> (tiny change) | ||
| 250 | |||
| 251 | * newcomment.el (comment-inline-offset): New custom var (bug#11090). | ||
| 252 | (comment-indent): Use it. | ||
| 253 | |||
| 254 | 2012-04-17 Vincent Belaïche <vincentb1@users.sourceforge.net> | ||
| 255 | |||
| 256 | * ses.el: The overall change is to add cell renaming, that is | ||
| 257 | setting fancy names for cell symbols other than name matching | ||
| 258 | "\\`[A-Z]+[0-9]+\\'" regexp . | ||
| 259 | (ses-localvars): Add ses--renamed-cell-symb-list. | ||
| 260 | (ses-create-cell-variable): New defun. | ||
| 261 | (ses-destroy-cell-variable-range): Respect ses--numrows, ses--numcols. | ||
| 262 | (ses-relocate-formula): Relocate formulas only for cells the | ||
| 263 | symbols of which are not renamed, i.e. symbols whose names do not | ||
| 264 | match regexp "\\`[A-Z]+[0-9]+\\'". | ||
| 265 | (ses-relocate-all): Relocate values only for cells the symbols of | ||
| 266 | which are not renamed. | ||
| 267 | (ses-load): Create cells variables as the (ses-cell ...) are read, | ||
| 268 | in order to check row col consistency with cell symbol name only | ||
| 269 | for cells that are not renamed. | ||
| 270 | (ses-replace-name-in-formula): New defun. | ||
| 271 | (ses-rename-cell): New defun. | ||
| 272 | |||
| 273 | 2012-04-17 Peter Oliver <bzr@mavit.org.uk> (tiny change) | ||
| 274 | |||
| 275 | * progmodes/perl-mode.el (perl-indent-parens-as-block): | ||
| 276 | New option (bug#11118). | ||
| 277 | (perl-calculate-indent): Respect it. | ||
| 278 | |||
| 279 | 2012-04-17 Glenn Morris <rgm@gnu.org> | ||
| 280 | |||
| 281 | * dired-aux.el (dired-mark-read-string): Doc fix. | ||
| 282 | |||
| 283 | 2012-04-17 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 284 | |||
| 285 | * dired-aux.el (dired-mark-read-string): Offer optional completion. | ||
| 286 | (dired-do-chxxx): Complete chown, chgrp over users, groups. (Bug#7900) | ||
| 287 | |||
| 288 | 2012-04-17 Glenn Morris <rgm@gnu.org> | ||
| 289 | |||
| 290 | * mouse.el (mouse-drag-track): | ||
| 291 | * speedbar.el (speedbar-frame-mode): | ||
| 292 | Use auto-hscroll-mode rather than the alias automatic-hscrolling. | ||
| 293 | |||
| 294 | 2012-04-16 Leo Liu <sdl.web@gmail.com> | ||
| 295 | |||
| 296 | * progmodes/python.el: Trivial cleanup. | ||
| 297 | |||
| 298 | 2012-04-16 Glenn Morris <rgm@gnu.org> | ||
| 299 | |||
| 300 | * vc/vc.el (vc-string-prefix-p): | ||
| 301 | * vc/pcvs-util.el (cvs-string-prefix-p): | ||
| 302 | * textmodes/tex-mode.el (latex-string-prefix-p, tex-string-prefix-p): | ||
| 303 | * mpc.el (mpc-string-prefix-p): | ||
| 304 | Make all of these into obsolete aliases for string-prefix-p. | ||
| 305 | Update callers. | ||
| 306 | * vc/pcvs.el, vc/vc-dispatcher.el, vc/vc-dir.el: Update callers. | ||
| 307 | |||
| 308 | * textmodes/two-column.el: Move custom options to the start. | ||
| 309 | (frame-width): Remove compat definition. | ||
| 310 | (2C-associate-buffer, 2C-dissociate): | ||
| 311 | Use with-current-buffer rather than save-excursion. | ||
| 312 | (2C-dissociate): Force a mode-line update. | ||
| 313 | (2C-autoscroll): Use ignore-errors. | ||
| 314 | |||
| 315 | * emacs-lisp/eieio-opt.el (describe-class, describe-generic): | ||
| 316 | Autoload trivia. | ||
| 317 | |||
| 318 | * emacs-lisp/cl-extra.el (*random-state*): | ||
| 319 | Remove unnecessary declaration. | ||
| 320 | |||
| 321 | * calendar/cal-tex.el (cal-tex-end-document): Trivial clarification. | ||
| 322 | |||
| 323 | * play/cookie1.el (cookie-snarf): | ||
| 324 | Give an explicit error if input file cannot be read. | ||
| 325 | |||
| 326 | * play/yow.el (yow-file): Use expand-file-name rather than concat. | ||
| 327 | |||
| 328 | * progmodes/perl-mode.el (c-macro-expand): | ||
| 329 | Remove unnecessary autoload (it is in loaddefs.el). | ||
| 330 | |||
| 331 | * textmodes/picture.el (picture-desired-column) | ||
| 332 | (picture-update-desired-column): Convert comments to doc-strings. | ||
| 333 | (picture-substitute): Remove function. | ||
| 334 | (picture-mode-map): Initialize in the defvar. | ||
| 335 | |||
| 336 | * woman.el: Remove eval-after-load for tar-mode. | ||
| 337 | * tar-mode.el (tar-mode-map): Add woman binding and menu entry. | ||
| 338 | (woman-tar-extract-file): Autoload it. | ||
| 339 | |||
| 340 | * frame.el (automatic-hscrolling): Make this alias obsolete. | ||
| 341 | |||
| 342 | 2012-04-12 Agustín Martín Domingo <agustin.martin@hispalinux.es> | ||
| 343 | |||
| 344 | * ispell.el (ispell-set-spellchecker-params): Post-process | ||
| 345 | `ispell-dictionary-alist' to use [:alpha:] and utf-8 if possible. | ||
| 346 | (ispell-dictionary-base-alist): Revert to original XEmacs | ||
| 347 | friendly version for default. [:alpha:] will be added in | ||
| 348 | `ispell-set-spellchecker-params' if needed | ||
| 349 | |||
| 350 | 2012-04-16 Chong Yidong <cyd@gnu.org> | ||
| 351 | |||
| 352 | * image.el (imagemagick--extension-regexp): New variable. | ||
| 353 | (imagemagick-register-types): Use it. | ||
| 354 | (imagemagick-types-inhibit): Add :set function. Allow new value | ||
| 355 | of t to inhibit all types. | ||
| 356 | |||
| 357 | * emacs-lisp/regexp-opt.el (regexp-opt-charset): Avoid cl macros, | ||
| 358 | so we can preload it. | ||
| 359 | |||
| 360 | * loadup.el (fboundp): Preload regexp-opt, needed by | ||
| 361 | imagemagick-register-types. | ||
| 362 | |||
| 363 | 2012-04-15 Chong Yidong <cyd@gnu.org> | ||
| 364 | |||
| 365 | * frame.el (scrolling): Remove nearly unused customization group. | ||
| 366 | |||
| 367 | * scroll-all.el (scroll-all-mode): Move to windows group. | ||
| 368 | |||
| 369 | 2012-04-15 Chong Yidong <cyd@gnu.org> | ||
| 370 | |||
| 371 | * bindings.el (goto-map): Bind goto-char to M-g c (Bug#11240). | ||
| 372 | |||
| 373 | 2012-04-15 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 374 | |||
| 375 | Avoid the use of ((lambda ...) ...) in lexical-binding code. | ||
| 376 | * emacs-lisp/easy-mmode.el (define-minor-mode): Use funcall (bug#11241). | ||
| 377 | |||
| 378 | 2012-04-15 Glenn Morris <rgm@gnu.org> | ||
| 379 | |||
| 380 | * simple.el (process-file-side-effects): Doc fix. | ||
| 381 | |||
| 382 | 2012-04-15 Glenn Morris <rgm@gnu.org> | ||
| 383 | |||
| 384 | * international/mule-cmds.el (set-language-environment): Doc fix. | ||
| 385 | |||
| 386 | 2012-04-14 Juanma Barranquero <lekktu@gmail.com> | ||
| 387 | |||
| 388 | * server.el (server-auth-key, server-generate-key): Doc fixes. | ||
| 389 | (server-get-auth-key): Doc fix. Use `string-match-p'. | ||
| 390 | (server-start): Reflow docstring. | ||
| 391 | |||
| 392 | 2012-04-14 Lars Ingebrigtsen <larsi@gnus.org> | ||
| 393 | |||
| 394 | * server.el (server-generate-key): `called-interactively-p' | ||
| 395 | requires a parameter. | ||
| 396 | |||
| 397 | 2012-04-14 Michal Nazarewicz <mina86@mina86.com> | ||
| 398 | |||
| 399 | * server.el (server-auth-key): New variable. | ||
| 400 | (server-generate-key, server-get-auth-key): New function. | ||
| 401 | (server-start): Use the new variable and functions to allow | ||
| 402 | setting a permanent server key (bug#9423). | ||
| 403 | |||
| 404 | 2012-04-14 Leo Liu <sdl.web@gmail.com> | ||
| 405 | |||
| 406 | * vc/diff-mode.el (diff-file-prev/next): Fix typo. | ||
| 407 | |||
| 408 | 2012-04-14 Paul Eggert <eggert@cs.ucla.edu> | ||
| 409 | |||
| 410 | Spelling fixes. | ||
| 411 | * hexl.el (hexl-rulerize): Rename from hexl-rulerise, since | ||
| 412 | Emacs uses American spelling. | ||
| 413 | |||
| 414 | 2012-04-14 Juanma Barranquero <lekktu@gmail.com> | ||
| 415 | |||
| 416 | * emacs-lock.el (emacs-lock-locked-buffer-functions): New hook. | ||
| 417 | (emacs-lock--exit-locked-buffer): Return the locked buffer. Doc fix. | ||
| 418 | (emacs-lock--kill-emacs-hook, emacs-lock--kill-emacs-query-functions) | ||
| 419 | (emacs-lock--kill-buffer-query-functions): Run new hook. (Bug#11017) | ||
| 420 | |||
| 421 | 2012-04-14 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 422 | |||
| 423 | * progmodes/which-func.el (which-func-modes): Change default. | ||
| 424 | |||
| 425 | 2012-04-14 Kim F. Storm <storm@cua.dk> | ||
| 426 | |||
| 427 | * emulation/cua-base.el (cua-exchange-point-and-mark): Just call | ||
| 428 | exchange-point-and-mark if cua-enable-cua-keys is nil (Bug#11191). | ||
| 429 | |||
| 430 | 2012-04-14 Chong Yidong <cyd@gnu.org> | ||
| 431 | |||
| 432 | * custom.el (custom-theme-set-variables): Doc fix. | ||
| 433 | |||
| 434 | 2012-04-14 Glenn Morris <rgm@gnu.org> | ||
| 435 | |||
| 436 | * international/mule.el (set-auto-coding-for-load): Doc fix. | ||
| 437 | |||
| 438 | 2012-04-14 Alan Mackenzie <acm@muc.de> | ||
| 439 | |||
| 440 | * progmodes/cc-menus.el (cc-imenu-objc-generic-expression): Make | ||
| 441 | imenu work again for Objective C Mode. Correct the *-index values, | ||
| 442 | these having been disturbed by a previous change in 2011-08. | ||
| 443 | |||
| 444 | * progmodes/cc-engine.el (c-before-change-check-<>-operators): | ||
| 445 | Correct two search limits. | ||
| 446 | |||
| 447 | 2012-04-14 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 448 | |||
| 449 | * startup.el (command-line-1): Inhibit splash from daemon (bug#10996). | ||
| 450 | |||
| 451 | 2012-04-14 Andreas Schwab <schwab@linux-m68k.org> | ||
| 452 | |||
| 453 | * international/characters.el: Fix sorting. | ||
| 454 | |||
| 455 | 2012-04-14 Eli Zaretskii <eliz@gnu.org> | ||
| 456 | |||
| 457 | * international/characters.el: Add more missing Latin case pairs. | ||
| 458 | |||
| 459 | 2012-04-14 Glenn Morris <rgm@gnu.org> | ||
| 460 | |||
| 461 | * files.el (dir-locals-set-class-variables): Doc fix. | ||
| 462 | |||
| 463 | 2012-04-14 Eli Zaretskii <eliz@gnu.org> | ||
| 464 | |||
| 465 | * international/characters.el: Add set-case-syntax-pair call for | ||
| 466 | LATIN CAPITAL LETTER Y WITH DIAERESIS RET and its lower-case | ||
| 467 | counterpart. (Bug#11209) | ||
| 468 | |||
| 469 | * simple.el (shell-command-on-region): Doc fix. (Bug#11208) | ||
| 470 | |||
| 471 | 2012-04-14 Glenn Morris <rgm@gnu.org> | ||
| 472 | |||
| 473 | * calendar/holidays.el (calendar-check-holidays): Doc fix. | ||
| 474 | |||
| 475 | 2012-04-14 Eli Zaretskii <eliz@gnu.org> | ||
| 476 | |||
| 477 | * textmodes/ispell.el (ispell-dictionary-base-alist): | ||
| 478 | Add data for Hebrew. | ||
| 479 | |||
| 480 | 2012-04-14 Chong Yidong <cyd@gnu.org> | ||
| 481 | |||
| 482 | * net/rcirc.el (rcirc-cmd-quit): | ||
| 483 | Revert 2012-03-18 change (Bug#11192). | ||
| 484 | |||
| 485 | 2012-04-14 Glenn Morris <rgm@gnu.org> | ||
| 486 | |||
| 487 | * pcmpl-rpm.el (pcomplete/rpm): Handle -qf. | ||
| 488 | |||
| 489 | 2012-04-14 Eli Zaretskii <eliz@gnu.org> | ||
| 490 | |||
| 491 | * minibuffer.el (completion-in-region-mode-map): | ||
| 492 | Bind completion-help-at-point to M-? rather than ?. (Bug#11182) | ||
| 493 | |||
| 494 | 2012-04-13 Vivek Dasmohapatra <vivek@etla.org> | ||
| 495 | |||
| 496 | * hexl.el (hexl-insert-char): Make display sizes other than 16 work. | ||
| 497 | |||
| 498 | 2012-04-13 Masatake YAMATO <yamato@redhat.com> | ||
| 499 | |||
| 500 | * minibuffer.el (minibuffer-local-filename-syntax): New variable | ||
| 501 | to allow `C-M-f' and `C-M-b' to move to the nearest path | ||
| 502 | separator (bug#9511). | ||
| 503 | |||
| 504 | 2012-04-13 Lars Ingebrigtsen <larsi@gnus.org> | ||
| 505 | |||
| 506 | * avoid.el: Require cl when compiling. And also move the | ||
| 507 | `provide' to the end. | ||
| 508 | |||
| 509 | 2012-04-13 Thierry Volpiatto <thierry.volpiatto@gmail.com> | ||
| 510 | |||
| 511 | * avoid.el (mouse-avoidance-banish-position): New variable. | ||
| 512 | (mouse-avoidance-banish-destination): Use it (bug#10165). | ||
| 513 | |||
| 514 | 2012-04-13 Leo Liu <sdl.web@gmail.com> | ||
| 515 | |||
| 516 | * progmodes/which-func.el (which-func-modes): Add objc-mode. | ||
| 517 | |||
| 518 | 2012-04-13 Ken Brown <kbrown@cornell.edu> | ||
| 519 | |||
| 520 | * net/browse-url.el (browse-url-file-url): Remove Cygwin hack; | ||
| 521 | this is no longer needed now that cygstart understands file:// URLs. | ||
| 522 | (browse-url-filename-alist): For the same reason, don't modify | ||
| 523 | file:// URLs on Cygwin. | ||
| 524 | |||
| 525 | 2012-04-13 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 526 | |||
| 527 | * emulation/cua-base.el (cua--pre-command-handler-1): Don't activate | ||
| 528 | the region on shift if the binding is already shifted (bug#11221). | ||
| 529 | |||
| 530 | 2012-04-12 Glenn Morris <rgm@gnu.org> | ||
| 531 | |||
| 532 | * mail/mailpost.el: Move to obsolete/. | ||
| 533 | |||
| 534 | 2012-04-12 Drew Adams <drew.adams@oracle.com> | ||
| 535 | |||
| 536 | * imenu.el (imenu--generic-function): Ignore invisible definitions | ||
| 537 | (bug#10123). | ||
| 538 | |||
| 539 | 2012-04-12 Vivek Dasmohapatra <vivek@etla.org> | ||
| 540 | |||
| 541 | * hexl.el (hexl-bits): New variable. | ||
| 542 | (hexl-options): Mention the variable in the doc string. | ||
| 543 | (hexl-rulerise, hexl-line-displen): New functions. | ||
| 544 | (hexl-mode): Mention the new variable. | ||
| 545 | (hexl-mode, hexl-current-address, hexl-current-address): | ||
| 546 | Use the displen. | ||
| 547 | (hexl-ascii-start-column): New function. | ||
| 548 | (hexl-address-to-marker, hexl-beginning-of-line, hexl-options) | ||
| 549 | (hexl-insert-char, hexl-mode-ruler): Use the displen (bug#4941). | ||
| 550 | |||
| 551 | 2012-04-12 Agustín Martín Domingo <agustin.martin@hispalinux.es> | ||
| 552 | |||
| 553 | * textmodes/flyspell.el (flyspell-large-region): For hunspell, use | ||
| 554 | '("-i" ENCODING), in 2 separate command-line arguments, to specify | ||
| 555 | the encoding, as expected by hunspell. | ||
| 556 | |||
| 557 | 2012-04-12 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 558 | |||
| 559 | * battery.el (battery--linux-sysfs-regexp): New const. | ||
| 560 | (battery-status-function): Use it. Remove yeeloong special case. | ||
| 561 | (battery-yeeloong-sysfs): Remove. | ||
| 562 | (battery-echo-area-format): Remove yeeloong special case. | ||
| 563 | |||
| 564 | 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 565 | |||
| 566 | * imenu.el (imenu-add-to-menubar): `current-local-map' can be nil. | ||
| 567 | Reported by Noah Friedman. | ||
| 568 | |||
| 569 | * subr.el (read-passwd): Use read-string. | ||
| 570 | |||
| 571 | 2012-04-11 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 572 | |||
| 573 | * vcursor.el (vcursor-move): Increase the priority of the overlay | ||
| 574 | (bug#9663). | ||
| 575 | |||
| 576 | 2012-04-11 Deniz Dogan <deniz.a.m.dogan@gmail.com> | ||
| 577 | |||
| 578 | * net/rcirc.el (rcirc-kill-channel-buffers): New variable. | ||
| 579 | (rcirc-kill-buffer-hook): Use it to kill channel buffers (bug#5128). | ||
| 580 | |||
| 581 | 2012-04-11 William Stevenson <yhvh2000@gmail.com> | ||
| 582 | |||
| 583 | * textmodes/artist.el (artist-mode): Convert artist-mode to use | ||
| 584 | define-minor-mode (bug#10760). | ||
| 585 | |||
| 586 | 2012-04-11 Wolfgang Jenkner <wjenkner@inode.at> (tiny change) | ||
| 587 | |||
| 588 | * progmodes/grep.el (rgrep): Tweak the find command line so | ||
| 589 | that directories matching `grep-find-ignored-files' won't be | ||
| 590 | pruned (bug#10351). | ||
| 591 | |||
| 592 | 2012-04-11 Chong Yidong <cyd@gnu.org> | ||
| 593 | |||
| 594 | * startup.el (command-line): Remove support for long-obsolete | ||
| 595 | variable font-lock-face-attributes. | ||
| 596 | |||
| 597 | 2012-04-11 Glenn Morris <rgm@gnu.org> | ||
| 598 | |||
| 599 | * vc/vc-bzr.el (vc-bzr-status): Avoid condition-case-unless-debug. | ||
| 600 | |||
| 601 | 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 602 | |||
| 603 | * window.el (window--state-get-1): Obey window-point-insertion-type. | ||
| 604 | |||
| 605 | 2012-04-11 Lennart Borgman <lennart.borgman@gmail.com> | ||
| 606 | |||
| 607 | * emacs-lisp/lisp.el (narrow-to-defun): `beginning-of-defun' goes | ||
| 608 | to previous function when point is on the first character of a | ||
| 609 | function. Take care of that in `narrow-to-defun' (bug#6157). | ||
| 610 | |||
| 611 | 2012-04-11 Glenn Morris <rgm@gnu.org> | ||
| 612 | |||
| 613 | * vc/vc-bzr.el (vc-bzr-status): Handle all errors, | ||
| 614 | not just file-errors. | ||
| 615 | |||
| 616 | * vc/vc-bzr.el (vc-bzr-sha1-program, sha1-program): Remove. | ||
| 617 | (vc-bzr-sha1): Use internal sha1. | ||
| 618 | |||
| 619 | 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 620 | |||
| 621 | * progmodes/flymake.el (flymake-mode): Beware read-only dirs (bug#8954). | ||
| 622 | |||
| 623 | 2012-04-10 Sébastien Gross <seb@chezwam.org> (tiny change) | ||
| 624 | |||
| 625 | * progmodes/hideshow.el (hs-hide-all): Don't infloop on comments | ||
| 626 | that start in the middle of the line (bug#10496). | ||
| 627 | |||
| 628 | 2012-04-10 Dan Nicolaescu <dann@gnu.org> | ||
| 629 | |||
| 630 | * battery.el (battery-linux-proc-acpi): Only one battery is | ||
| 631 | discharged at a time, but that seems to confuse battery.el when | ||
| 632 | computing `rate-type' for the battery not being discharged | ||
| 633 | (bug#10332). | ||
| 634 | |||
| 635 | 2012-04-10 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 636 | |||
| 637 | * emacs-lisp/autoload.el (autoload-make-program): Remove, unused. | ||
| 638 | |||
| 639 | * international/quail.el: Use dolist and simplify. | ||
| 640 | (quail-define-package, quail-update-keyboard-layout) | ||
| 641 | (quail-define-rules): Use dolist. | ||
| 642 | (quail-insert-kbd-layout, quail-get-translation): CSE. | ||
| 643 | |||
| 644 | * tmm.el: Use dolist, remove left over hook. | ||
| 645 | (tmm-prompt, tmm-define-keys, tmm-shortcut, tmm-get-keybind): | ||
| 646 | Use dolist. | ||
| 647 | (calendar-load-hook): Don't mess with it. | ||
| 648 | |||
| 649 | * vc/vc-annotate.el (vc-annotate-show-diff-revision-at-line-internal): | ||
| 650 | Use derived-mode-p. Run the diff asynchronously. | ||
| 651 | |||
| 652 | 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 653 | |||
| 654 | * obsolete/mouse-sel.el: Add an Obsolete-since header. | ||
| 655 | |||
| 656 | 2012-04-10 Juanma Barranquero <lekktu@gmail.com> | ||
| 657 | |||
| 658 | * misc.el: Display absolute path of loaded DLLs (bug#10424). | ||
| 659 | (list-dynamic-libraries--loaded): New function. | ||
| 660 | (list-dynamic-libraries--refresh): Use it. | ||
| 661 | |||
| 662 | 2012-04-10 Nathan Weizenbaum <nweiz@google.com> | ||
| 663 | |||
| 664 | * progmodes/python.el (python-fill-paragraph): | ||
| 665 | Make python-fill-region in a multiline string work when font-lock is | ||
| 666 | disabled (bug#7018). | ||
| 667 | |||
| 668 | 2012-04-10 Laimonas Vėbra <laimonas.vebra@gmail.com> (tiny change) | ||
| 669 | |||
| 670 | * language/european.el (cp775): Add oem/legacy (en)coding on | ||
| 671 | DOS/MS Windows for the Baltic languages. There are still plenty | ||
| 672 | of texts written in this encoding/codepage (bug#6519). | ||
| 673 | |||
| 674 | 2012-04-10 Glenn Morris <rgm@gnu.org> | ||
| 675 | |||
| 676 | * cus-start.el (eol-mnemonic-unix, eol-mnemonic-dos, eol-mnemonic-mac): | ||
| 677 | Add :standard values, reducing "rogue" customs in emacs -Q a bit more. | ||
| 678 | |||
| 679 | 2012-04-10 Florian Adamsky <florian@adamsky.it> (tiny change) | ||
| 680 | |||
| 681 | * recentf.el (recentf-dialog-mode-map): Add two keybindings for | ||
| 682 | next-line "n" and previous-line "p" in order to make recentf more | ||
| 683 | consistent with ibuffer, dired or org-mode (bug#9387). | ||
| 684 | |||
| 685 | 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 686 | |||
| 687 | * image.el (put-image): Return the overlay created instead of the | ||
| 688 | optional input string (bug#7834). Note that this may break code | ||
| 689 | that is (for some reason or other) depending on `put-image' | ||
| 690 | returning the string. | ||
| 691 | |||
| 692 | * mouse-sel.el (mouse-sel-mode): Mark as obsolete (bug#6174). | ||
| 693 | |||
| 694 | * simple.el (zap-to-char): Allow zapping using input methods | ||
| 695 | (bug#1580). | ||
| 696 | |||
| 697 | * textmodes/fill.el (fill-region): Leave point and mark where they | ||
| 698 | were before filling (bug#5399). | ||
| 699 | |||
| 700 | 2012-04-09 Glenn Morris <rgm@gnu.org> | ||
| 701 | |||
| 702 | * version.el (emacs-bzr-get-version): | ||
| 703 | Handle lightweight checkouts of local branches. | ||
| 704 | |||
| 1 | 2012-04-09 Andreas Schwab <schwab@linux-m68k.org> | 705 | 2012-04-09 Andreas Schwab <schwab@linux-m68k.org> |
| 2 | 706 | ||
| 3 | * international/characters.el: Recover lost case pairs. | 707 | * international/characters.el: Recover lost case pairs. (Bug#11209) |
| 4 | (Bug#11209) | ||
| 5 | 708 | ||
| 6 | 2012-04-09 Chong Yidong <cyd@gnu.org> | 709 | 2012-04-09 Chong Yidong <cyd@gnu.org> |
| 7 | 710 | ||
| @@ -156,8 +859,8 @@ | |||
| 156 | 2012-03-30 Agustín Martín Domingo <agustin.martin@hispalinux.es> | 859 | 2012-03-30 Agustín Martín Domingo <agustin.martin@hispalinux.es> |
| 157 | 860 | ||
| 158 | * ispell.el (ispell-get-extended-character-mode): Disable | 861 | * ispell.el (ispell-get-extended-character-mode): Disable |
| 159 | extended-char-mode for hunspell. hunspell does not support it and | 862 | extended-char-mode for hunspell. hunspell does not support it |
| 160 | treats ~word as ordinary words in pipe mode. | 863 | and treats ~word as ordinary words in pipe mode. |
| 161 | 864 | ||
| 162 | 2012-03-30 Glenn Morris <rgm@gnu.org> | 865 | 2012-03-30 Glenn Morris <rgm@gnu.org> |
| 163 | 866 | ||
| @@ -387,7 +1090,7 @@ | |||
| 387 | (hfy-face-to-css-default): Same as the earlier `hfy-face-to-css'. | 1090 | (hfy-face-to-css-default): Same as the earlier `hfy-face-to-css'. |
| 388 | (hfy-face-to-css): Re-defined to be a variable. | 1091 | (hfy-face-to-css): Re-defined to be a variable. |
| 389 | (hfy-compile-stylesheet): Modify. Allow stylesheet to be built | 1092 | (hfy-compile-stylesheet): Modify. Allow stylesheet to be built |
| 390 | over multiple runs. This is made possible by having the caller let | 1093 | over multiple runs. This is made possible by having the caller let |
| 391 | bind a special variable `hfy-user-sheet-assoc'. | 1094 | bind a special variable `hfy-user-sheet-assoc'. |
| 392 | (htmlfontify-string): New defun. | 1095 | (htmlfontify-string): New defun. |
| 393 | (hfy-compile-face-map): Make sure that the last char in the | 1096 | (hfy-compile-face-map): Make sure that the last char in the |
| @@ -620,7 +1323,7 @@ | |||
| 620 | 1323 | ||
| 621 | 2012-03-09 Michael Albinus <michael.albinus@gmx.de> | 1324 | 2012-03-09 Michael Albinus <michael.albinus@gmx.de> |
| 622 | 1325 | ||
| 623 | * net/dbus.el: (dbus-property-handler): Return empty array if | 1326 | * net/dbus.el (dbus-property-handler): Return empty array if |
| 624 | there are no properties. | 1327 | there are no properties. |
| 625 | 1328 | ||
| 626 | 2012-03-09 Leo Liu <sdl.web@gmail.com> | 1329 | 2012-03-09 Leo Liu <sdl.web@gmail.com> |
| @@ -957,10 +1660,6 @@ | |||
| 957 | 1660 | ||
| 958 | 2012-02-24 Thierry Volpiatto <thierry.volpiatto@gmail.com> | 1661 | 2012-02-24 Thierry Volpiatto <thierry.volpiatto@gmail.com> |
| 959 | 1662 | ||
| 960 | * files.el (file-subdir-of-p): Fix typo. | ||
| 961 | |||
| 962 | 2012-02-24 Thierry Volpiatto <thierry.volpiatto@gmail.com> | ||
| 963 | |||
| 964 | * files.el (files-equal-p, file-subdir-of-p): New functions. | 1663 | * files.el (files-equal-p, file-subdir-of-p): New functions. |
| 965 | (copy-directory): Error when trying to copy a directory on itself. | 1664 | (copy-directory): Error when trying to copy a directory on itself. |
| 966 | Add missing copy-contents arg to tramp handler. | 1665 | Add missing copy-contents arg to tramp handler. |
| @@ -1224,7 +1923,7 @@ | |||
| 1224 | 2012-02-12 Alan Mackenzie <acm@muc.de> | 1923 | 2012-02-12 Alan Mackenzie <acm@muc.de> |
| 1225 | 1924 | ||
| 1226 | Fix infinite loop with long macros. | 1925 | Fix infinite loop with long macros. |
| 1227 | * cc-engine.el (c-state-safe-place): Handle macros properly. | 1926 | * progmodes/cc-engine.el (c-state-safe-place): Handle macros properly. |
| 1228 | 1927 | ||
| 1229 | 2012-02-12 Chong Yidong <cyd@gnu.org> | 1928 | 2012-02-12 Chong Yidong <cyd@gnu.org> |
| 1230 | 1929 | ||
| @@ -1487,11 +2186,10 @@ | |||
| 1487 | 2186 | ||
| 1488 | 2012-02-06 Lars Ingebrigtsen <larsi@gnus.org> | 2187 | 2012-02-06 Lars Ingebrigtsen <larsi@gnus.org> |
| 1489 | 2188 | ||
| 1490 | * progmodes/cc-mode.el | 2189 | * progmodes/cc-mode.el (c-standard-font-lock-fontify-region-function): |
| 1491 | (c-standard-font-lock-fontify-region-function): Set the default at | 2190 | Set the default at load time, too, so that `font-lock-fontify-buffer' |
| 1492 | load time, too, so that `font-lock-fontify-buffer' can be called | 2191 | can be called without setting up the entire mode first. This fixes |
| 1493 | without setting up the entire mode first. This fixes a bug in | 2192 | a bug in `mm-inline-text' with C MIME parts. |
| 1494 | `mm-inline-text' with C MIME parts. | ||
| 1495 | 2193 | ||
| 1496 | 2012-02-06 Chong Yidong <cyd@gnu.org> | 2194 | 2012-02-06 Chong Yidong <cyd@gnu.org> |
| 1497 | 2195 | ||
diff --git a/lisp/ChangeLog.11 b/lisp/ChangeLog.11 index 0b4e62f9e91..8ea7d40c004 100644 --- a/lisp/ChangeLog.11 +++ b/lisp/ChangeLog.11 | |||
| @@ -10889,7 +10889,7 @@ | |||
| 10889 | 2004-01-29 Jari Aalto <jari.aalto@poboxes.com> | 10889 | 2004-01-29 Jari Aalto <jari.aalto@poboxes.com> |
| 10890 | 10890 | ||
| 10891 | * progmodes/executable.el (executable-command-find-posix-p): | 10891 | * progmodes/executable.el (executable-command-find-posix-p): |
| 10892 | New. Check if find handles arguments Posix-style. | 10892 | New. Check if find handles arguments POSIX-style. |
| 10893 | 10893 | ||
| 10894 | * progmodes/grep.el (grep-compute-defaults): | 10894 | * progmodes/grep.el (grep-compute-defaults): |
| 10895 | Use executable-command-find-posix-p. | 10895 | Use executable-command-find-posix-p. |
diff --git a/lisp/ChangeLog.12 b/lisp/ChangeLog.12 index 9611eaa21b4..2361528abb3 100644 --- a/lisp/ChangeLog.12 +++ b/lisp/ChangeLog.12 | |||
| @@ -12449,7 +12449,7 @@ | |||
| 12449 | 12449 | ||
| 12450 | * calendar/appt.el (diary-selective-display): Add defvar. | 12450 | * calendar/appt.el (diary-selective-display): Add defvar. |
| 12451 | 12451 | ||
| 12452 | * sort.el (sort-columns): Use Posix arg syntax for `sort'. | 12452 | * sort.el (sort-columns): Use POSIX arg syntax for `sort'. |
| 12453 | 12453 | ||
| 12454 | * isearch.el (search-whitespace-regexp): Fix custom type. | 12454 | * isearch.el (search-whitespace-regexp): Fix custom type. |
| 12455 | 12455 | ||
diff --git a/lisp/ChangeLog.6 b/lisp/ChangeLog.6 index 85301ef78e1..5d79470bd2a 100644 --- a/lisp/ChangeLog.6 +++ b/lisp/ChangeLog.6 | |||
| @@ -715,7 +715,7 @@ | |||
| 715 | 715 | ||
| 716 | * ediff-diff.el (ediff-setup-fine-diff-regions): | 716 | * ediff-diff.el (ediff-setup-fine-diff-regions): |
| 717 | Allow diff options to be passed to the diff program. | 717 | Allow diff options to be passed to the diff program. |
| 718 | (ediff-make-diff2-buffer): Don't run Posix diff on remote files. | 718 | (ediff-make-diff2-buffer): Don't run POSIX diff on remote files. |
| 719 | (ediff-make-diff2-buffer): Refuses to diff remote files. | 719 | (ediff-make-diff2-buffer): Refuses to diff remote files. |
| 720 | (ediff-make-diff2-buffer, ediff-setup-diff-regions): Changed functions. | 720 | (ediff-make-diff2-buffer, ediff-setup-diff-regions): Changed functions. |
| 721 | (ediff-make-diff2-buffer): New function. | 721 | (ediff-make-diff2-buffer): New function. |
diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 3845c4ce4e6..7f54d3dc253 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el | |||
| @@ -134,10 +134,13 @@ Otherwise display all abbrevs." | |||
| 134 | (push table empty-tables) | 134 | (push table empty-tables) |
| 135 | (insert-abbrev-table-description table t))) | 135 | (insert-abbrev-table-description table t))) |
| 136 | (dolist (table (nreverse empty-tables)) | 136 | (dolist (table (nreverse empty-tables)) |
| 137 | (insert-abbrev-table-description table t)))) | 137 | (insert-abbrev-table-description table t))) |
| 138 | ;; Note: `list-abbrevs' can dispaly only local abbrevs, in | ||
| 139 | ;; which case editing could lose abbrevs of other tables. Thus | ||
| 140 | ;; enter `edit-abbrevs-mode' only if LOCAL is nil. | ||
| 141 | (edit-abbrevs-mode)) | ||
| 138 | (goto-char (point-min)) | 142 | (goto-char (point-min)) |
| 139 | (set-buffer-modified-p nil) | 143 | (set-buffer-modified-p nil) |
| 140 | (edit-abbrevs-mode) | ||
| 141 | (current-buffer)))) | 144 | (current-buffer)))) |
| 142 | 145 | ||
| 143 | (defun edit-abbrevs-mode () | 146 | (defun edit-abbrevs-mode () |
| @@ -152,7 +155,8 @@ Otherwise display all abbrevs." | |||
| 152 | 155 | ||
| 153 | (defun edit-abbrevs () | 156 | (defun edit-abbrevs () |
| 154 | "Alter abbrev definitions by editing a list of them. | 157 | "Alter abbrev definitions by editing a list of them. |
| 155 | Selects a buffer containing a list of abbrev definitions. | 158 | Selects a buffer containing a list of abbrev definitions with |
| 159 | point located in the abbrev table of current buffer. | ||
| 156 | You can edit them and type \\<edit-abbrevs-map>\\[edit-abbrevs-redefine] to redefine abbrevs | 160 | You can edit them and type \\<edit-abbrevs-map>\\[edit-abbrevs-redefine] to redefine abbrevs |
| 157 | according to your editing. | 161 | according to your editing. |
| 158 | Buffer contains a header line for each abbrev table, | 162 | Buffer contains a header line for each abbrev table, |
| @@ -163,7 +167,12 @@ where NAME and EXPANSION are strings with quotes, | |||
| 163 | USECOUNT is an integer, and HOOK is any valid function | 167 | USECOUNT is an integer, and HOOK is any valid function |
| 164 | or may be omitted (it is usually omitted)." | 168 | or may be omitted (it is usually omitted)." |
| 165 | (interactive) | 169 | (interactive) |
| 166 | (switch-to-buffer (prepare-abbrev-list-buffer))) | 170 | (let ((table-name (abbrev-table-name local-abbrev-table))) |
| 171 | (switch-to-buffer (prepare-abbrev-list-buffer)) | ||
| 172 | (when (and table-name | ||
| 173 | (search-forward | ||
| 174 | (concat "(" (symbol-name table-name) ")\n\n") nil t)) | ||
| 175 | (goto-char (match-end 0))))) | ||
| 167 | 176 | ||
| 168 | (defun edit-abbrevs-redefine () | 177 | (defun edit-abbrevs-redefine () |
| 169 | "Redefine abbrevs according to current buffer contents." | 178 | "Redefine abbrevs according to current buffer contents." |
diff --git a/lisp/avoid.el b/lisp/avoid.el index 17d99fd6517..bfe15de0ca2 100644 --- a/lisp/avoid.el +++ b/lisp/avoid.el | |||
| @@ -67,7 +67,7 @@ | |||
| 67 | 67 | ||
| 68 | ;;; Code: | 68 | ;;; Code: |
| 69 | 69 | ||
| 70 | (provide 'avoid) | 70 | (eval-when-compile (require 'cl)) |
| 71 | 71 | ||
| 72 | (defgroup avoid nil | 72 | (defgroup avoid nil |
| 73 | "Make mouse pointer stay out of the way of editing." | 73 | "Make mouse pointer stay out of the way of editing." |
| @@ -80,7 +80,7 @@ | |||
| 80 | See function `mouse-avoidance-mode' for possible values. | 80 | See function `mouse-avoidance-mode' for possible values. |
| 81 | Setting this variable directly does not take effect; | 81 | Setting this variable directly does not take effect; |
| 82 | use either \\[customize] or the function `mouse-avoidance-mode'." | 82 | use either \\[customize] or the function `mouse-avoidance-mode'." |
| 83 | :set (lambda (symbol value) | 83 | :set (lambda (_symbol value) |
| 84 | ;; 'none below prevents toggling when value is nil. | 84 | ;; 'none below prevents toggling when value is nil. |
| 85 | (mouse-avoidance-mode (or value 'none))) | 85 | (mouse-avoidance-mode (or value 'none))) |
| 86 | :initialize 'custom-initialize-default | 86 | :initialize 'custom-initialize-default |
| @@ -115,6 +115,23 @@ Only applies in Mouse Avoidance modes `animate' and `jump'." | |||
| 115 | :type 'integer | 115 | :type 'integer |
| 116 | :group 'avoid) | 116 | :group 'avoid) |
| 117 | 117 | ||
| 118 | (defcustom mouse-avoidance-banish-position '((frame-or-window . frame) | ||
| 119 | (side . right) | ||
| 120 | (side-pos . 3) | ||
| 121 | (top-or-bottom . top) | ||
| 122 | (top-or-bottom-pos . 0)) | ||
| 123 | "Position to which Mouse Avoidance mode `banish' moves the mouse. | ||
| 124 | An alist where keywords mean: | ||
| 125 | FRAME-OR-WINDOW: banish the mouse to corner of frame or window. | ||
| 126 | SIDE: banish the mouse on right or left corner of frame or window. | ||
| 127 | SIDE-POS: Distance from right or left edge of frame or window. | ||
| 128 | TOP-OR-BOTTOM: banish the mouse to top or bottom of frame or window. | ||
| 129 | TOP-OR-BOTTOM-POS: Distance from top or bottom edge of frame or window." | ||
| 130 | :group 'avoid | ||
| 131 | :type '(alist :key-type symbol :value-type symbol) | ||
| 132 | :options '(frame-or-window side (side-pos integer) | ||
| 133 | top-or-bottom (top-or-bottom-pos integer))) | ||
| 134 | |||
| 118 | ;; Internal variables | 135 | ;; Internal variables |
| 119 | (defvar mouse-avoidance-state nil) | 136 | (defvar mouse-avoidance-state nil) |
| 120 | (defvar mouse-avoidance-pointer-shapes nil) | 137 | (defvar mouse-avoidance-pointer-shapes nil) |
| @@ -183,13 +200,45 @@ Acceptable distance is defined by `mouse-avoidance-threshold'." | |||
| 183 | 200 | ||
| 184 | (defun mouse-avoidance-banish-destination () | 201 | (defun mouse-avoidance-banish-destination () |
| 185 | "The position to which Mouse Avoidance mode `banish' moves the mouse. | 202 | "The position to which Mouse Avoidance mode `banish' moves the mouse. |
| 186 | You can redefine this if you want the mouse banished to a different corner." | 203 | |
| 187 | (let* ((pos (window-edges))) | 204 | If you want the mouse banished to a different corner set |
| 188 | (cons (- (nth 2 pos) 2) | 205 | `mouse-avoidance-banish-position' as you need." |
| 189 | (nth 1 pos)))) | 206 | (let* ((fra-or-win (assoc-default |
| 207 | 'frame-or-window | ||
| 208 | mouse-avoidance-banish-position 'eq)) | ||
| 209 | (list-values (case fra-or-win | ||
| 210 | (frame (list 0 0 (frame-width) (frame-height))) | ||
| 211 | (window (window-edges)))) | ||
| 212 | (alist (loop for v in list-values | ||
| 213 | for k in '(left top right bottom) | ||
| 214 | collect (cons k v))) | ||
| 215 | (side (assoc-default | ||
| 216 | 'side | ||
| 217 | mouse-avoidance-banish-position 'eq)) | ||
| 218 | (side-dist (assoc-default | ||
| 219 | 'side-pos | ||
| 220 | mouse-avoidance-banish-position 'eq)) | ||
| 221 | (top-or-bottom (assoc-default | ||
| 222 | 'top-or-bottom | ||
| 223 | mouse-avoidance-banish-position 'eq)) | ||
| 224 | (top-or-bottom-dist (assoc-default | ||
| 225 | 'top-or-bottom-pos | ||
| 226 | mouse-avoidance-banish-position 'eq)) | ||
| 227 | (side-fn (case side | ||
| 228 | (left '+) | ||
| 229 | (right '-))) | ||
| 230 | (top-or-bottom-fn (case top-or-bottom | ||
| 231 | (top '+) | ||
| 232 | (bottom '-)))) | ||
| 233 | (cons (funcall side-fn ; -/+ | ||
| 234 | (assoc-default side alist 'eq) ; right or left | ||
| 235 | side-dist) ; distance from side | ||
| 236 | (funcall top-or-bottom-fn ; -/+ | ||
| 237 | (assoc-default top-or-bottom alist 'eq) ; top/bottom | ||
| 238 | top-or-bottom-dist)))) ; distance from top/bottom | ||
| 190 | 239 | ||
| 191 | (defun mouse-avoidance-banish-mouse () | 240 | (defun mouse-avoidance-banish-mouse () |
| 192 | ;; Put the mouse pointer in the upper-right corner of the current frame. | 241 | "Put the mouse pointer to `mouse-avoidance-banish-position'." |
| 193 | (mouse-avoidance-set-mouse-position (mouse-avoidance-banish-destination))) | 242 | (mouse-avoidance-set-mouse-position (mouse-avoidance-banish-destination))) |
| 194 | 243 | ||
| 195 | (defsubst mouse-avoidance-delta (cur delta dist var min max) | 244 | (defsubst mouse-avoidance-delta (cur delta dist var min max) |
| @@ -218,7 +267,6 @@ You can redefine this if you want the mouse banished to a different corner." | |||
| 218 | ;; For these modes, state keeps track of the total offset that we've | 267 | ;; For these modes, state keeps track of the total offset that we've |
| 219 | ;; accumulated, and tries to keep it close to zero. | 268 | ;; accumulated, and tries to keep it close to zero. |
| 220 | (let* ((cur (mouse-position)) | 269 | (let* ((cur (mouse-position)) |
| 221 | (cur-frame (car cur)) | ||
| 222 | (cur-pos (cdr cur)) | 270 | (cur-pos (cdr cur)) |
| 223 | (pos (window-edges)) | 271 | (pos (window-edges)) |
| 224 | (wleft (pop pos)) | 272 | (wleft (pop pos)) |
| @@ -408,4 +456,6 @@ definition of \"random distance\".)" | |||
| 408 | (if mouse-avoidance-mode | 456 | (if mouse-avoidance-mode |
| 409 | (mouse-avoidance-mode mouse-avoidance-mode)) | 457 | (mouse-avoidance-mode mouse-avoidance-mode)) |
| 410 | 458 | ||
| 459 | (provide 'avoid) | ||
| 460 | |||
| 411 | ;;; avoid.el ends here | 461 | ;;; avoid.el ends here |
diff --git a/lisp/battery.el b/lisp/battery.el index 586be9e8938..dcfe07121b3 100644 --- a/lisp/battery.el +++ b/lisp/battery.el | |||
| @@ -39,6 +39,9 @@ | |||
| 39 | :prefix "battery-" | 39 | :prefix "battery-" |
| 40 | :group 'hardware) | 40 | :group 'hardware) |
| 41 | 41 | ||
| 42 | ;; Either BATn or yeeloong-bat, basically. | ||
| 43 | (defconst battery--linux-sysfs-regexp "[bB][aA][tT][0-9]?$") | ||
| 44 | |||
| 42 | (defcustom battery-status-function | 45 | (defcustom battery-status-function |
| 43 | (cond ((and (eq system-type 'gnu/linux) | 46 | (cond ((and (eq system-type 'gnu/linux) |
| 44 | (file-readable-p "/proc/apm")) | 47 | (file-readable-p "/proc/apm")) |
| @@ -48,12 +51,9 @@ | |||
| 48 | 'battery-linux-proc-acpi) | 51 | 'battery-linux-proc-acpi) |
| 49 | ((and (eq system-type 'gnu/linux) | 52 | ((and (eq system-type 'gnu/linux) |
| 50 | (file-directory-p "/sys/class/power_supply/") | 53 | (file-directory-p "/sys/class/power_supply/") |
| 51 | (directory-files "/sys/class/power_supply/" nil "BAT[0-9]$")) | 54 | (directory-files "/sys/class/power_supply/" nil |
| 55 | battery--linux-sysfs-regexp)) | ||
| 52 | 'battery-linux-sysfs) | 56 | 'battery-linux-sysfs) |
| 53 | ((and (eq system-type 'gnu/linux) | ||
| 54 | (file-directory-p "/sys/class/power_supply/yeeloong-bat/") | ||
| 55 | (directory-files "/sys/class/power_supply/yeeloong-bat/" nil "charge_")) | ||
| 56 | 'battery-yeeloong-sysfs) | ||
| 57 | ((and (eq system-type 'darwin) | 57 | ((and (eq system-type 'darwin) |
| 58 | (condition-case nil | 58 | (condition-case nil |
| 59 | (with-temp-buffer | 59 | (with-temp-buffer |
| @@ -78,11 +78,9 @@ introduced by a `%' character in a control string." | |||
| 78 | (cond ((eq battery-status-function 'battery-linux-proc-acpi) | 78 | (cond ((eq battery-status-function 'battery-linux-proc-acpi) |
| 79 | "Power %L, battery %B at %r (%p%% load, remaining time %t)") | 79 | "Power %L, battery %B at %r (%p%% load, remaining time %t)") |
| 80 | ((eq battery-status-function 'battery-linux-sysfs) | 80 | ((eq battery-status-function 'battery-linux-sysfs) |
| 81 | "Power %L, battery %B (%p%% load)") | 81 | "Power %L, battery %B (%p%% load, remaining time %t)") |
| 82 | ((eq battery-status-function 'battery-pmset) | 82 | ((eq battery-status-function 'battery-pmset) |
| 83 | "%L power, battery %B (%p%% load, remaining time %t)") | 83 | "%L power, battery %B (%p%% load, remaining time %t)") |
| 84 | ((eq battery-status-function 'battery-yeeloong-sysfs) | ||
| 85 | "%L power, battery %B (%p%% load, remaining time %t)") | ||
| 86 | (battery-status-function | 84 | (battery-status-function |
| 87 | "Power %L, battery %B (%p%% load, remaining time %t)")) | 85 | "Power %L, battery %B (%p%% load, remaining time %t)")) |
| 88 | "Control string formatting the string to display in the echo area. | 86 | "Control string formatting the string to display in the echo area. |
| @@ -344,14 +342,15 @@ The following %-sequences are provided: | |||
| 344 | (setq charging-state (match-string 1))) | 342 | (setq charging-state (match-string 1))) |
| 345 | (when (re-search-forward "present rate: +\\([0-9]+\\) \\(m[AW]\\)$" | 343 | (when (re-search-forward "present rate: +\\([0-9]+\\) \\(m[AW]\\)$" |
| 346 | nil t) | 344 | nil t) |
| 347 | (setq rate (+ (or rate 0) (string-to-number (match-string 1))) | 345 | (setq rate (+ (or rate 0) (string-to-number (match-string 1)))) |
| 348 | rate-type (or (and rate-type | 346 | (when (> rate 0) |
| 347 | (setq rate-type (or (and rate-type | ||
| 349 | (if (string= rate-type (match-string 2)) | 348 | (if (string= rate-type (match-string 2)) |
| 350 | rate-type | 349 | rate-type |
| 351 | (error | 350 | (error |
| 352 | "Inconsistent rate types (%s vs. %s)" | 351 | "Inconsistent rate types (%s vs. %s)" |
| 353 | rate-type (match-string 2)))) | 352 | rate-type (match-string 2)))) |
| 354 | (match-string 2)))) | 353 | (match-string 2))))) |
| 355 | (when (re-search-forward "remaining capacity: +\\([0-9]+\\) m[AW]h$" | 354 | (when (re-search-forward "remaining capacity: +\\([0-9]+\\) m[AW]h$" |
| 356 | nil t) | 355 | nil t) |
| 357 | (setq capacity | 356 | (setq capacity |
| @@ -447,7 +446,8 @@ The following %-sequences are provided: | |||
| 447 | (with-temp-buffer | 446 | (with-temp-buffer |
| 448 | (dolist (dir (ignore-errors | 447 | (dolist (dir (ignore-errors |
| 449 | (directory-files | 448 | (directory-files |
| 450 | "/sys/class/power_supply/" t "BAT[0-9]$"))) | 449 | "/sys/class/power_supply/" t |
| 450 | battery--linux-sysfs-regexp))) | ||
| 451 | (erase-buffer) | 451 | (erase-buffer) |
| 452 | (ignore-errors (insert-file-contents | 452 | (ignore-errors (insert-file-contents |
| 453 | (expand-file-name "uevent" dir))) | 453 | (expand-file-name "uevent" dir))) |
| @@ -509,7 +509,7 @@ The following %-sequences are provided: | |||
| 509 | "N/A")) | 509 | "N/A")) |
| 510 | (cons ?d (or temperature "N/A")) | 510 | (cons ?d (or temperature "N/A")) |
| 511 | (cons ?B (or charging-state "N/A")) | 511 | (cons ?B (or charging-state "N/A")) |
| 512 | (cons ?p (cond ((> charge-full 0) | 512 | (cons ?p (cond ((and (> charge-full 0) (> charge-now 0)) |
| 513 | (format "%.1f" | 513 | (format "%.1f" |
| 514 | (/ (* 100 charge-now) charge-full))) | 514 | (/ (* 100 charge-now) charge-full))) |
| 515 | ((> energy-full 0) | 515 | ((> energy-full 0) |
| @@ -524,91 +524,6 @@ The following %-sequences are provided: | |||
| 524 | "AC" | 524 | "AC" |
| 525 | "BAT") | 525 | "BAT") |
| 526 | "N/A"))))) | 526 | "N/A"))))) |
| 527 | |||
| 528 | (defun battery-yeeloong-sysfs () | ||
| 529 | "Get ACPI status information from Linux (the kernel). | ||
| 530 | This function works only on the Lemote Yeeloong. | ||
| 531 | |||
| 532 | The following %-sequences are provided: | ||
| 533 | %c Current capacity (mAh) | ||
| 534 | %r Current rate | ||
| 535 | %B Battery status (verbose) | ||
| 536 | %b Battery status, empty means high, `-' means low, | ||
| 537 | `!' means critical, and `+' means charging | ||
| 538 | %L AC line status (verbose) | ||
| 539 | %p Battery load percentage | ||
| 540 | %m Remaining time (to charge or discharge) in minutes | ||
| 541 | %h Remaining time (to charge or discharge) in hours | ||
| 542 | %t Remaining time (to charge or discharge) in the form `h:min'" | ||
| 543 | |||
| 544 | (let (capacity | ||
| 545 | capacity-level | ||
| 546 | status | ||
| 547 | ac-online | ||
| 548 | hours | ||
| 549 | current-now | ||
| 550 | charge-full | ||
| 551 | charge-now) | ||
| 552 | |||
| 553 | (with-temp-buffer | ||
| 554 | (ignore-errors | ||
| 555 | (insert-file-contents "/sys/class/power_supply/yeeloong-bat/uevent") | ||
| 556 | (goto-char 1) | ||
| 557 | (search-forward "POWER_SUPPLY_CHARGE_NOW=") | ||
| 558 | (setq charge-now (read (current-buffer))) | ||
| 559 | (goto-char 1) | ||
| 560 | (search-forward "POWER_SUPPLY_CHARGE_FULL=") | ||
| 561 | (setq charge-full (read (current-buffer))) | ||
| 562 | (goto-char 1) | ||
| 563 | (search-forward "POWER_SUPPLY_CURRENT_NOW=") | ||
| 564 | (setq current-now (read (current-buffer))) | ||
| 565 | (goto-char 1) | ||
| 566 | (search-forward "POWER_SUPPLY_CAPACITY_LEVEL=") | ||
| 567 | (setq capacity-level (buffer-substring (point) (line-end-position))) | ||
| 568 | (goto-char 1) | ||
| 569 | (search-forward "POWER_SUPPLY_STATUS=") | ||
| 570 | (setq status (buffer-substring (point) (line-end-position)))) | ||
| 571 | |||
| 572 | (erase-buffer) | ||
| 573 | (ignore-errors | ||
| 574 | (insert-file-contents | ||
| 575 | "/sys/class/power_supply/yeeloong-ac/online") | ||
| 576 | (goto-char 1) | ||
| 577 | (setq ac-online (read (current-buffer))) | ||
| 578 | (erase-buffer))) | ||
| 579 | |||
| 580 | |||
| 581 | (setq capacity (round (/ (* charge-now 100.0) charge-full))) | ||
| 582 | (when (and current-now (not (= current-now 0))) | ||
| 583 | (if (< current-now 0) | ||
| 584 | ;; Charging | ||
| 585 | (setq hours (/ (- charge-now charge-full) (+ 0.0 current-now))) | ||
| 586 | ;; Discharging | ||
| 587 | (setq hours (/ charge-now (+ 0.0 current-now))))) | ||
| 588 | |||
| 589 | (list (cons ?c (if charge-now | ||
| 590 | (number-to-string charge-now) | ||
| 591 | "N/A")) | ||
| 592 | (cons ?r current-now) | ||
| 593 | (cons ?B (cond ((equal capacity-level "Full") "full") | ||
| 594 | ((equal status "Charging") "charging") | ||
| 595 | ((equal capacity-level "Low") "low") | ||
| 596 | ((equal capacity-level "Critical") "critical") | ||
| 597 | (t "high"))) | ||
| 598 | (cons ?b (cond ((equal capacity-level "Full") " ") | ||
| 599 | ((equal status "Charging") "+") | ||
| 600 | ((equal capacity-level "Low") "-") | ||
| 601 | ((equal capacity-level "Critical") "!") | ||
| 602 | (t " "))) | ||
| 603 | (cons ?h (if hours (number-to-string hours) "N/A")) | ||
| 604 | (cons ?m (if hours (number-to-string (* 60 hours)) "N/A")) | ||
| 605 | (cons ?t (if hours | ||
| 606 | (format "%d:%d" | ||
| 607 | (/ (round (* 60 hours)) 60) | ||
| 608 | (% (round (* 60 hours)) 60)) | ||
| 609 | "N/A")) | ||
| 610 | (cons ?p (if capacity (number-to-string capacity) "N/A")) | ||
| 611 | (cons ?L (if (eq ac-online 1) "AC" "BAT"))))) | ||
| 612 | 527 | ||
| 613 | ;;; `pmset' interface for Darwin (OS X). | 528 | ;;; `pmset' interface for Darwin (OS X). |
| 614 | 529 | ||
diff --git a/lisp/bindings.el b/lisp/bindings.el index a87f321c936..8cfeecf5b40 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el | |||
| @@ -868,6 +868,7 @@ if `inhibit-field-text-motion' is non-nil." | |||
| 868 | "Keymap for navigation commands.") | 868 | "Keymap for navigation commands.") |
| 869 | (define-key esc-map "g" goto-map) | 869 | (define-key esc-map "g" goto-map) |
| 870 | 870 | ||
| 871 | (define-key goto-map "c" 'goto-char) | ||
| 871 | (define-key goto-map "g" 'goto-line) | 872 | (define-key goto-map "g" 'goto-line) |
| 872 | (define-key goto-map "\M-g" 'goto-line) | 873 | (define-key goto-map "\M-g" 'goto-line) |
| 873 | (define-key goto-map "n" 'next-error) | 874 | (define-key goto-map "n" 'next-error) |
diff --git a/lisp/bs.el b/lisp/bs.el index 64c1183b64d..08d05a946e3 100644 --- a/lisp/bs.el +++ b/lisp/bs.el | |||
| @@ -964,7 +964,7 @@ Default is `bs--current-sort-function'." | |||
| 964 | Uses function `toggle-read-only'." | 964 | Uses function `toggle-read-only'." |
| 965 | (interactive) | 965 | (interactive) |
| 966 | (with-current-buffer (bs--current-buffer) | 966 | (with-current-buffer (bs--current-buffer) |
| 967 | (toggle-read-only)) | 967 | (call-interactively 'toggle-read-only)) |
| 968 | (bs--update-current-line)) | 968 | (bs--update-current-line)) |
| 969 | 969 | ||
| 970 | (defun bs-clear-modified () | 970 | (defun bs-clear-modified () |
diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el index 14899431e2a..0ae2b38eaf6 100644 --- a/lisp/calendar/cal-tex.el +++ b/lisp/calendar/cal-tex.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; cal-tex.el --- calendar functions for printing calendars with LaTeX | 1 | ;;; cal-tex.el --- calendar functions for printing calendars with LaTeX |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1995, 2001-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1995, 2001-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Steve Fisk <fisk@bowdoin.edu> | 5 | ;; Author: Steve Fisk <fisk@bowdoin.edu> |
| 6 | ;; Edward M. Reingold <reingold@cs.uiuc.edu> | 6 | ;; Edward M. Reingold <reingold@cs.uiuc.edu> |
| @@ -1588,8 +1588,7 @@ informative header, and run HOOK." | |||
| 1588 | (cal-tex-e-document) | 1588 | (cal-tex-e-document) |
| 1589 | (or (and cal-tex-preamble-extra | 1589 | (or (and cal-tex-preamble-extra |
| 1590 | (string-match "inputenc" cal-tex-preamble-extra)) | 1590 | (string-match "inputenc" cal-tex-preamble-extra)) |
| 1591 | (not (re-search-backward "[^[:ascii:]]" nil 'move)) | 1591 | (when (re-search-backward "[^[:ascii:]]" nil 'move) |
| 1592 | (progn | ||
| 1593 | (goto-char (point-min)) | 1592 | (goto-char (point-min)) |
| 1594 | (when (search-forward "documentclass" nil t) | 1593 | (when (search-forward "documentclass" nil t) |
| 1595 | (forward-line 1) | 1594 | (forward-line 1) |
diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el index 37f511f7990..9edd353b889 100644 --- a/lisp/calendar/holidays.el +++ b/lisp/calendar/holidays.el | |||
| @@ -634,7 +634,7 @@ The optional LABEL is used to label the buffer created." | |||
| 634 | "Check the list of holidays for any that occur on DATE. | 634 | "Check the list of holidays for any that occur on DATE. |
| 635 | DATE is a list (month day year). This function considers the | 635 | DATE is a list (month day year). This function considers the |
| 636 | holidays from the list `calendar-holidays', and returns a list of | 636 | holidays from the list `calendar-holidays', and returns a list of |
| 637 | strings describing those holidays that apply on DATE." | 637 | strings describing those holidays that apply on DATE, or nil if none do." |
| 638 | (let ((displayed-month (calendar-extract-month date)) | 638 | (let ((displayed-month (calendar-extract-month date)) |
| 639 | (displayed-year (calendar-extract-year date)) | 639 | (displayed-year (calendar-extract-year date)) |
| 640 | holiday-list) | 640 | holiday-list) |
diff --git a/lisp/comint.el b/lisp/comint.el index 68fedeb88a9..10981675971 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -699,16 +699,21 @@ BUFFER can be either a buffer or the name of one." | |||
| 699 | (defun make-comint-in-buffer (name buffer program &optional startfile &rest switches) | 699 | (defun make-comint-in-buffer (name buffer program &optional startfile &rest switches) |
| 700 | "Make a Comint process NAME in BUFFER, running PROGRAM. | 700 | "Make a Comint process NAME in BUFFER, running PROGRAM. |
| 701 | If BUFFER is nil, it defaults to NAME surrounded by `*'s. | 701 | If BUFFER is nil, it defaults to NAME surrounded by `*'s. |
| 702 | PROGRAM should be either a string denoting an executable program to create | 702 | If there is a running process in BUFFER, it is not restarted. |
| 703 | via `start-file-process', or a cons pair of the form (HOST . SERVICE) denoting | 703 | |
| 704 | a TCP connection to be opened via `open-network-stream'. If there is already | 704 | PROGRAM should be one of the following: |
| 705 | a running process in that buffer, it is not restarted. Optional fourth arg | 705 | - a string, denoting an executable program to create via |
| 706 | STARTFILE is the name of a file, whose contents are sent to the | 706 | `start-file-process' |
| 707 | process as its initial input. | 707 | - a cons pair of the form (HOST . SERVICE), denoting a TCP |
| 708 | connection to be opened via `open-network-stream' | ||
| 709 | - nil, denoting a newly-allocated pty. | ||
| 710 | |||
| 711 | Optional fourth arg STARTFILE is the name of a file, whose | ||
| 712 | contents are sent to the process as its initial input. | ||
| 708 | 713 | ||
| 709 | If PROGRAM is a string, any more args are arguments to PROGRAM. | 714 | If PROGRAM is a string, any more args are arguments to PROGRAM. |
| 710 | 715 | ||
| 711 | Returns the (possibly newly created) process buffer." | 716 | Return the (possibly newly created) process buffer." |
| 712 | (or (fboundp 'start-file-process) | 717 | (or (fboundp 'start-file-process) |
| 713 | (error "Multi-processing is not supported for this system")) | 718 | (error "Multi-processing is not supported for this system")) |
| 714 | (setq buffer (get-buffer-create (or buffer (concat "*" name "*")))) | 719 | (setq buffer (get-buffer-create (or buffer (concat "*" name "*")))) |
| @@ -752,9 +757,18 @@ See `make-comint' and `comint-exec'." | |||
| 752 | (defun comint-exec (buffer name command startfile switches) | 757 | (defun comint-exec (buffer name command startfile switches) |
| 753 | "Start up a process named NAME in buffer BUFFER for Comint modes. | 758 | "Start up a process named NAME in buffer BUFFER for Comint modes. |
| 754 | Runs the given COMMAND with SWITCHES, and initial input from STARTFILE. | 759 | Runs the given COMMAND with SWITCHES, and initial input from STARTFILE. |
| 755 | Blasts any old process running in the buffer. Doesn't set the buffer mode. | 760 | |
| 756 | You can use this to cheaply run a series of processes in the same Comint | 761 | COMMAND should be one of the following: |
| 757 | buffer. The hook `comint-exec-hook' is run after each exec." | 762 | - a string, denoting an executable program to create via |
| 763 | `start-file-process' | ||
| 764 | - a cons pair of the form (HOST . SERVICE), denoting a TCP | ||
| 765 | connection to be opened via `open-network-stream' | ||
| 766 | - nil, denoting a newly-allocated pty. | ||
| 767 | |||
| 768 | This function blasts any old process running in the buffer, and | ||
| 769 | does not set the buffer mode. You can use this to cheaply run a | ||
| 770 | series of processes in the same Comint buffer. The hook | ||
| 771 | `comint-exec-hook' is run after each exec." | ||
| 758 | (with-current-buffer buffer | 772 | (with-current-buffer buffer |
| 759 | (let ((proc (get-buffer-process buffer))) ; Blast any old process. | 773 | (let ((proc (get-buffer-process buffer))) ; Blast any old process. |
| 760 | (if proc (delete-process proc))) | 774 | (if proc (delete-process proc))) |
diff --git a/lisp/cus-start.el b/lisp/cus-start.el index fbba49951d1..83973e4a534 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el | |||
| @@ -138,9 +138,18 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of | |||
| 138 | ;; coding.c | 138 | ;; coding.c |
| 139 | (inhibit-eol-conversion mule boolean) | 139 | (inhibit-eol-conversion mule boolean) |
| 140 | (eol-mnemonic-undecided mule string) | 140 | (eol-mnemonic-undecided mule string) |
| 141 | (eol-mnemonic-unix mule string) | 141 | ;; startup.el fiddles with the values. IMO, would be |
| 142 | (eol-mnemonic-dos mule string) | 142 | ;; simpler to just use #ifdefs in coding.c. |
| 143 | (eol-mnemonic-mac mule string) | 143 | (eol-mnemonic-unix mule string nil |
| 144 | :standard | ||
| 145 | (if (memq system-type '(ms-dos windows-nt)) | ||
| 146 | "(Unix)" ":")) | ||
| 147 | (eol-mnemonic-dos mule string nil | ||
| 148 | :standard | ||
| 149 | (if (memq system-type '(ms-dos windows-nt)) | ||
| 150 | "\\" "(DOS)")) | ||
| 151 | (eol-mnemonic-mac mule string nil | ||
| 152 | :standard "(Mac)") | ||
| 144 | (file-coding-system-alist | 153 | (file-coding-system-alist |
| 145 | mule | 154 | mule |
| 146 | (alist | 155 | (alist |
diff --git a/lisp/custom.el b/lisp/custom.el index d8909f8be92..611d5688f30 100644 --- a/lisp/custom.el +++ b/lisp/custom.el | |||
| @@ -936,16 +936,21 @@ Each of the arguments in ARGS should be a list of this form: | |||
| 936 | 936 | ||
| 937 | (SYMBOL EXP [NOW [REQUEST [COMMENT]]]) | 937 | (SYMBOL EXP [NOW [REQUEST [COMMENT]]]) |
| 938 | 938 | ||
| 939 | This stores EXP (without evaluating it) as the saved value for SYMBOL. | 939 | SYMBOL is the variable name, and EXP is an expression which |
| 940 | If NOW is present and non-nil, then also evaluate EXP and set | 940 | evaluates to the customized value. EXP will also be stored, |
| 941 | the default value for the SYMBOL to the value of EXP. | 941 | without evaluating it, in SYMBOL's `saved-value' property, so |
| 942 | that it can be restored via the Customize interface. It is also | ||
| 943 | added to the alist in SYMBOL's `theme-value' property \(by | ||
| 944 | calling `custom-push-theme'). | ||
| 942 | 945 | ||
| 943 | REQUEST is a list of features we must require in order to | 946 | NOW, if present and non-nil, means to install the variable's |
| 944 | handle SYMBOL properly. | 947 | value directly now, even if its `defcustom' declaration has not |
| 945 | COMMENT is a comment string about SYMBOL. | 948 | been executed. This is for internal use only. |
| 949 | |||
| 950 | REQUEST is a list of features to `require' (which are loaded | ||
| 951 | prior to evaluating EXP). | ||
| 946 | 952 | ||
| 947 | EXP itself is saved unevaluated as SYMBOL property `saved-value' and | 953 | COMMENT is a comment string about SYMBOL." |
| 948 | in SYMBOL's list property `theme-value' \(using `custom-push-theme')." | ||
| 949 | (custom-check-theme theme) | 954 | (custom-check-theme theme) |
| 950 | 955 | ||
| 951 | ;; Process all the needed autoloads before anything else, so that the | 956 | ;; Process all the needed autoloads before anything else, so that the |
diff --git a/lisp/descr-text.el b/lisp/descr-text.el index d2995ab790d..50b32fc8f2e 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el | |||
| @@ -806,7 +806,7 @@ relevant to POS." | |||
| 806 | (format " %s: %s\n" elt val))))))) | 806 | (format " %s: %s\n" elt val))))))) |
| 807 | 807 | ||
| 808 | (if text-props-desc (insert text-props-desc)) | 808 | (if text-props-desc (insert text-props-desc)) |
| 809 | (toggle-read-only 1)))))) | 809 | (setq buffer-read-only t)))))) |
| 810 | 810 | ||
| 811 | (define-obsolete-function-alias 'describe-char-after 'describe-char "22.1") | 811 | (define-obsolete-function-alias 'describe-char-after 'describe-char "22.1") |
| 812 | 812 | ||
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 0795b0175a2..8a499c47464 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el | |||
| @@ -245,7 +245,11 @@ List has a form of (file-name full-file-name (attribute-list))." | |||
| 245 | " (default now): " | 245 | " (default now): " |
| 246 | ": "))) | 246 | ": "))) |
| 247 | (new-attribute (dired-mark-read-string prompt nil op-symbol | 247 | (new-attribute (dired-mark-read-string prompt nil op-symbol |
| 248 | arg files default)) | 248 | arg files default |
| 249 | (cond ((eq op-symbol 'chown) | ||
| 250 | (system-users)) | ||
| 251 | ((eq op-symbol 'chgrp) | ||
| 252 | (system-groups))))) | ||
| 249 | (operation (concat program " " new-attribute)) | 253 | (operation (concat program " " new-attribute)) |
| 250 | failures) | 254 | failures) |
| 251 | (setq failures | 255 | (setq failures |
| @@ -385,7 +389,7 @@ Uses the shell command coming from variables `lpr-command' and | |||
| 385 | (dired-run-shell-command (dired-shell-stuff-it command file-list nil)))) | 389 | (dired-run-shell-command (dired-shell-stuff-it command file-list nil)))) |
| 386 | 390 | ||
| 387 | (defun dired-mark-read-string (prompt initial op-symbol arg files | 391 | (defun dired-mark-read-string (prompt initial op-symbol arg files |
| 388 | &optional default-value) | 392 | &optional default-value collection) |
| 389 | "Read args for a Dired marked-files command, prompting with PROMPT. | 393 | "Read args for a Dired marked-files command, prompting with PROMPT. |
| 390 | Return the user input (a string). | 394 | Return the user input (a string). |
| 391 | 395 | ||
| @@ -397,11 +401,14 @@ FILES should be a list of file names. | |||
| 397 | DEFAULT-VALUE, if non-nil, should be a \"standard\" value or list | 401 | DEFAULT-VALUE, if non-nil, should be a \"standard\" value or list |
| 398 | of such values, available via history commands. Note that if the | 402 | of such values, available via history commands. Note that if the |
| 399 | user enters empty input, this function returns the empty string, | 403 | user enters empty input, this function returns the empty string, |
| 400 | not DEFAULT-VALUE." | 404 | not DEFAULT-VALUE. |
| 405 | |||
| 406 | Optional argument COLLECTION is a collection of possible completions, | ||
| 407 | suitable for use by `completing-read'." | ||
| 401 | (dired-mark-pop-up nil op-symbol files | 408 | (dired-mark-pop-up nil op-symbol files |
| 402 | 'read-from-minibuffer | 409 | 'completing-read |
| 403 | (format prompt (dired-mark-prompt arg files)) | 410 | (format prompt (dired-mark-prompt arg files)) |
| 404 | initial nil nil nil default-value)) | 411 | collection nil nil initial nil default-value nil)) |
| 405 | 412 | ||
| 406 | ;;; Cleaning a directory: flagging some backups for deletion. | 413 | ;;; Cleaning a directory: flagging some backups for deletion. |
| 407 | 414 | ||
diff --git a/lisp/dired.el b/lisp/dired.el index d322752e15f..77fe9cb7614 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -3736,7 +3736,7 @@ Ask means pop up a menu for the user to select one of copy, move or link." | |||
| 3736 | ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command | 3736 | ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command |
| 3737 | ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown | 3737 | ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown |
| 3738 | ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff | 3738 | ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff |
| 3739 | ;;;;;; dired-diff) "dired-aux" "dired-aux.el" "58d623eb8e68e472e6164a1bcae83360") | 3739 | ;;;;;; dired-diff) "dired-aux" "dired-aux.el" "de7e4c64718c8ba8438a6397a460bf23") |
| 3740 | ;;; Generated autoloads from dired-aux.el | 3740 | ;;; Generated autoloads from dired-aux.el |
| 3741 | 3741 | ||
| 3742 | (autoload 'dired-diff "dired-aux" "\ | 3742 | (autoload 'dired-diff "dired-aux" "\ |
diff --git a/lisp/electric.el b/lisp/electric.el index 50c9010a74e..6a31ba1f1d3 100644 --- a/lisp/electric.el +++ b/lisp/electric.el | |||
| @@ -215,6 +215,7 @@ point right after that char, and it should return t to cause indentation, | |||
| 215 | ;; it looks challenging. | 215 | ;; it looks challenging. |
| 216 | (let (pos) | 216 | (let (pos) |
| 217 | (when (and | 217 | (when (and |
| 218 | electric-indent-mode | ||
| 218 | ;; Don't reindent while inserting spaces at beginning of line. | 219 | ;; Don't reindent while inserting spaces at beginning of line. |
| 219 | (or (not (memq last-command-event '(?\s ?\t))) | 220 | (or (not (memq last-command-event '(?\s ?\t))) |
| 220 | (save-excursion (skip-chars-backward " \t") (not (bolp)))) | 221 | (save-excursion (skip-chars-backward " \t") (not (bolp)))) |
diff --git a/lisp/emacs-lisp/authors.el b/lisp/emacs-lisp/authors.el index 6f2c6f73eca..a7f8dad54ed 100644 --- a/lisp/emacs-lisp/authors.el +++ b/lisp/emacs-lisp/authors.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; authors.el --- utility for maintaining Emacs's AUTHORS file -*-coding: utf-8;-*- | 1 | ;;; authors.el --- utility for maintaining Emacs's AUTHORS file -*-coding: utf-8 -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2000-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2000-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -829,7 +829,7 @@ with the file and the number of each action: | |||
| 829 | (enable-local-eval nil) | 829 | (enable-local-eval nil) |
| 830 | (existing-buffer (get-file-buffer log-file)) | 830 | (existing-buffer (get-file-buffer log-file)) |
| 831 | (buffer (find-file-noselect log-file)) | 831 | (buffer (find-file-noselect log-file)) |
| 832 | authors file pos) | 832 | authors pos) |
| 833 | (with-current-buffer buffer | 833 | (with-current-buffer buffer |
| 834 | (save-restriction | 834 | (save-restriction |
| 835 | (widen) | 835 | (widen) |
| @@ -943,8 +943,7 @@ and changed by AUTHOR." | |||
| 943 | (file (car change)) | 943 | (file (car change)) |
| 944 | (filestat (if (authors-public-domain-p file) | 944 | (filestat (if (authors-public-domain-p file) |
| 945 | (concat file " (public domain)") | 945 | (concat file " (public domain)") |
| 946 | file)) | 946 | file))) |
| 947 | slot) | ||
| 948 | (cond ((assq :wrote actions) | 947 | (cond ((assq :wrote actions) |
| 949 | (setq wrote-list (cons filestat wrote-list))) | 948 | (setq wrote-list (cons filestat wrote-list))) |
| 950 | ((assq :cowrote actions) | 949 | ((assq :cowrote actions) |
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 5af666b9ded..921b08b10a8 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el | |||
| @@ -762,9 +762,6 @@ write its autoloads into the specified file instead." | |||
| 762 | (define-obsolete-function-alias 'update-autoloads-from-directories | 762 | (define-obsolete-function-alias 'update-autoloads-from-directories |
| 763 | 'update-directory-autoloads "22.1") | 763 | 'update-directory-autoloads "22.1") |
| 764 | 764 | ||
| 765 | (defvar autoload-make-program (or (getenv "MAKE") "make") | ||
| 766 | "Name of the make program in use during the Emacs build process.") | ||
| 767 | |||
| 768 | ;;;###autoload | 765 | ;;;###autoload |
| 769 | (defun batch-update-autoloads () | 766 | (defun batch-update-autoloads () |
| 770 | "Update loaddefs.el autoloads in batch mode. | 767 | "Update loaddefs.el autoloads in batch mode. |
diff --git a/lisp/emacs-lisp/avl-tree.el b/lisp/emacs-lisp/avl-tree.el index 9f348767478..1f00677cd00 100644 --- a/lisp/emacs-lisp/avl-tree.el +++ b/lisp/emacs-lisp/avl-tree.el | |||
| @@ -260,7 +260,7 @@ Return t if the height of the tree has grown." | |||
| 260 | (opp (avl-tree--switch-dir dir)) | 260 | (opp (avl-tree--switch-dir dir)) |
| 261 | ;; direction 0,1 -> sign factor -1,+1 | 261 | ;; direction 0,1 -> sign factor -1,+1 |
| 262 | (sgn (avl-tree--dir-to-sign dir)) | 262 | (sgn (avl-tree--dir-to-sign dir)) |
| 263 | p1 p2 b2 result) | 263 | p1 p2 b2) |
| 264 | (cond | 264 | (cond |
| 265 | ((< (* sgn (avl-tree--node-balance br)) 0) | 265 | ((< (* sgn (avl-tree--node-balance br)) 0) |
| 266 | (setf (avl-tree--node-balance br) 0) | 266 | (setf (avl-tree--node-balance br) 0) |
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index 9ac5ce7d2f0..9a3d8cf705b 100644 --- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; cl-extra.el --- Common Lisp features, part 2 | 1 | ;;; cl-extra.el --- Common Lisp features, part 2 |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1993, 2000-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1993, 2000-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Dave Gillespie <daveg@synaptics.com> | 5 | ;; Author: Dave Gillespie <daveg@synaptics.com> |
| 6 | ;; Keywords: extensions | 6 | ;; Keywords: extensions |
| @@ -430,7 +430,6 @@ With two arguments, return rounding and remainder of their quotient." | |||
| 430 | 430 | ||
| 431 | ;; Random numbers. | 431 | ;; Random numbers. |
| 432 | 432 | ||
| 433 | (defvar *random-state*) | ||
| 434 | ;;;###autoload | 433 | ;;;###autoload |
| 435 | (defun random* (lim &optional state) | 434 | (defun random* (lim &optional state) |
| 436 | "Return a random nonnegative number less than LIM, an integer or float. | 435 | "Return a random nonnegative number less than LIM, an integer or float. |
diff --git a/lisp/emacs-lisp/cl-loaddefs.el b/lisp/emacs-lisp/cl-loaddefs.el index 5bb86628bb8..9e0099bb649 100644 --- a/lisp/emacs-lisp/cl-loaddefs.el +++ b/lisp/emacs-lisp/cl-loaddefs.el | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | ;;;;;; ceiling* floor* isqrt lcm gcd cl-progv-before cl-set-frame-visible-p | 10 | ;;;;;; ceiling* floor* isqrt lcm gcd cl-progv-before cl-set-frame-visible-p |
| 11 | ;;;;;; cl-map-overlays cl-map-intervals cl-map-keymap-recursively | 11 | ;;;;;; cl-map-overlays cl-map-intervals cl-map-keymap-recursively |
| 12 | ;;;;;; notevery notany every some mapcon mapcan mapl maplist map | 12 | ;;;;;; notevery notany every some mapcon mapcan mapl maplist map |
| 13 | ;;;;;; cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "c172dda6770ce18b556561481bfefbb2") | 13 | ;;;;;; cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "5a8a7f7ec2dc453113b8cbda577f2acb") |
| 14 | ;;; Generated autoloads from cl-extra.el | 14 | ;;; Generated autoloads from cl-extra.el |
| 15 | 15 | ||
| 16 | (autoload 'coerce "cl-extra" "\ | 16 | (autoload 'coerce "cl-extra" "\ |
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 88698a1f069..0d6716a2e63 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el | |||
| @@ -260,7 +260,7 @@ the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'. | |||
| 260 | ;; repeat-command still does the toggling correctly. | 260 | ;; repeat-command still does the toggling correctly. |
| 261 | (interactive (list (or current-prefix-arg 'toggle))) | 261 | (interactive (list (or current-prefix-arg 'toggle))) |
| 262 | (let ((,last-message (current-message))) | 262 | (let ((,last-message (current-message))) |
| 263 | (,@(if setter (list setter) | 263 | (,@(if setter `(funcall #',setter) |
| 264 | (list (if (symbolp mode) 'setq 'setf) mode)) | 264 | (list (if (symbolp mode) 'setq 'setf) mode)) |
| 265 | (if (eq arg 'toggle) | 265 | (if (eq arg 'toggle) |
| 266 | (not ,mode) | 266 | (not ,mode) |
diff --git a/lisp/emacs-lisp/eieio-opt.el b/lisp/emacs-lisp/eieio-opt.el index 10816aaa43c..a899839f68a 100644 --- a/lisp/emacs-lisp/eieio-opt.el +++ b/lisp/emacs-lisp/eieio-opt.el | |||
| @@ -72,8 +72,7 @@ Argument CH-PREFIX is another character prefix to display." | |||
| 72 | 72 | ||
| 73 | ;;; CLASS COMPLETION / DOCUMENTATION | 73 | ;;; CLASS COMPLETION / DOCUMENTATION |
| 74 | 74 | ||
| 75 | ;;;###autoload | 75 | ;;;###autoload(defalias 'describe-class 'eieio-describe-class) |
| 76 | (defalias 'describe-class 'eieio-describe-class) | ||
| 77 | 76 | ||
| 78 | ;;;###autoload | 77 | ;;;###autoload |
| 79 | (defun eieio-describe-class (class &optional headerfcn) | 78 | (defun eieio-describe-class (class &optional headerfcn) |
| @@ -305,8 +304,7 @@ are not abstract." | |||
| 305 | ;;; METHOD COMPLETION / DOC | 304 | ;;; METHOD COMPLETION / DOC |
| 306 | 305 | ||
| 307 | (defalias 'describe-method 'eieio-describe-generic) | 306 | (defalias 'describe-method 'eieio-describe-generic) |
| 308 | ;;;###autoload | 307 | ;;;###autoload(defalias 'describe-generic 'eieio-describe-generic) |
| 309 | (defalias 'describe-generic 'eieio-describe-generic) | ||
| 310 | (defalias 'eieio-describe-method 'eieio-describe-generic) | 308 | (defalias 'eieio-describe-method 'eieio-describe-generic) |
| 311 | 309 | ||
| 312 | ;;;###autoload | 310 | ;;;###autoload |
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el index f1c1bf8965c..768eba58ee1 100644 --- a/lisp/emacs-lisp/eieio.el +++ b/lisp/emacs-lisp/eieio.el | |||
| @@ -3051,7 +3051,7 @@ Optional argument GROUP is the sub-group of slots to display. | |||
| 3051 | 3051 | ||
| 3052 | ;;;### (autoloads (eieio-help-mode-augmentation-maybee eieio-describe-generic | 3052 | ;;;### (autoloads (eieio-help-mode-augmentation-maybee eieio-describe-generic |
| 3053 | ;;;;;; eieio-describe-constructor eieio-describe-class eieio-browse) | 3053 | ;;;;;; eieio-describe-constructor eieio-describe-class eieio-browse) |
| 3054 | ;;;;;; "eieio-opt" "eieio-opt.el" "e2814881441ad23759409687502f0ee1") | 3054 | ;;;;;; "eieio-opt" "eieio-opt.el" "d808328f9c0156ecbd412d77ba8c569e") |
| 3055 | ;;; Generated autoloads from eieio-opt.el | 3055 | ;;; Generated autoloads from eieio-opt.el |
| 3056 | 3056 | ||
| 3057 | (autoload 'eieio-browse "eieio-opt" "\ | 3057 | (autoload 'eieio-browse "eieio-opt" "\ |
| @@ -3060,7 +3060,6 @@ If optional ROOT-CLASS, then start with that, otherwise start with | |||
| 3060 | variable `eieio-default-superclass'. | 3060 | variable `eieio-default-superclass'. |
| 3061 | 3061 | ||
| 3062 | \(fn &optional ROOT-CLASS)" t nil) | 3062 | \(fn &optional ROOT-CLASS)" t nil) |
| 3063 | |||
| 3064 | (defalias 'describe-class 'eieio-describe-class) | 3063 | (defalias 'describe-class 'eieio-describe-class) |
| 3065 | 3064 | ||
| 3066 | (autoload 'eieio-describe-class "eieio-opt" "\ | 3065 | (autoload 'eieio-describe-class "eieio-opt" "\ |
| @@ -3075,7 +3074,6 @@ Describe the constructor function FCN. | |||
| 3075 | Uses `eieio-describe-class' to describe the class being constructed. | 3074 | Uses `eieio-describe-class' to describe the class being constructed. |
| 3076 | 3075 | ||
| 3077 | \(fn FCN)" t nil) | 3076 | \(fn FCN)" t nil) |
| 3078 | |||
| 3079 | (defalias 'describe-generic 'eieio-describe-generic) | 3077 | (defalias 'describe-generic 'eieio-describe-generic) |
| 3080 | 3078 | ||
| 3081 | (autoload 'eieio-describe-generic "eieio-opt" "\ | 3079 | (autoload 'eieio-describe-generic "eieio-opt" "\ |
diff --git a/lisp/emacs-lisp/ert-x.el b/lisp/emacs-lisp/ert-x.el index 257d0528cbc..a7916354c91 100644 --- a/lisp/emacs-lisp/ert-x.el +++ b/lisp/emacs-lisp/ert-x.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; Copyright (C) 2008, 2010-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2008, 2010-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Lennart Borgman (lennart O borgman A gmail O com) | 5 | ;; Author: Lennart Borgman (lennart O borgman A gmail O com) |
| 6 | ;; Author: Christian Ohler <ohler@gnu.org> | 6 | ;; Christian Ohler <ohler@gnu.org> |
| 7 | 7 | ||
| 8 | ;; This file is part of GNU Emacs. | 8 | ;; This file is part of GNU Emacs. |
| 9 | 9 | ||
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 4efdc3240cd..bcb7fab026b 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el | |||
| @@ -447,7 +447,21 @@ Optional ARG is ignored." | |||
| 447 | ;; Try first in this order for the sake of languages with nested | 447 | ;; Try first in this order for the sake of languages with nested |
| 448 | ;; functions where several can end at the same place as with | 448 | ;; functions where several can end at the same place as with |
| 449 | ;; the offside rule, e.g. Python. | 449 | ;; the offside rule, e.g. Python. |
| 450 | (beginning-of-defun) | 450 | |
| 451 | ;; Finding the start of the function is a bit problematic since | ||
| 452 | ;; `beginning-of-defun' when we are on the first character of | ||
| 453 | ;; the function might go to the previous function. | ||
| 454 | ;; | ||
| 455 | ;; Therefore we first move one character forward and then call | ||
| 456 | ;; `beginning-of-defun'. However now we must check that we did | ||
| 457 | ;; not move into the next function. | ||
| 458 | (let ((here (point))) | ||
| 459 | (unless (eolp) | ||
| 460 | (forward-char)) | ||
| 461 | (beginning-of-defun) | ||
| 462 | (when (< (point) here) | ||
| 463 | (goto-char here) | ||
| 464 | (beginning-of-defun))) | ||
| 451 | (setq beg (point)) | 465 | (setq beg (point)) |
| 452 | (end-of-defun) | 466 | (end-of-defun) |
| 453 | (setq end (point)) | 467 | (setq end (point)) |
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 5b158eb994f..4b868f72899 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -524,7 +524,7 @@ Required package `%s-%s' is unavailable" | |||
| 524 | 524 | ||
| 525 | (defun define-package (name-string version-string | 525 | (defun define-package (name-string version-string |
| 526 | &optional docstring requirements | 526 | &optional docstring requirements |
| 527 | &rest extra-properties) | 527 | &rest _extra-properties) |
| 528 | "Define a new package. | 528 | "Define a new package. |
| 529 | NAME-STRING is the name of the package, as a string. | 529 | NAME-STRING is the name of the package, as a string. |
| 530 | VERSION-STRING is the version of the package, as a string. | 530 | VERSION-STRING is the version of the package, as a string. |
| @@ -584,7 +584,7 @@ EXTRA-PROPERTIES is currently unused." | |||
| 584 | (defun package-generate-autoloads (name pkg-dir) | 584 | (defun package-generate-autoloads (name pkg-dir) |
| 585 | (require 'autoload) ;Load before we let-bind generated-autoload-file! | 585 | (require 'autoload) ;Load before we let-bind generated-autoload-file! |
| 586 | (let* ((auto-name (concat name "-autoloads.el")) | 586 | (let* ((auto-name (concat name "-autoloads.el")) |
| 587 | (ignore-name (concat name "-pkg.el")) | 587 | ;;(ignore-name (concat name "-pkg.el")) |
| 588 | (generated-autoload-file (expand-file-name auto-name pkg-dir)) | 588 | (generated-autoload-file (expand-file-name auto-name pkg-dir)) |
| 589 | (version-control 'never)) | 589 | (version-control 'never)) |
| 590 | (unless (fboundp 'autoload-ensure-default-file) | 590 | (unless (fboundp 'autoload-ensure-default-file) |
| @@ -1389,7 +1389,7 @@ If REMEMBER-POS is non-nil, keep point on the same entry. | |||
| 1389 | PACKAGES should be t, which means to display all known packages, | 1389 | PACKAGES should be t, which means to display all known packages, |
| 1390 | or a list of package names (symbols) to display." | 1390 | or a list of package names (symbols) to display." |
| 1391 | ;; Construct list of ((PACKAGE . VERSION) STATUS DESCRIPTION). | 1391 | ;; Construct list of ((PACKAGE . VERSION) STATUS DESCRIPTION). |
| 1392 | (let (info-list name builtin) | 1392 | (let (info-list name) |
| 1393 | ;; Installed packages: | 1393 | ;; Installed packages: |
| 1394 | (dolist (elt package-alist) | 1394 | (dolist (elt package-alist) |
| 1395 | (setq name (car elt)) | 1395 | (setq name (car elt)) |
| @@ -1474,21 +1474,21 @@ If optional arg BUTTON is non-nil, describe its associated package." | |||
| 1474 | (describe-package package)))) | 1474 | (describe-package package)))) |
| 1475 | 1475 | ||
| 1476 | ;; fixme numeric argument | 1476 | ;; fixme numeric argument |
| 1477 | (defun package-menu-mark-delete (&optional num) | 1477 | (defun package-menu-mark-delete (&optional _num) |
| 1478 | "Mark a package for deletion and move to the next line." | 1478 | "Mark a package for deletion and move to the next line." |
| 1479 | (interactive "p") | 1479 | (interactive "p") |
| 1480 | (if (member (package-menu-get-status) '("installed" "obsolete")) | 1480 | (if (member (package-menu-get-status) '("installed" "obsolete")) |
| 1481 | (tabulated-list-put-tag "D" t) | 1481 | (tabulated-list-put-tag "D" t) |
| 1482 | (forward-line))) | 1482 | (forward-line))) |
| 1483 | 1483 | ||
| 1484 | (defun package-menu-mark-install (&optional num) | 1484 | (defun package-menu-mark-install (&optional _num) |
| 1485 | "Mark a package for installation and move to the next line." | 1485 | "Mark a package for installation and move to the next line." |
| 1486 | (interactive "p") | 1486 | (interactive "p") |
| 1487 | (if (string-equal (package-menu-get-status) "available") | 1487 | (if (string-equal (package-menu-get-status) "available") |
| 1488 | (tabulated-list-put-tag "I" t) | 1488 | (tabulated-list-put-tag "I" t) |
| 1489 | (forward-line))) | 1489 | (forward-line))) |
| 1490 | 1490 | ||
| 1491 | (defun package-menu-mark-unmark (&optional num) | 1491 | (defun package-menu-mark-unmark (&optional _num) |
| 1492 | "Clear any marks on a package and move to the next line." | 1492 | "Clear any marks on a package and move to the next line." |
| 1493 | (interactive "p") | 1493 | (interactive "p") |
| 1494 | (tabulated-list-put-tag " " t)) | 1494 | (tabulated-list-put-tag " " t)) |
| @@ -1530,8 +1530,7 @@ If optional arg BUTTON is non-nil, describe its associated package." | |||
| 1530 | (dolist (entry tabulated-list-entries) | 1530 | (dolist (entry tabulated-list-entries) |
| 1531 | ;; ENTRY is ((NAME . VERSION) [NAME VERSION STATUS DOC]) | 1531 | ;; ENTRY is ((NAME . VERSION) [NAME VERSION STATUS DOC]) |
| 1532 | (let ((pkg (car entry)) | 1532 | (let ((pkg (car entry)) |
| 1533 | (status (aref (cadr entry) 2)) | 1533 | (status (aref (cadr entry) 2))) |
| 1534 | old) | ||
| 1535 | (cond ((equal status "installed") | 1534 | (cond ((equal status "installed") |
| 1536 | (push pkg installed)) | 1535 | (push pkg installed)) |
| 1537 | ((equal status "available") | 1536 | ((equal status "available") |
diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el index 6d12fe19277..72e3c398dc0 100644 --- a/lisp/emacs-lisp/regexp-opt.el +++ b/lisp/emacs-lisp/regexp-opt.el | |||
| @@ -136,9 +136,6 @@ This means the number of non-shy regexp grouping constructs | |||
| 136 | 136 | ||
| 137 | ;;; Workhorse functions. | 137 | ;;; Workhorse functions. |
| 138 | 138 | ||
| 139 | (eval-when-compile | ||
| 140 | (require 'cl)) | ||
| 141 | |||
| 142 | (defun regexp-opt-group (strings &optional paren lax) | 139 | (defun regexp-opt-group (strings &optional paren lax) |
| 143 | "Return a regexp to match a string in the sorted list STRINGS. | 140 | "Return a regexp to match a string in the sorted list STRINGS. |
| 144 | If PAREN non-nil, output regexp parentheses around returned regexp. | 141 | If PAREN non-nil, output regexp parentheses around returned regexp. |
| @@ -248,15 +245,15 @@ Merges keywords to avoid backtracking in Emacs's regexp matcher." | |||
| 248 | ;; | 245 | ;; |
| 249 | ;; Make a character map but extract character set meta characters. | 246 | ;; Make a character map but extract character set meta characters. |
| 250 | (dolist (char chars) | 247 | (dolist (char chars) |
| 251 | (case char | 248 | (cond |
| 252 | (?\] | 249 | ((eq char ?\]) |
| 253 | (setq bracket "]")) | 250 | (setq bracket "]")) |
| 254 | (?^ | 251 | ((eq char ?^) |
| 255 | (setq caret "^")) | 252 | (setq caret "^")) |
| 256 | (?- | 253 | ((eq char ?-) |
| 257 | (setq dash "-")) | 254 | (setq dash "-")) |
| 258 | (otherwise | 255 | (t |
| 259 | (aset charmap char t)))) | 256 | (aset charmap char t)))) |
| 260 | ;; | 257 | ;; |
| 261 | ;; Make a character set from the map using ranges where applicable. | 258 | ;; Make a character set from the map using ranges where applicable. |
| 262 | (map-char-table | 259 | (map-char-table |
| @@ -268,14 +265,14 @@ Merges keywords to avoid backtracking in Emacs's regexp matcher." | |||
| 268 | (setq charset (format "%s%c-%c" charset start end)) | 265 | (setq charset (format "%s%c-%c" charset start end)) |
| 269 | (while (>= end start) | 266 | (while (>= end start) |
| 270 | (setq charset (format "%s%c" charset start)) | 267 | (setq charset (format "%s%c" charset start)) |
| 271 | (incf start))) | 268 | (setq start (1+ start)))) |
| 272 | (setq start (car c) end (cdr c))) | 269 | (setq start (car c) end (cdr c))) |
| 273 | (if (= (1- c) end) (setq end c) | 270 | (if (= (1- c) end) (setq end c) |
| 274 | (if (> end (+ start 2)) | 271 | (if (> end (+ start 2)) |
| 275 | (setq charset (format "%s%c-%c" charset start end)) | 272 | (setq charset (format "%s%c-%c" charset start end)) |
| 276 | (while (>= end start) | 273 | (while (>= end start) |
| 277 | (setq charset (format "%s%c" charset start)) | 274 | (setq charset (format "%s%c" charset start)) |
| 278 | (incf start))) | 275 | (setq start (1+ start)))) |
| 279 | (setq start c end c))))) | 276 | (setq start c end c))))) |
| 280 | charmap) | 277 | charmap) |
| 281 | (when (>= end start) | 278 | (when (>= end start) |
| @@ -283,7 +280,7 @@ Merges keywords to avoid backtracking in Emacs's regexp matcher." | |||
| 283 | (setq charset (format "%s%c-%c" charset start end)) | 280 | (setq charset (format "%s%c-%c" charset start end)) |
| 284 | (while (>= end start) | 281 | (while (>= end start) |
| 285 | (setq charset (format "%s%c" charset start)) | 282 | (setq charset (format "%s%c" charset start)) |
| 286 | (incf start)))) | 283 | (setq start (1+ start))))) |
| 287 | ;; | 284 | ;; |
| 288 | ;; Make sure a caret is not first and a dash is first or last. | 285 | ;; Make sure a caret is not first and a dash is first or last. |
| 289 | (if (and (string-equal charset "") (string-equal bracket "")) | 286 | (if (and (string-equal charset "") (string-equal bracket "")) |
diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el index 2a12f03e514..cafa1942a09 100644 --- a/lisp/emacs-lisp/smie.el +++ b/lisp/emacs-lisp/smie.el | |||
| @@ -1602,6 +1602,36 @@ to which that point should be aligned, if we were to reindent it.") | |||
| 1602 | (save-excursion (indent-line-to indent)) | 1602 | (save-excursion (indent-line-to indent)) |
| 1603 | (indent-line-to indent))))) | 1603 | (indent-line-to indent))))) |
| 1604 | 1604 | ||
| 1605 | (defun smie-auto-fill () | ||
| 1606 | (let ((fc (current-fill-column))) | ||
| 1607 | (while (and fc (> (current-column) fc)) | ||
| 1608 | (cond | ||
| 1609 | ((not (or (nth 8 (save-excursion | ||
| 1610 | (syntax-ppss (line-beginning-position)))) | ||
| 1611 | (nth 8 (syntax-ppss)))) | ||
| 1612 | (save-excursion | ||
| 1613 | (beginning-of-line) | ||
| 1614 | (smie-indent-forward-token) | ||
| 1615 | (let ((bsf (point)) | ||
| 1616 | (gain 0) | ||
| 1617 | curcol) | ||
| 1618 | (while (<= (setq curcol (current-column)) fc) | ||
| 1619 | ;; FIXME? `smie-indent-calculate' can (and often will) | ||
| 1620 | ;; return a result that actually depends on the presence/absence | ||
| 1621 | ;; of a newline, so the gain computed here may not be accurate, | ||
| 1622 | ;; but in practice it seems to works well enough. | ||
| 1623 | (let* ((newcol (smie-indent-calculate)) | ||
| 1624 | (newgain (- curcol newcol))) | ||
| 1625 | (when (> newgain gain) | ||
| 1626 | (setq gain newgain) | ||
| 1627 | (setq bsf (point)))) | ||
| 1628 | (smie-indent-forward-token)) | ||
| 1629 | (when (> gain 0) | ||
| 1630 | (goto-char bsf) | ||
| 1631 | (newline-and-indent))))) | ||
| 1632 | (t (do-auto-fill)))))) | ||
| 1633 | |||
| 1634 | |||
| 1605 | (defun smie-setup (grammar rules-function &rest keywords) | 1635 | (defun smie-setup (grammar rules-function &rest keywords) |
| 1606 | "Setup SMIE navigation and indentation. | 1636 | "Setup SMIE navigation and indentation. |
| 1607 | GRAMMAR is a grammar table generated by `smie-prec2->grammar'. | 1637 | GRAMMAR is a grammar table generated by `smie-prec2->grammar'. |
| @@ -1612,6 +1642,7 @@ KEYWORDS are additional arguments, which can use the following keywords: | |||
| 1612 | (set (make-local-variable 'smie-rules-function) rules-function) | 1642 | (set (make-local-variable 'smie-rules-function) rules-function) |
| 1613 | (set (make-local-variable 'smie-grammar) grammar) | 1643 | (set (make-local-variable 'smie-grammar) grammar) |
| 1614 | (set (make-local-variable 'indent-line-function) 'smie-indent-line) | 1644 | (set (make-local-variable 'indent-line-function) 'smie-indent-line) |
| 1645 | (set (make-local-variable 'normal-auto-fill-function) 'smie-auto-fill) | ||
| 1615 | (set (make-local-variable 'forward-sexp-function) | 1646 | (set (make-local-variable 'forward-sexp-function) |
| 1616 | 'smie-forward-sexp-command) | 1647 | 'smie-forward-sexp-command) |
| 1617 | (while keywords | 1648 | (while keywords |
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index f17b12da6a0..9439fba2b86 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el | |||
| @@ -215,7 +215,7 @@ buffer and inserts the entries with `tabulated-list-printer'. | |||
| 215 | Optional argument REMEMBER-POS, if non-nil, means to move point | 215 | Optional argument REMEMBER-POS, if non-nil, means to move point |
| 216 | to the entry with the same ID element as the current line." | 216 | to the entry with the same ID element as the current line." |
| 217 | (let ((inhibit-read-only t) | 217 | (let ((inhibit-read-only t) |
| 218 | (entries (if (functionp 'tabulated-list-entries) | 218 | (entries (if (functionp tabulated-list-entries) |
| 219 | (funcall tabulated-list-entries) | 219 | (funcall tabulated-list-entries) |
| 220 | tabulated-list-entries)) | 220 | tabulated-list-entries)) |
| 221 | entry-id saved-pt saved-col) | 221 | entry-id saved-pt saved-col) |
| @@ -246,7 +246,7 @@ to the entry with the same ID element as the current line." | |||
| 246 | (setq entries (sort entries sorter)) | 246 | (setq entries (sort entries sorter)) |
| 247 | (if (cdr tabulated-list-sort-key) | 247 | (if (cdr tabulated-list-sort-key) |
| 248 | (setq entries (nreverse entries))) | 248 | (setq entries (nreverse entries))) |
| 249 | (unless (functionp 'tabulated-list-entries) | 249 | (unless (functionp tabulated-list-entries) |
| 250 | (setq tabulated-list-entries entries))))) | 250 | (setq tabulated-list-entries entries))))) |
| 251 | ;; Print the resulting list. | 251 | ;; Print the resulting list. |
| 252 | (dolist (elt entries) | 252 | (dolist (elt entries) |
diff --git a/lisp/emacs-lock.el b/lisp/emacs-lock.el index 743b828326c..f5954564a2f 100644 --- a/lisp/emacs-lock.el +++ b/lisp/emacs-lock.el | |||
| @@ -81,6 +81,13 @@ for both actions (NOT RECOMMENDED)." | |||
| 81 | :group 'emacs-lock | 81 | :group 'emacs-lock |
| 82 | :version "24.1") | 82 | :version "24.1") |
| 83 | 83 | ||
| 84 | (defcustom emacs-lock-locked-buffer-functions nil | ||
| 85 | "Abnormal hook run when Emacs Lock prevents exiting Emacs, or killing a buffer. | ||
| 86 | The functions get one argument, the first locked buffer found." | ||
| 87 | :type 'hook | ||
| 88 | :group 'emacs-lock | ||
| 89 | :version "24.2") | ||
| 90 | |||
| 84 | (defvar emacs-lock-mode nil | 91 | (defvar emacs-lock-mode nil |
| 85 | "If non-nil, the current buffer is locked. | 92 | "If non-nil, the current buffer is locked. |
| 86 | It can be one of the following values: | 93 | It can be one of the following values: |
| @@ -119,40 +126,45 @@ See `emacs-lock-unlockable-modes'." | |||
| 119 | (or (eq unlock 'all) (eq unlock action)))))) | 126 | (or (eq unlock 'all) (eq unlock action)))))) |
| 120 | 127 | ||
| 121 | (defun emacs-lock--exit-locked-buffer () | 128 | (defun emacs-lock--exit-locked-buffer () |
| 122 | "Return the name of the first exit-locked buffer found." | 129 | "Return the first exit-locked buffer found." |
| 123 | (save-current-buffer | 130 | (save-current-buffer |
| 124 | (catch :found | 131 | (catch :found |
| 125 | (dolist (buffer (buffer-list)) | 132 | (dolist (buffer (buffer-list)) |
| 126 | (set-buffer buffer) | 133 | (set-buffer buffer) |
| 127 | (unless (or (emacs-lock--can-auto-unlock 'exit) | 134 | (unless (or (emacs-lock--can-auto-unlock 'exit) |
| 128 | (memq emacs-lock-mode '(nil kill))) | 135 | (memq emacs-lock-mode '(nil kill))) |
| 129 | (throw :found (buffer-name)))) | 136 | (throw :found buffer))) |
| 130 | nil))) | 137 | nil))) |
| 131 | 138 | ||
| 132 | (defun emacs-lock--kill-emacs-hook () | 139 | (defun emacs-lock--kill-emacs-hook () |
| 133 | "Signal an error if any buffer is exit-locked. | 140 | "Signal an error if any buffer is exit-locked. |
| 134 | Used from `kill-emacs-hook' (which see)." | 141 | Used from `kill-emacs-hook' (which see)." |
| 135 | (let ((buffer-name (emacs-lock--exit-locked-buffer))) | 142 | (let ((locked (emacs-lock--exit-locked-buffer))) |
| 136 | (when buffer-name | 143 | (when locked |
| 137 | (error "Emacs cannot exit because buffer %S is locked" buffer-name)))) | 144 | (run-hook-with-args 'emacs-lock-locked-buffer-functions locked) |
| 145 | (error "Emacs cannot exit because buffer %S is locked" | ||
| 146 | (buffer-name locked))))) | ||
| 138 | 147 | ||
| 139 | (defun emacs-lock--kill-emacs-query-functions () | 148 | (defun emacs-lock--kill-emacs-query-functions () |
| 140 | "Display a message if any buffer is exit-locked. | 149 | "Display a message if any buffer is exit-locked. |
| 141 | Return a value appropriate for `kill-emacs-query-functions' (which see)." | 150 | Return a value appropriate for `kill-emacs-query-functions' (which see)." |
| 142 | (let ((locked (emacs-lock--exit-locked-buffer))) | 151 | (let ((locked (emacs-lock--exit-locked-buffer))) |
| 143 | (or (not locked) | 152 | (if (not locked) |
| 144 | (progn | 153 | t |
| 145 | (message "Emacs cannot exit because buffer %S is locked" locked) | 154 | (run-hook-with-args 'emacs-lock-locked-buffer-functions locked) |
| 146 | nil)))) | 155 | (message "Emacs cannot exit because buffer %S is locked" |
| 156 | (buffer-name locked)) | ||
| 157 | nil))) | ||
| 147 | 158 | ||
| 148 | (defun emacs-lock--kill-buffer-query-functions () | 159 | (defun emacs-lock--kill-buffer-query-functions () |
| 149 | "Display a message if the current buffer is kill-locked. | 160 | "Display a message if the current buffer is kill-locked. |
| 150 | Return a value appropriate for `kill-buffer-query-functions' (which see)." | 161 | Return a value appropriate for `kill-buffer-query-functions' (which see)." |
| 151 | (or (emacs-lock--can-auto-unlock 'kill) | 162 | (if (or (emacs-lock--can-auto-unlock 'kill) |
| 152 | (memq emacs-lock-mode '(nil exit)) | 163 | (memq emacs-lock-mode '(nil exit))) |
| 153 | (progn | 164 | t |
| 154 | (message "Buffer %S is locked and cannot be killed" (buffer-name)) | 165 | (run-hook-with-args 'emacs-lock-locked-buffer-functions (current-buffer)) |
| 155 | nil))) | 166 | (message "Buffer %S is locked and cannot be killed" (buffer-name)) |
| 167 | nil)) | ||
| 156 | 168 | ||
| 157 | (defun emacs-lock--set-mode (mode arg) | 169 | (defun emacs-lock--set-mode (mode arg) |
| 158 | "Setter function for `emacs-lock-mode'." | 170 | "Setter function for `emacs-lock-mode'." |
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index a918f298a4e..ba6127b4cba 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el | |||
| @@ -1002,15 +1002,21 @@ behavior, see `cua-paste-pop-rotate-temporarily'." | |||
| 1002 | (setq this-command 'cua-paste-pop)))) | 1002 | (setq this-command 'cua-paste-pop)))) |
| 1003 | 1003 | ||
| 1004 | (defun cua-exchange-point-and-mark (arg) | 1004 | (defun cua-exchange-point-and-mark (arg) |
| 1005 | "Exchanges point and mark, but don't activate the mark. | 1005 | "Exchange point and mark. |
| 1006 | Activates the mark if a prefix argument is given." | 1006 | Don't activate the mark if `cua-enable-cua-keys' is non-nil. |
| 1007 | Otherwise, just activate the mark if a prefix ARG is given. | ||
| 1008 | |||
| 1009 | See also `exchange-point-and-mark'." | ||
| 1007 | (interactive "P") | 1010 | (interactive "P") |
| 1008 | (if arg | 1011 | (cond ((null cua-enable-cua-keys) |
| 1009 | (setq mark-active t) | 1012 | (exchange-point-and-mark arg)) |
| 1010 | (let (mark-active) | 1013 | (arg |
| 1011 | (exchange-point-and-mark) | 1014 | (setq mark-active t)) |
| 1012 | (if cua--rectangle | 1015 | (t |
| 1013 | (cua--rectangle-corner 0))))) | 1016 | (let (mark-active) |
| 1017 | (exchange-point-and-mark) | ||
| 1018 | (if cua--rectangle | ||
| 1019 | (cua--rectangle-corner 0)))))) | ||
| 1014 | 1020 | ||
| 1015 | ;; Typed text that replaced the highlighted region. | 1021 | ;; Typed text that replaced the highlighted region. |
| 1016 | (defvar cua--repeat-replace-text nil) | 1022 | (defvar cua--repeat-replace-text nil) |
| @@ -1246,22 +1252,7 @@ If ARG is the atom `-', scroll upward by nearly full screen." | |||
| 1246 | ;; (and region not started with C-SPC). | 1252 | ;; (and region not started with C-SPC). |
| 1247 | ;; If rectangle is active, expand rectangle in specified direction and | 1253 | ;; If rectangle is active, expand rectangle in specified direction and |
| 1248 | ;; ignore the movement. | 1254 | ;; ignore the movement. |
| 1249 | ((if window-system | 1255 | (this-command-keys-shift-translated |
| 1250 | ;; Shortcut for window-system, assuming that input-decode-map is empty. | ||
| 1251 | (memq 'shift (event-modifiers | ||
| 1252 | (aref (this-single-command-raw-keys) 0))) | ||
| 1253 | (or | ||
| 1254 | ;; Check if the final key-sequence was shifted. | ||
| 1255 | (memq 'shift (event-modifiers | ||
| 1256 | (aref (this-single-command-keys) 0))) | ||
| 1257 | ;; If not, maybe the raw key-sequence was mapped by input-decode-map | ||
| 1258 | ;; to a shifted key (and then mapped down to its unshifted form). | ||
| 1259 | (let* ((keys (this-single-command-raw-keys)) | ||
| 1260 | (ev (lookup-key input-decode-map keys))) | ||
| 1261 | (or (and (vector ev) (memq 'shift (event-modifiers (aref ev 0)))) | ||
| 1262 | ;; Or maybe, the raw key-sequence was not an escape sequence | ||
| 1263 | ;; and was shifted (and then mapped down to its unshifted form). | ||
| 1264 | (memq 'shift (event-modifiers (aref keys 0))))))) | ||
| 1265 | (unless mark-active | 1256 | (unless mark-active |
| 1266 | (push-mark-command nil t)) | 1257 | (push-mark-command nil t)) |
| 1267 | (setq cua--last-region-shifted t) | 1258 | (setq cua--last-region-shifted t) |
diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el index e3aade760dc..4286afba938 100644 --- a/lisp/emulation/cua-rect.el +++ b/lisp/emulation/cua-rect.el | |||
| @@ -465,7 +465,7 @@ If command is repeated at same position, delete the rectangle." | |||
| 465 | (cua-copy-rectangle arg) | 465 | (cua-copy-rectangle arg) |
| 466 | (setq cua--mouse-last-pos (cons (point) cua--last-killed-rectangle))))) | 466 | (setq cua--mouse-last-pos (cons (point) cua--last-killed-rectangle))))) |
| 467 | 467 | ||
| 468 | (defun cua--mouse-ignore (event) | 468 | (defun cua--mouse-ignore (_event) |
| 469 | (interactive "e") | 469 | (interactive "e") |
| 470 | (setq this-command last-command)) | 470 | (setq this-command last-command)) |
| 471 | 471 | ||
| @@ -609,12 +609,12 @@ If command is repeated at same position, delete the rectangle." | |||
| 609 | (let ((lines 0)) | 609 | (let ((lines 0)) |
| 610 | (if (not (cua--rectangle-virtual-edges)) | 610 | (if (not (cua--rectangle-virtual-edges)) |
| 611 | (cua--rectangle-operation nil nil t 2 t | 611 | (cua--rectangle-operation nil nil t 2 t |
| 612 | (lambda (s e l r v) | 612 | (lambda (s e _l _r _v) |
| 613 | (setq lines (1+ lines)) | 613 | (setq lines (1+ lines)) |
| 614 | (if (and (> e s) (<= e (point-max))) | 614 | (if (and (> e s) (<= e (point-max))) |
| 615 | (delete-region s e)))) | 615 | (delete-region s e)))) |
| 616 | (cua--rectangle-operation nil 1 t nil t | 616 | (cua--rectangle-operation nil 1 t nil t |
| 617 | (lambda (s e l r v) | 617 | (lambda (s e _l _r _v) |
| 618 | (setq lines (1+ lines)) | 618 | (setq lines (1+ lines)) |
| 619 | (when (and (> e s) (<= e (point-max))) | 619 | (when (and (> e s) (<= e (point-max))) |
| 620 | (delete-region s e))))) | 620 | (delete-region s e))))) |
| @@ -624,10 +624,10 @@ If command is repeated at same position, delete the rectangle." | |||
| 624 | (let (rect) | 624 | (let (rect) |
| 625 | (if (not (cua--rectangle-virtual-edges)) | 625 | (if (not (cua--rectangle-virtual-edges)) |
| 626 | (cua--rectangle-operation nil nil nil nil nil ; do not tabify | 626 | (cua--rectangle-operation nil nil nil nil nil ; do not tabify |
| 627 | (lambda (s e l r) | 627 | (lambda (s e _l _r) |
| 628 | (setq rect (cons (cua--filter-buffer-noprops s e) rect)))) | 628 | (setq rect (cons (cua--filter-buffer-noprops s e) rect)))) |
| 629 | (cua--rectangle-operation nil 1 nil nil nil ; do not tabify | 629 | (cua--rectangle-operation nil 1 nil nil nil ; do not tabify |
| 630 | (lambda (s e l r v) | 630 | (lambda (s e l r _v) |
| 631 | (let ((copy t) (bs 0) (as 0) row) | 631 | (let ((copy t) (bs 0) (as 0) row) |
| 632 | (if (= s e) (setq e (1+ e))) | 632 | (if (= s e) (setq e (1+ e))) |
| 633 | (goto-char s) | 633 | (goto-char s) |
| @@ -840,7 +840,7 @@ If command is repeated at same position, delete the rectangle." | |||
| 840 | (pad (cua--rectangle-virtual-edges)) | 840 | (pad (cua--rectangle-virtual-edges)) |
| 841 | indent) | 841 | indent) |
| 842 | (cua--rectangle-operation (if clear 'clear 'corners) nil t pad nil | 842 | (cua--rectangle-operation (if clear 'clear 'corners) nil t pad nil |
| 843 | (lambda (s e l r) | 843 | (lambda (_s _e l _r) |
| 844 | (move-to-column col pad) | 844 | (move-to-column col pad) |
| 845 | (if (and (eolp) | 845 | (if (and (eolp) |
| 846 | (< (current-column) col)) | 846 | (< (current-column) col)) |
| @@ -905,10 +905,10 @@ With prefix argument, activate previous rectangle if possible." | |||
| 905 | (cua-help-for-region t)))) | 905 | (cua-help-for-region t)))) |
| 906 | 906 | ||
| 907 | (defun cua-restrict-regexp-rectangle (arg) | 907 | (defun cua-restrict-regexp-rectangle (arg) |
| 908 | "Restrict rectangle to lines (not) matching REGEXP. | 908 | "Restrict rectangle to lines (not) matching regexp. |
| 909 | With prefix argument, the toggle restriction." | 909 | With prefix argument, toggle restriction." |
| 910 | (interactive "P") | 910 | (interactive "P") |
| 911 | (let ((r (cua--rectangle-restriction)) regexp) | 911 | (let ((r (cua--rectangle-restriction))) |
| 912 | (if (and r (null (car (cdr r)))) | 912 | (if (and r (null (car (cdr r)))) |
| 913 | (if arg | 913 | (if arg |
| 914 | (cua--rectangle-restriction (car r) nil (not (car (cdr (cdr r))))) | 914 | (cua--rectangle-restriction (car r) nil (not (car (cdr (cdr r))))) |
| @@ -919,9 +919,9 @@ With prefix argument, the toggle restriction." | |||
| 919 | 919 | ||
| 920 | (defun cua-restrict-prefix-rectangle (arg) | 920 | (defun cua-restrict-prefix-rectangle (arg) |
| 921 | "Restrict rectangle to lines (not) starting with CHAR. | 921 | "Restrict rectangle to lines (not) starting with CHAR. |
| 922 | With prefix argument, the toggle restriction." | 922 | With prefix argument, toggle restriction." |
| 923 | (interactive "P") | 923 | (interactive "P") |
| 924 | (let ((r (cua--rectangle-restriction)) regexp) | 924 | (let ((r (cua--rectangle-restriction))) |
| 925 | (if (and r (car (cdr r))) | 925 | (if (and r (car (cdr r))) |
| 926 | (if arg | 926 | (if arg |
| 927 | (cua--rectangle-restriction (car r) t (not (car (cdr (cdr r))))) | 927 | (cua--rectangle-restriction (car r) t (not (car (cdr (cdr r))))) |
| @@ -1000,7 +1000,7 @@ The text previously in the region is not overwritten by the blanks, | |||
| 1000 | but instead winds up to the right of the rectangle." | 1000 | but instead winds up to the right of the rectangle." |
| 1001 | (interactive) | 1001 | (interactive) |
| 1002 | (cua--rectangle-operation 'corners nil t 1 nil | 1002 | (cua--rectangle-operation 'corners nil t 1 nil |
| 1003 | (lambda (s e l r) | 1003 | (lambda (_s _e l r) |
| 1004 | (skip-chars-forward " \t") | 1004 | (skip-chars-forward " \t") |
| 1005 | (let ((ws (- (current-column) l)) | 1005 | (let ((ws (- (current-column) l)) |
| 1006 | (p (point))) | 1006 | (p (point))) |
| @@ -1015,7 +1015,7 @@ at that column is deleted. | |||
| 1015 | With prefix arg, also delete whitespace to the left of that column." | 1015 | With prefix arg, also delete whitespace to the left of that column." |
| 1016 | (interactive "P") | 1016 | (interactive "P") |
| 1017 | (cua--rectangle-operation 'clear nil t 1 nil | 1017 | (cua--rectangle-operation 'clear nil t 1 nil |
| 1018 | (lambda (s e l r) | 1018 | (lambda (s _e _l _r) |
| 1019 | (when arg | 1019 | (when arg |
| 1020 | (skip-syntax-backward " " (line-beginning-position)) | 1020 | (skip-syntax-backward " " (line-beginning-position)) |
| 1021 | (setq s (point))) | 1021 | (setq s (point))) |
| @@ -1027,7 +1027,7 @@ With prefix arg, also delete whitespace to the left of that column." | |||
| 1027 | The text previously in the rectangle is overwritten by the blanks." | 1027 | The text previously in the rectangle is overwritten by the blanks." |
| 1028 | (interactive) | 1028 | (interactive) |
| 1029 | (cua--rectangle-operation 'keep nil nil 1 nil | 1029 | (cua--rectangle-operation 'keep nil nil 1 nil |
| 1030 | (lambda (s e l r) | 1030 | (lambda (s e _l _r) |
| 1031 | (goto-char e) | 1031 | (goto-char e) |
| 1032 | (skip-syntax-forward " " (line-end-position)) | 1032 | (skip-syntax-forward " " (line-end-position)) |
| 1033 | (setq e (point)) | 1033 | (setq e (point)) |
| @@ -1040,20 +1040,19 @@ The text previously in the rectangle is overwritten by the blanks." | |||
| 1040 | (defun cua-align-rectangle () | 1040 | (defun cua-align-rectangle () |
| 1041 | "Align rectangle lines to left column." | 1041 | "Align rectangle lines to left column." |
| 1042 | (interactive) | 1042 | (interactive) |
| 1043 | (let (x) | 1043 | (cua--rectangle-operation 'clear nil t t nil |
| 1044 | (cua--rectangle-operation 'clear nil t t nil | 1044 | (lambda (s _e l _r) |
| 1045 | (lambda (s e l r) | 1045 | (let ((b (line-beginning-position))) |
| 1046 | (let ((b (line-beginning-position))) | 1046 | (skip-syntax-backward "^ " b) |
| 1047 | (skip-syntax-backward "^ " b) | 1047 | (skip-syntax-backward " " b) |
| 1048 | (skip-syntax-backward " " b) | 1048 | (setq s (point))) |
| 1049 | (setq s (point))) | 1049 | (skip-syntax-forward " " (line-end-position)) |
| 1050 | (skip-syntax-forward " " (line-end-position)) | 1050 | (delete-region s (point)) |
| 1051 | (delete-region s (point)) | 1051 | (indent-to l)) |
| 1052 | (indent-to l)) | 1052 | (lambda (l _r) |
| 1053 | (lambda (l r) | 1053 | (move-to-column l) |
| 1054 | (move-to-column l) | 1054 | ;; (setq cua-save-point (point)) |
| 1055 | ;; (setq cua-save-point (point)) | 1055 | ))) |
| 1056 | )))) | ||
| 1057 | 1056 | ||
| 1058 | (declare-function cua--cut-rectangle-to-global-mark "cua-gmrk" (as-text)) | 1057 | (declare-function cua--cut-rectangle-to-global-mark "cua-gmrk" (as-text)) |
| 1059 | (declare-function cua--copy-rectangle-to-global-mark "cua-gmrk" (as-text)) | 1058 | (declare-function cua--copy-rectangle-to-global-mark "cua-gmrk" (as-text)) |
| @@ -1087,7 +1086,7 @@ The text previously in the rectangle is overwritten by the blanks." | |||
| 1087 | The length of STRING need not be the same as the rectangle width." | 1086 | The length of STRING need not be the same as the rectangle width." |
| 1088 | (interactive "sString rectangle: ") | 1087 | (interactive "sString rectangle: ") |
| 1089 | (cua--rectangle-operation 'keep nil t t nil | 1088 | (cua--rectangle-operation 'keep nil t t nil |
| 1090 | (lambda (s e l r) | 1089 | (lambda (s e l _r) |
| 1091 | (delete-region s e) | 1090 | (delete-region s e) |
| 1092 | (skip-chars-forward " \t") | 1091 | (skip-chars-forward " \t") |
| 1093 | (let ((ws (- (current-column) l))) | 1092 | (let ((ws (- (current-column) l))) |
| @@ -1095,7 +1094,7 @@ The length of STRING need not be the same as the rectangle width." | |||
| 1095 | (insert string) | 1094 | (insert string) |
| 1096 | (indent-to (+ (current-column) ws)))) | 1095 | (indent-to (+ (current-column) ws)))) |
| 1097 | (unless (cua--rectangle-restriction) | 1096 | (unless (cua--rectangle-restriction) |
| 1098 | (lambda (l r) | 1097 | (lambda (l _r) |
| 1099 | (cua--rectangle-right (max l (+ l (length string) -1))))))) | 1098 | (cua--rectangle-right (max l (+ l (length string) -1))))))) |
| 1100 | 1099 | ||
| 1101 | (defun cua-fill-char-rectangle (character) | 1100 | (defun cua-fill-char-rectangle (character) |
| @@ -1113,7 +1112,7 @@ The length of STRING need not be the same as the rectangle width." | |||
| 1113 | (if buffer-read-only | 1112 | (if buffer-read-only |
| 1114 | (message "Cannot replace in read-only buffer") | 1113 | (message "Cannot replace in read-only buffer") |
| 1115 | (cua--rectangle-operation 'keep nil t 1 nil | 1114 | (cua--rectangle-operation 'keep nil t 1 nil |
| 1116 | (lambda (s e l r) | 1115 | (lambda (_s e _l _r) |
| 1117 | (if (re-search-forward regexp e t) | 1116 | (if (re-search-forward regexp e t) |
| 1118 | (replace-match newtext nil nil)))))) | 1117 | (replace-match newtext nil nil)))))) |
| 1119 | 1118 | ||
| @@ -1121,7 +1120,7 @@ The length of STRING need not be the same as the rectangle width." | |||
| 1121 | "Increment each line of CUA rectangle by prefix amount." | 1120 | "Increment each line of CUA rectangle by prefix amount." |
| 1122 | (interactive "p") | 1121 | (interactive "p") |
| 1123 | (cua--rectangle-operation 'keep nil t 1 nil | 1122 | (cua--rectangle-operation 'keep nil t 1 nil |
| 1124 | (lambda (s e l r) | 1123 | (lambda (_s e _l _r) |
| 1125 | (cond | 1124 | (cond |
| 1126 | ((re-search-forward "0x\\([0-9a-fA-F]+\\)" e t) | 1125 | ((re-search-forward "0x\\([0-9a-fA-F]+\\)" e t) |
| 1127 | (let* ((txt (cua--filter-buffer-noprops (match-beginning 1) (match-end 1))) | 1126 | (let* ((txt (cua--filter-buffer-noprops (match-beginning 1) (match-end 1))) |
| @@ -1154,14 +1153,14 @@ The numbers are formatted according to the FORMAT string." | |||
| 1154 | (setq format cua--rectangle-seq-format) | 1153 | (setq format cua--rectangle-seq-format) |
| 1155 | (setq cua--rectangle-seq-format format)) | 1154 | (setq cua--rectangle-seq-format format)) |
| 1156 | (cua--rectangle-operation 'clear nil t 1 nil | 1155 | (cua--rectangle-operation 'clear nil t 1 nil |
| 1157 | (lambda (s e l r) | 1156 | (lambda (s e _l _r) |
| 1158 | (delete-region s e) | 1157 | (delete-region s e) |
| 1159 | (insert (format format first)) | 1158 | (insert (format format first)) |
| 1160 | (setq first (+ first incr))))) | 1159 | (setq first (+ first incr))))) |
| 1161 | 1160 | ||
| 1162 | (defmacro cua--convert-rectangle-as (command tabify) | 1161 | (defmacro cua--convert-rectangle-as (command tabify) |
| 1163 | `(cua--rectangle-operation 'clear nil nil nil ,tabify | 1162 | `(cua--rectangle-operation 'clear nil nil nil ,tabify |
| 1164 | (lambda (s e l r) | 1163 | (lambda (s e _l _r) |
| 1165 | (,command s e)))) | 1164 | (,command s e)))) |
| 1166 | 1165 | ||
| 1167 | (defun cua-upcase-rectangle () | 1166 | (defun cua-upcase-rectangle () |
| @@ -1218,7 +1217,7 @@ The numbers are formatted according to the FORMAT string." | |||
| 1218 | (if cua--debug | 1217 | (if cua--debug |
| 1219 | (print z auxbuf)) | 1218 | (print z auxbuf)) |
| 1220 | (cua--rectangle-operation nil nil t pad nil | 1219 | (cua--rectangle-operation nil nil t pad nil |
| 1221 | (lambda (s e l r) | 1220 | (lambda (s e l _r) |
| 1222 | (let (cc) | 1221 | (let (cc) |
| 1223 | (goto-char e) | 1222 | (goto-char e) |
| 1224 | (skip-chars-forward " \t") | 1223 | (skip-chars-forward " \t") |
| @@ -1249,7 +1248,7 @@ The numbers are formatted according to the FORMAT string." | |||
| 1249 | 1248 | ||
| 1250 | (put 'cua--rectangle-aux-replace 'lisp-indent-function 4) | 1249 | (put 'cua--rectangle-aux-replace 'lisp-indent-function 4) |
| 1251 | 1250 | ||
| 1252 | (defun cua--left-fill-rectangle (start end) | 1251 | (defun cua--left-fill-rectangle (_start _end) |
| 1253 | (beginning-of-line) | 1252 | (beginning-of-line) |
| 1254 | (while (< (point) (point-max)) | 1253 | (while (< (point) (point-max)) |
| 1255 | (delete-horizontal-space nil) | 1254 | (delete-horizontal-space nil) |
| @@ -1298,7 +1297,7 @@ With prefix arg, replace rectangle with output from command." | |||
| 1298 | "Remove the first line of the rectangle and scroll remaining lines up." | 1297 | "Remove the first line of the rectangle and scroll remaining lines up." |
| 1299 | (interactive) | 1298 | (interactive) |
| 1300 | (cua--rectangle-aux-replace 0 t t t t | 1299 | (cua--rectangle-aux-replace 0 t t t t |
| 1301 | (lambda (s e) | 1300 | (lambda (s _e) |
| 1302 | (if (= (forward-line 1) 0) | 1301 | (if (= (forward-line 1) 0) |
| 1303 | (delete-region s (point)))))) | 1302 | (delete-region s (point)))))) |
| 1304 | 1303 | ||
| @@ -1307,7 +1306,7 @@ With prefix arg, replace rectangle with output from command." | |||
| 1307 | The remaining lines are scrolled down, losing the last line." | 1306 | The remaining lines are scrolled down, losing the last line." |
| 1308 | (interactive) | 1307 | (interactive) |
| 1309 | (cua--rectangle-aux-replace 0 t t t t | 1308 | (cua--rectangle-aux-replace 0 t t t t |
| 1310 | (lambda (s e) | 1309 | (lambda (s _e) |
| 1311 | (goto-char s) | 1310 | (goto-char s) |
| 1312 | (insert "\n")))) | 1311 | (insert "\n")))) |
| 1313 | 1312 | ||
| @@ -1337,7 +1336,7 @@ With prefix arg, indent to that column." | |||
| 1337 | (pad (cua--rectangle-virtual-edges)) | 1336 | (pad (cua--rectangle-virtual-edges)) |
| 1338 | indent) | 1337 | indent) |
| 1339 | (cua--rectangle-operation 'corners nil t pad nil | 1338 | (cua--rectangle-operation 'corners nil t pad nil |
| 1340 | (lambda (s e l r) | 1339 | (lambda (_s _e l r) |
| 1341 | (move-to-column | 1340 | (move-to-column |
| 1342 | (if (cua--rectangle-right-side t) | 1341 | (if (cua--rectangle-right-side t) |
| 1343 | (max (1+ r) col) l) | 1342 | (max (1+ r) col) l) |
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 34aa015d7ac..06c6d42ed39 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog | |||
| @@ -1,3 +1,23 @@ | |||
| 1 | 2012-04-11 Vivek Dasmohapatra <vivek@etla.org> | ||
| 2 | |||
| 3 | * erc-services.el (erc-nickserv-passwords): Don't display the | ||
| 4 | password (bug#4459). | ||
| 5 | |||
| 6 | 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 7 | |||
| 8 | * erc-join.el (erc-server-join-channel): New function to look up | ||
| 9 | the channel password via auth-source. | ||
| 10 | (erc-autojoin-channels): Use it. | ||
| 11 | (erc-autojoin-after-ident): Ditto. | ||
| 12 | (erc-autojoin-channels-alist): Mention auth-source. | ||
| 13 | |||
| 14 | 2012-04-10 Deniz Dogan <deniz@dogan.se> (tiny change) | ||
| 15 | |||
| 16 | * erc.el (erc-display-prompt): Adds the field text property to the | ||
| 17 | ERC prompt. This allows users to use `kill-whole-line' to kill | ||
| 18 | all text back to the prompt given that it's on a single line | ||
| 19 | (bug#10841). | ||
| 20 | |||
| 1 | 2012-04-09 Chong Yidong <cyd@gnu.org> | 21 | 2012-04-09 Chong Yidong <cyd@gnu.org> |
| 2 | 22 | ||
| 3 | * erc.el (erc-cmd-SET): Call custom-variable-p instead of | 23 | * erc.el (erc-cmd-SET): Call custom-variable-p instead of |
diff --git a/lisp/erc/erc-join.el b/lisp/erc/erc-join.el index da894ba5977..85d1edf6427 100644 --- a/lisp/erc/erc-join.el +++ b/lisp/erc/erc-join.el | |||
| @@ -32,6 +32,7 @@ | |||
| 32 | ;;; Code: | 32 | ;;; Code: |
| 33 | 33 | ||
| 34 | (require 'erc) | 34 | (require 'erc) |
| 35 | (require 'auth-source) | ||
| 35 | (eval-when-compile (require 'cl)) | 36 | (eval-when-compile (require 'cl)) |
| 36 | 37 | ||
| 37 | (defgroup erc-autojoin nil | 38 | (defgroup erc-autojoin nil |
| @@ -56,6 +57,13 @@ Every element in the alist has the form (SERVER . CHANNELS). | |||
| 56 | SERVER is a regexp matching the server, and channels is the | 57 | SERVER is a regexp matching the server, and channels is the |
| 57 | list of channels to join. | 58 | list of channels to join. |
| 58 | 59 | ||
| 60 | If the channel(s) require channel keys for joining, the passwords | ||
| 61 | are found via auth-source. For instance, if you use ~/.authinfo | ||
| 62 | as your auth-source backend, then put something like the | ||
| 63 | following in that file: | ||
| 64 | |||
| 65 | machine irc.example.net login \"#fsf\" password sEcReT | ||
| 66 | |||
| 59 | Customize this variable to set the value for your first connect. | 67 | Customize this variable to set the value for your first connect. |
| 60 | Once you are connected and join and part channels, this alist | 68 | Once you are connected and join and part channels, this alist |
| 61 | keeps track of what channels you are on, and will join them | 69 | keeps track of what channels you are on, and will join them |
| @@ -131,7 +139,7 @@ This function is run from `erc-nickserv-identified-hook'." | |||
| 131 | (when (string-match (car l) server) | 139 | (when (string-match (car l) server) |
| 132 | (dolist (chan (cdr l)) | 140 | (dolist (chan (cdr l)) |
| 133 | (unless (erc-member-ignore-case chan joined) | 141 | (unless (erc-member-ignore-case chan joined) |
| 134 | (erc-server-send (concat "join " chan)))))))) | 142 | (erc-server-join-channel server chan))))))) |
| 135 | nil) | 143 | nil) |
| 136 | 144 | ||
| 137 | (defun erc-autojoin-channels (server nick) | 145 | (defun erc-autojoin-channels (server nick) |
| @@ -148,10 +156,25 @@ This function is run from `erc-nickserv-identified-hook'." | |||
| 148 | (dolist (l erc-autojoin-channels-alist) | 156 | (dolist (l erc-autojoin-channels-alist) |
| 149 | (when (string-match (car l) server) | 157 | (when (string-match (car l) server) |
| 150 | (dolist (chan (cdr l)) | 158 | (dolist (chan (cdr l)) |
| 151 | (erc-server-send (concat "join " chan)))))) | 159 | (erc-server-join-channel server chan))))) |
| 152 | ;; Return nil to avoid stomping on any other hook funcs. | 160 | ;; Return nil to avoid stomping on any other hook funcs. |
| 153 | nil) | 161 | nil) |
| 154 | 162 | ||
| 163 | (defun erc-server-join-channel (server channel) | ||
| 164 | (let* ((secret (plist-get (nth 0 (auth-source-search | ||
| 165 | :max 1 | ||
| 166 | :host server | ||
| 167 | :port "irc" | ||
| 168 | :user channel)) | ||
| 169 | :secret)) | ||
| 170 | (password (if (functionp secret) | ||
| 171 | (funcall secret) | ||
| 172 | secret))) | ||
| 173 | (erc-server-send (concat "join " channel | ||
| 174 | (if password | ||
| 175 | (concat " " password) | ||
| 176 | ""))))) | ||
| 177 | |||
| 155 | (defun erc-autojoin-add (proc parsed) | 178 | (defun erc-autojoin-add (proc parsed) |
| 156 | "Add the channel being joined to `erc-autojoin-channels-alist'." | 179 | "Add the channel being joined to `erc-autojoin-channels-alist'." |
| 157 | (let* ((chnl (erc-response.contents parsed)) | 180 | (let* ((chnl (erc-response.contents parsed)) |
diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el index 66eb341b47a..5986d81efed 100644 --- a/lisp/erc/erc-services.el +++ b/lisp/erc/erc-services.el | |||
| @@ -195,7 +195,8 @@ Example of use: | |||
| 195 | (repeat :tag "Nickname and password" | 195 | (repeat :tag "Nickname and password" |
| 196 | (cons :tag "Identity" | 196 | (cons :tag "Identity" |
| 197 | (string :tag "Nick") | 197 | (string :tag "Nick") |
| 198 | (string :tag "Password")))))) | 198 | (string :tag "Password" |
| 199 | :secret ?*)))))) | ||
| 199 | 200 | ||
| 200 | ;; Variables: | 201 | ;; Variables: |
| 201 | 202 | ||
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 62b701204d1..b79c2fd6c5e 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el | |||
| @@ -3646,6 +3646,7 @@ If FACE is non-nil, it will be used to propertize the prompt. If it is nil, | |||
| 3646 | 'start-open t ; XEmacs | 3646 | 'start-open t ; XEmacs |
| 3647 | 'rear-nonsticky t ; Emacs | 3647 | 'rear-nonsticky t ; Emacs |
| 3648 | 'erc-prompt t | 3648 | 'erc-prompt t |
| 3649 | 'field t | ||
| 3649 | 'front-sticky t | 3650 | 'front-sticky t |
| 3650 | 'read-only t)) | 3651 | 'read-only t)) |
| 3651 | (erc-put-text-property 0 (1- (length prompt)) | 3652 | (erc-put-text-property 0 (1- (length prompt)) |
diff --git a/lisp/files.el b/lisp/files.el index e623bc66080..d757e1a277c 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -2152,6 +2152,7 @@ unless NOMODES is non-nil." | |||
| 2152 | (/= (char-after (1- (point-max))) ?\n) | 2152 | (/= (char-after (1- (point-max))) ?\n) |
| 2153 | (not (and (eq selective-display t) | 2153 | (not (and (eq selective-display t) |
| 2154 | (= (char-after (1- (point-max))) ?\r))) | 2154 | (= (char-after (1- (point-max))) ?\r))) |
| 2155 | (not buffer-read-only) | ||
| 2155 | (save-excursion | 2156 | (save-excursion |
| 2156 | (goto-char (point-max)) | 2157 | (goto-char (point-max)) |
| 2157 | (insert "\n"))) | 2158 | (insert "\n"))) |
| @@ -3523,7 +3524,7 @@ LIST is a list of the form accepted by the function. | |||
| 3523 | When a file is visited, the file's class is found. A directory | 3524 | When a file is visited, the file's class is found. A directory |
| 3524 | may be assigned a class using `dir-locals-set-directory-class'. | 3525 | may be assigned a class using `dir-locals-set-directory-class'. |
| 3525 | Then variables are set in the file's buffer according to the | 3526 | Then variables are set in the file's buffer according to the |
| 3526 | class' LIST. The list is processed in order. | 3527 | VARIABLES list of the class. The list is processed in order. |
| 3527 | 3528 | ||
| 3528 | * If the element is of the form (MAJOR-MODE . ALIST), and the | 3529 | * If the element is of the form (MAJOR-MODE . ALIST), and the |
| 3529 | buffer's major mode is derived from MAJOR-MODE (as determined | 3530 | buffer's major mode is derived from MAJOR-MODE (as determined |
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 910585f21f1..2f76687983b 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -2285,10 +2285,10 @@ in which C preprocessor directives are used. e.g. `asm-mode' and | |||
| 2285 | (,(concat | 2285 | (,(concat |
| 2286 | "(" (regexp-opt | 2286 | "(" (regexp-opt |
| 2287 | '("cond" "if" "while" "while-no-input" "let" "let*" "letrec" | 2287 | '("cond" "if" "while" "while-no-input" "let" "let*" "letrec" |
| 2288 | "prog" "progn" "progv" "prog1" "prog2" "prog*" | 2288 | "pcase" "pcase-let" "pcase-let*" "prog" "progn" "progv" |
| 2289 | "inline" "lambda" "save-restriction" "save-excursion" | 2289 | "prog1" "prog2" "prog*" "inline" "lambda" |
| 2290 | "save-selected-window" "save-window-excursion" | 2290 | "save-restriction" "save-excursion" "save-selected-window" |
| 2291 | "save-match-data" "save-current-buffer" | 2291 | "save-window-excursion" "save-match-data" "save-current-buffer" |
| 2292 | "combine-after-change-calls" "unwind-protect" | 2292 | "combine-after-change-calls" "unwind-protect" |
| 2293 | "condition-case" "condition-case-unless-debug" | 2293 | "condition-case" "condition-case-unless-debug" |
| 2294 | "track-mouse" "eval-after-load" "eval-and-compile" | 2294 | "track-mouse" "eval-after-load" "eval-and-compile" |
diff --git a/lisp/frame.el b/lisp/frame.el index 1cd6c0cf181..1ee9d966ef1 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -1557,21 +1557,6 @@ left untouched. FRAME nil or omitted means use the selected frame." | |||
| 1557 | 'delete-frame-functions "22.1") | 1557 | 'delete-frame-functions "22.1") |
| 1558 | 1558 | ||
| 1559 | 1559 | ||
| 1560 | ;; Highlighting trailing whitespace. | ||
| 1561 | |||
| 1562 | (make-variable-buffer-local 'show-trailing-whitespace) | ||
| 1563 | |||
| 1564 | |||
| 1565 | ;; Scrolling | ||
| 1566 | |||
| 1567 | (defgroup scrolling nil | ||
| 1568 | "Scrolling windows." | ||
| 1569 | :version "21.1" | ||
| 1570 | :group 'frames) | ||
| 1571 | |||
| 1572 | (defvaralias 'automatic-hscrolling 'auto-hscroll-mode) | ||
| 1573 | |||
| 1574 | |||
| 1575 | ;; Blinking cursor | 1560 | ;; Blinking cursor |
| 1576 | 1561 | ||
| 1577 | (defgroup cursor nil | 1562 | (defgroup cursor nil |
| @@ -1663,6 +1648,14 @@ terminals, cursor blinking is controlled by the terminal." | |||
| 1663 | (define-key ctl-x-5-map "0" 'delete-frame) | 1648 | (define-key ctl-x-5-map "0" 'delete-frame) |
| 1664 | (define-key ctl-x-5-map "o" 'other-frame) | 1649 | (define-key ctl-x-5-map "o" 'other-frame) |
| 1665 | 1650 | ||
| 1651 | |||
| 1652 | ;; Misc. | ||
| 1653 | |||
| 1654 | ;; Only marked as obsolete in 24.2. | ||
| 1655 | (define-obsolete-variable-alias 'automatic-hscrolling 'auto-hscroll-mode "22.1") | ||
| 1656 | |||
| 1657 | (make-variable-buffer-local 'show-trailing-whitespace) | ||
| 1658 | |||
| 1666 | (provide 'frame) | 1659 | (provide 'frame) |
| 1667 | 1660 | ||
| 1668 | ;;; frame.el ends here | 1661 | ;;; frame.el ends here |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index ef0f1c5c852..52f140d9192 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,23 @@ | |||
| 1 | 2012-04-16 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * nndraft.el (nndraft-request-list): Fix declaration. | ||
| 4 | |||
| 5 | 2012-04-14 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 6 | |||
| 7 | * gnus-msg.el (gnus-inews-insert-gcc): Don't do the alist stuff when we | ||
| 8 | don't have a current group. | ||
| 9 | |||
| 10 | * gnus-msg.el (gnus-inews-insert-gcc): Protect against when we don't | ||
| 11 | have a group name. | ||
| 12 | |||
| 13 | * gnus-art.el (article-wash-html): Ensure that we insert the HTML into | ||
| 14 | a multibyte buffer (bug#7410). | ||
| 15 | (article-wash-html): Parse the original article buffer to get the | ||
| 16 | unencoded data (bug#7410). | ||
| 17 | |||
| 18 | * gnus-start.el (gnus-read-newsrc-el-file): Protect against broken | ||
| 19 | .newsrc.el files. | ||
| 20 | |||
| 1 | 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> | 21 | 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 22 | ||
| 3 | * auth-source.el (auth-source-netrc-create): Quote tokens that contain | 23 | * auth-source.el (auth-source-netrc-create): Quote tokens that contain |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 048f8956567..b04615dc5a9 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -2754,9 +2754,11 @@ If READ-CHARSET, ask for a coding system." | |||
| 2754 | (let ((handles nil) | 2754 | (let ((handles nil) |
| 2755 | (buffer-read-only nil)) | 2755 | (buffer-read-only nil)) |
| 2756 | (when (gnus-buffer-live-p gnus-original-article-buffer) | 2756 | (when (gnus-buffer-live-p gnus-original-article-buffer) |
| 2757 | (setq handles (mm-dissect-buffer t t))) | 2757 | (with-current-buffer gnus-original-article-buffer |
| 2758 | (setq handles (mm-dissect-buffer t t)))) | ||
| 2758 | (article-goto-body) | 2759 | (article-goto-body) |
| 2759 | (delete-region (point) (point-max)) | 2760 | (delete-region (point) (point-max)) |
| 2761 | (mm-enable-multibyte) | ||
| 2760 | (mm-inline-text-html handles))) | 2762 | (mm-inline-text-html handles))) |
| 2761 | 2763 | ||
| 2762 | (defvar gnus-article-browse-html-temp-list nil | 2764 | (defvar gnus-article-browse-html-temp-list nil |
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 500ace9e8ff..815bd9e44a6 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el | |||
| @@ -1664,17 +1664,19 @@ this is a reply." | |||
| 1664 | ((functionp var) | 1664 | ((functionp var) |
| 1665 | ;; A function. | 1665 | ;; A function. |
| 1666 | (funcall var group)) | 1666 | (funcall var group)) |
| 1667 | (t | 1667 | (group |
| 1668 | ;; An alist of regexps/functions/forms. | 1668 | ;; An alist of regexps/functions/forms. |
| 1669 | (while (and var | 1669 | (while (and var |
| 1670 | (not | 1670 | (not |
| 1671 | (setq result | 1671 | (setq result |
| 1672 | (cond | 1672 | (cond |
| 1673 | ((stringp (caar var)) | 1673 | ((and group |
| 1674 | (stringp (caar var))) | ||
| 1674 | ;; Regexp. | 1675 | ;; Regexp. |
| 1675 | (when (string-match (caar var) group) | 1676 | (when (string-match (caar var) group) |
| 1676 | (cdar var))) | 1677 | (cdar var))) |
| 1677 | ((functionp (car var)) | 1678 | ((and group |
| 1679 | (functionp (car var))) | ||
| 1678 | ;; Function. | 1680 | ;; Function. |
| 1679 | (funcall (car var) group)) | 1681 | (funcall (car var) group)) |
| 1680 | (t | 1682 | (t |
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index bb7dd76d590..f025960c348 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el | |||
| @@ -2442,7 +2442,9 @@ If FORCE is non-nil, the .newsrc file is read." | |||
| 2442 | (when gnus-newsrc-assoc | 2442 | (when gnus-newsrc-assoc |
| 2443 | (setq gnus-newsrc-alist gnus-newsrc-assoc)))) | 2443 | (setq gnus-newsrc-alist gnus-newsrc-assoc)))) |
| 2444 | (dolist (elem gnus-newsrc-alist) | 2444 | (dolist (elem gnus-newsrc-alist) |
| 2445 | (setcar elem (mm-string-as-unibyte (car elem)))) | 2445 | ;; Protect against broken .newsrc.el files. |
| 2446 | (when (car elem) | ||
| 2447 | (setcar elem (mm-string-as-unibyte (car elem))))) | ||
| 2446 | (gnus-make-hashtable-from-newsrc-alist) | 2448 | (gnus-make-hashtable-from-newsrc-alist) |
| 2447 | (when (file-newer-than-file-p file ding-file) | 2449 | (when (file-newer-than-file-p file ding-file) |
| 2448 | ;; Old format quick file | 2450 | ;; Old format quick file |
diff --git a/lisp/gnus/nndraft.el b/lisp/gnus/nndraft.el index 1800d0c02de..da50720ebbe 100644 --- a/lisp/gnus/nndraft.el +++ b/lisp/gnus/nndraft.el | |||
| @@ -37,7 +37,8 @@ | |||
| 37 | (require 'mm-util) | 37 | (require 'mm-util) |
| 38 | (eval-when-compile (require 'cl)) | 38 | (eval-when-compile (require 'cl)) |
| 39 | 39 | ||
| 40 | (declare-function nndraft-request-list "nnmh" (&rest args)) | 40 | ;; The nnoo-import at the end, I think. |
| 41 | (declare-function nndraft-request-list "nndraft" (&rest args) t) | ||
| 41 | 42 | ||
| 42 | (nnoo-declare nndraft | 43 | (nnoo-declare nndraft |
| 43 | nnmh) | 44 | nnmh) |
diff --git a/lisp/hexl.el b/lisp/hexl.el index 538d218e38e..bedcc6b10b9 100644 --- a/lisp/hexl.el +++ b/lisp/hexl.el | |||
| @@ -51,6 +51,14 @@ | |||
| 51 | "Edit a file in a hex dump format using the hexl filter." | 51 | "Edit a file in a hex dump format using the hexl filter." |
| 52 | :group 'data) | 52 | :group 'data) |
| 53 | 53 | ||
| 54 | (defcustom hexl-bits 16 | ||
| 55 | "The bit grouping that hexl will use." | ||
| 56 | :type '(choice (const 8 ) | ||
| 57 | (const 16) | ||
| 58 | (const 32) | ||
| 59 | (const 64)) | ||
| 60 | :group 'hexl | ||
| 61 | :version "24.2") | ||
| 54 | 62 | ||
| 55 | (defcustom hexl-program "hexl" | 63 | (defcustom hexl-program "hexl" |
| 56 | "The program that will hexlify and dehexlify its stdin. | 64 | "The program that will hexlify and dehexlify its stdin. |
| @@ -67,7 +75,9 @@ and \"-de\" when dehexlifying a buffer." | |||
| 67 | 75 | ||
| 68 | (defcustom hexl-options (format "-hex %s" hexl-iso) | 76 | (defcustom hexl-options (format "-hex %s" hexl-iso) |
| 69 | "Space separated options to `hexl-program' that suit your needs. | 77 | "Space separated options to `hexl-program' that suit your needs. |
| 70 | Quoting cannot be used, so the arguments cannot themselves contain spaces." | 78 | Quoting cannot be used, so the arguments cannot themselves contain spaces. |
| 79 | If you wish to set the `-group-by-X-bits' options, set `hexl-bits' instead, | ||
| 80 | as that will override any bit grouping options set here." | ||
| 71 | :type 'string | 81 | :type 'string |
| 72 | :group 'hexl) | 82 | :group 'hexl) |
| 73 | 83 | ||
| @@ -212,10 +222,34 @@ Quoting cannot be used, so the arguments cannot themselves contain spaces." | |||
| 212 | (2 'hexl-ascii-region t t))) | 222 | (2 'hexl-ascii-region t t))) |
| 213 | "Font lock keywords used in `hexl-mode'.") | 223 | "Font lock keywords used in `hexl-mode'.") |
| 214 | 224 | ||
| 225 | (defun hexl-rulerize (string bits) | ||
| 226 | (let ((size (/ bits 4)) (strlen (length string)) (pos 0) (ruler "")) | ||
| 227 | (while (< pos strlen) | ||
| 228 | (setq ruler (concat ruler " " (substring string pos (+ pos size)))) | ||
| 229 | (setq pos (+ pos size))) | ||
| 230 | (substring ruler 1) )) | ||
| 231 | |||
| 232 | (defvar hexl-rulers | ||
| 233 | (mapcar | ||
| 234 | (lambda (bits) | ||
| 235 | (cons bits | ||
| 236 | (concat " 87654321 " | ||
| 237 | (hexl-rulerize "00112233445566778899aabbccddeeff" bits) | ||
| 238 | " 0123456789abcdef"))) | ||
| 239 | '(8 16 32 64))) | ||
| 215 | ;; routines | 240 | ;; routines |
| 216 | 241 | ||
| 217 | (put 'hexl-mode 'mode-class 'special) | 242 | (put 'hexl-mode 'mode-class 'special) |
| 218 | 243 | ||
| 244 | ;; 10 chars for the "address: " | ||
| 245 | ;; 32 chars for the hexlified bytes | ||
| 246 | ;; 1 char for the space | ||
| 247 | ;; 16 chars for the character display | ||
| 248 | ;; X chars for the spaces (128 bits divided by the hexl-bits) | ||
| 249 | ;; 1 char for the newline. | ||
| 250 | (defun hexl-line-displen () | ||
| 251 | "The length of a hexl display line (varies with `hexl-bits')." | ||
| 252 | (+ 60 (/ 128 (or hexl-bits 16)))) | ||
| 219 | 253 | ||
| 220 | (defun hexl-mode--minor-mode-p (var) | 254 | (defun hexl-mode--minor-mode-p (var) |
| 221 | (memq var '(ruler-mode hl-line-mode))) | 255 | (memq var '(ruler-mode hl-line-mode))) |
| @@ -248,7 +282,7 @@ using the function `hexlify-buffer'. | |||
| 248 | Each line in the buffer has an \"address\" (displayed in hexadecimal) | 282 | Each line in the buffer has an \"address\" (displayed in hexadecimal) |
| 249 | representing the offset into the file that the characters on this line | 283 | representing the offset into the file that the characters on this line |
| 250 | are at and 16 characters from the file (displayed as hexadecimal | 284 | are at and 16 characters from the file (displayed as hexadecimal |
| 251 | values grouped every 16 bits) and as their ASCII values. | 285 | values grouped every `hexl-bits' bits) and as their ASCII values. |
| 252 | 286 | ||
| 253 | If any of the characters (displayed as ASCII characters) are | 287 | If any of the characters (displayed as ASCII characters) are |
| 254 | unprintable (control or meta characters) they will be replaced as | 288 | unprintable (control or meta characters) they will be replaced as |
| @@ -330,10 +364,7 @@ You can use \\[hexl-find-file] to visit a file in Hexl mode. | |||
| 330 | (hexlify-buffer) | 364 | (hexlify-buffer) |
| 331 | (restore-buffer-modified-p modified)) | 365 | (restore-buffer-modified-p modified)) |
| 332 | (set (make-local-variable 'hexl-max-address) | 366 | (set (make-local-variable 'hexl-max-address) |
| 333 | (let* ((full-lines (/ (buffer-size) 68)) | 367 | (+ (* (/ (1- (buffer-size)) (hexl-line-displen)) 16) 15)) |
| 334 | (last-line (% (buffer-size) 68)) | ||
| 335 | (last-line-bytes (% last-line 52))) | ||
| 336 | (+ last-line-bytes (* full-lines 16) -1))) | ||
| 337 | (condition-case nil | 368 | (condition-case nil |
| 338 | (hexl-goto-address original-point) | 369 | (hexl-goto-address original-point) |
| 339 | (error nil))) | 370 | (error nil))) |
| @@ -510,17 +541,20 @@ Ask the user for confirmation." | |||
| 510 | (defun hexl-current-address (&optional validate) | 541 | (defun hexl-current-address (&optional validate) |
| 511 | "Return current hexl-address." | 542 | "Return current hexl-address." |
| 512 | (interactive) | 543 | (interactive) |
| 513 | (let ((current-column (- (% (- (point) (point-min) -1) 68) 11)) | 544 | (let ((current-column |
| 545 | (- (% (- (point) (point-min) -1) (hexl-line-displen)) 11)) | ||
| 514 | (hexl-address 0)) | 546 | (hexl-address 0)) |
| 515 | (if (< current-column 0) | 547 | (if (< current-column 0) |
| 516 | (if validate | 548 | (if validate |
| 517 | (error "Point is not on a character in the file") | 549 | (error "Point is not on a character in the file") |
| 518 | (setq current-column 0))) | 550 | (setq current-column 0))) |
| 519 | (setq hexl-address | 551 | (setq hexl-address |
| 520 | (+ (* (/ (- (point) (point-min) -1) 68) 16) | 552 | (+ (* (/ (- (point) (point-min) -1) |
| 521 | (if (>= current-column 41) | 553 | (hexl-line-displen)) 16) |
| 522 | (- current-column 41) | 554 | (if (>= current-column (- (hexl-ascii-start-column) 10)) |
| 523 | (/ (- current-column (/ current-column 5)) 2)))) | 555 | (- current-column (- (hexl-ascii-start-column) 10)) |
| 556 | (/ (- current-column | ||
| 557 | (/ current-column (1+ (/ hexl-bits 4)))) 2)))) | ||
| 524 | (when (called-interactively-p 'interactive) | 558 | (when (called-interactively-p 'interactive) |
| 525 | (message "Current address is %d/0x%08x" hexl-address hexl-address)) | 559 | (message "Current address is %d/0x%08x" hexl-address hexl-address)) |
| 526 | hexl-address)) | 560 | hexl-address)) |
| @@ -531,10 +565,18 @@ This function is intended to be used as eldoc callback." | |||
| 531 | (let ((addr (hexl-current-address))) | 565 | (let ((addr (hexl-current-address))) |
| 532 | (format "Current address is %d/0x%08x" addr addr))) | 566 | (format "Current address is %d/0x%08x" addr addr))) |
| 533 | 567 | ||
| 568 | (defun hexl-ascii-start-column () | ||
| 569 | "Column at which the ascii portion of the hexl display starts." | ||
| 570 | (+ 43 (/ 128 hexl-bits))) | ||
| 571 | |||
| 534 | (defun hexl-address-to-marker (address) | 572 | (defun hexl-address-to-marker (address) |
| 535 | "Return buffer position for ADDRESS." | 573 | "Return buffer position for ADDRESS." |
| 536 | (interactive "nAddress: ") | 574 | (interactive "nAddress: ") |
| 537 | (+ (* (/ address 16) 68) 10 (point-min) (/ (* (% address 16) 5) 2))) | 575 | (let ((N (* (% address 16) 2))) |
| 576 | (+ (* (/ address 16) (hexl-line-displen)) ; hexl line no * display length | ||
| 577 | 10 ; 10 chars for the "address: " prefix | ||
| 578 | (point-min) ; base offset (point usually starts at 1, not 0) | ||
| 579 | (+ N (/ N (/ hexl-bits 4))) )) ) ; char offset into hexl display line | ||
| 538 | 580 | ||
| 539 | (defun hexl-goto-address (address) | 581 | (defun hexl-goto-address (address) |
| 540 | "Go to hexl-mode (decimal) address ADDRESS. | 582 | "Go to hexl-mode (decimal) address ADDRESS. |
| @@ -700,7 +742,7 @@ With prefix arg N, puts point N bytes of the way from the true beginning." | |||
| 700 | (defun hexl-beginning-of-line () | 742 | (defun hexl-beginning-of-line () |
| 701 | "Goto beginning of line in hexl mode." | 743 | "Goto beginning of line in hexl mode." |
| 702 | (interactive) | 744 | (interactive) |
| 703 | (goto-char (+ (* (/ (point) 68) 68) 11))) | 745 | (goto-char (+ (* (/ (point) (hexl-line-displen)) (hexl-line-displen)) 11))) |
| 704 | 746 | ||
| 705 | (defun hexl-end-of-line () | 747 | (defun hexl-end-of-line () |
| 706 | "Goto end of line in hexl mode." | 748 | "Goto end of line in hexl mode." |
| @@ -776,6 +818,17 @@ You may also type octal digits, to insert a character with that code." | |||
| 776 | 818 | ||
| 777 | ;00000000: 0011 2233 4455 6677 8899 aabb ccdd eeff 0123456789ABCDEF | 819 | ;00000000: 0011 2233 4455 6677 8899 aabb ccdd eeff 0123456789ABCDEF |
| 778 | 820 | ||
| 821 | (defun hexl-options (&optional test) | ||
| 822 | "Combine `hexl-bits' with `hexl-options', altering `hexl-options' as needed | ||
| 823 | to produce the command line options to pass to the hexl command." | ||
| 824 | (let ((opts (or test hexl-options))) | ||
| 825 | (when (memq hexl-bits '(8 16 32 64)) | ||
| 826 | (when (string-match "\\(.*\\)-group-by-[0-9]+-bits\\(.*\\)" opts) | ||
| 827 | (setq opts (concat (match-string 1 opts) | ||
| 828 | (match-string 2 opts)))) | ||
| 829 | (setq opts (format "%s -group-by-%d-bits " opts hexl-bits)) ) | ||
| 830 | opts)) | ||
| 831 | |||
| 779 | ;;;###autoload | 832 | ;;;###autoload |
| 780 | (defun hexlify-buffer () | 833 | (defun hexlify-buffer () |
| 781 | "Convert a binary buffer to hexl format. | 834 | "Convert a binary buffer to hexl format. |
| @@ -798,7 +851,7 @@ This discards the buffer's undo information." | |||
| 798 | (mapcar (lambda (s) | 851 | (mapcar (lambda (s) |
| 799 | (if (not (multibyte-string-p s)) s | 852 | (if (not (multibyte-string-p s)) s |
| 800 | (encode-coding-string s locale-coding-system))) | 853 | (encode-coding-string s locale-coding-system))) |
| 801 | (split-string hexl-options))) | 854 | (split-string (hexl-options)))) |
| 802 | (if (> (point) (hexl-address-to-marker hexl-max-address)) | 855 | (if (> (point) (hexl-address-to-marker hexl-max-address)) |
| 803 | (hexl-goto-address hexl-max-address)))) | 856 | (hexl-goto-address hexl-max-address)))) |
| 804 | 857 | ||
| @@ -815,7 +868,7 @@ This discards the buffer's undo information." | |||
| 815 | (buffer-undo-list t)) | 868 | (buffer-undo-list t)) |
| 816 | (apply 'call-process-region (point-min) (point-max) | 869 | (apply 'call-process-region (point-min) (point-max) |
| 817 | (expand-file-name hexl-program exec-directory) | 870 | (expand-file-name hexl-program exec-directory) |
| 818 | t t nil "-de" (split-string hexl-options)))) | 871 | t t nil "-de" (split-string (hexl-options))))) |
| 819 | 872 | ||
| 820 | (defun hexl-char-after-point () | 873 | (defun hexl-char-after-point () |
| 821 | "Return char for ASCII hex digits at point." | 874 | "Return char for ASCII hex digits at point." |
| @@ -911,13 +964,12 @@ CH must be a unibyte character whose value is between 0 and 255." | |||
| 911 | (error "Invalid character 0x%x -- must be in the range [0..255]" ch)) | 964 | (error "Invalid character 0x%x -- must be in the range [0..255]" ch)) |
| 912 | (let ((address (hexl-current-address t))) | 965 | (let ((address (hexl-current-address t))) |
| 913 | (while (> num 0) | 966 | (while (> num 0) |
| 914 | (let ((hex-position | 967 | (let ((hex-position (hexl-address-to-marker address)) |
| 915 | (+ (* (/ address 16) 68) | ||
| 916 | 10 (point-min) | ||
| 917 | (* 2 (% address 16)) | ||
| 918 | (/ (% address 16) 2))) | ||
| 919 | (ascii-position | 968 | (ascii-position |
| 920 | (+ (* (/ address 16) 68) 51 (point-min) (% address 16))) | 969 | (+ (* (/ address 16) (hexl-line-displen)) |
| 970 | (hexl-ascii-start-column) | ||
| 971 | (point-min) | ||
| 972 | (% address 16))) | ||
| 921 | at-ascii-position) | 973 | at-ascii-position) |
| 922 | (if (= (point) ascii-position) | 974 | (if (= (point) ascii-position) |
| 923 | (setq at-ascii-position t)) | 975 | (setq at-ascii-position t)) |
| @@ -933,7 +985,7 @@ CH must be a unibyte character whose value is between 0 and 255." | |||
| 933 | (if at-ascii-position | 985 | (if at-ascii-position |
| 934 | (progn | 986 | (progn |
| 935 | (beginning-of-line) | 987 | (beginning-of-line) |
| 936 | (forward-char 51) | 988 | (forward-char (hexl-ascii-start-column)) |
| 937 | (forward-char (% address 16))))) | 989 | (forward-char (% address 16))))) |
| 938 | (setq num (1- num))))) | 990 | (setq num (1- num))))) |
| 939 | 991 | ||
| @@ -1041,7 +1093,7 @@ This function is assumed to be used as callback function for `hl-line-mode'." | |||
| 1041 | 1093 | ||
| 1042 | (defun hexl-follow-ascii-find () | 1094 | (defun hexl-follow-ascii-find () |
| 1043 | "Find and highlight the ASCII element corresponding to current point." | 1095 | "Find and highlight the ASCII element corresponding to current point." |
| 1044 | (let ((pos (+ 51 | 1096 | (let ((pos (+ (hexl-ascii-start-column) |
| 1045 | (- (point) (current-column)) | 1097 | (- (point) (current-column)) |
| 1046 | (mod (hexl-current-address) 16)))) | 1098 | (mod (hexl-current-address) 16)))) |
| 1047 | (move-overlay hexl-ascii-overlay pos (1+ pos)) | 1099 | (move-overlay hexl-ascii-overlay pos (1+ pos)) |
| @@ -1050,7 +1102,7 @@ This function is assumed to be used as callback function for `hl-line-mode'." | |||
| 1050 | (defun hexl-mode-ruler () | 1102 | (defun hexl-mode-ruler () |
| 1051 | "Return a string ruler for hexl mode." | 1103 | "Return a string ruler for hexl mode." |
| 1052 | (let* ((highlight (mod (hexl-current-address) 16)) | 1104 | (let* ((highlight (mod (hexl-current-address) 16)) |
| 1053 | (s " 87654321 0011 2233 4455 6677 8899 aabb ccdd eeff 0123456789abcdef") | 1105 | (s (cdr (assq hexl-bits hexl-rulers))) |
| 1054 | (pos 0)) | 1106 | (pos 0)) |
| 1055 | (set-text-properties 0 (length s) nil s) | 1107 | (set-text-properties 0 (length s) nil s) |
| 1056 | ;; Turn spaces in the header into stretch specs so they work | 1108 | ;; Turn spaces in the header into stretch specs so they work |
| @@ -1062,12 +1114,12 @@ This function is assumed to be used as callback function for `hl-line-mode'." | |||
| 1062 | `(space :align-to ,(1- pos)) | 1114 | `(space :align-to ,(1- pos)) |
| 1063 | s)) | 1115 | s)) |
| 1064 | ;; Highlight the current column. | 1116 | ;; Highlight the current column. |
| 1065 | (put-text-property (+ 11 (/ (* 5 highlight) 2)) | 1117 | (let ( (offset (+ (* 2 highlight) (/ (* 8 highlight) hexl-bits))) ) |
| 1066 | (+ 13 (/ (* 5 highlight) 2)) | 1118 | (put-text-property (+ 11 offset) (+ 13 offset) 'face 'highlight s)) |
| 1067 | 'face 'highlight s) | ||
| 1068 | ;; Highlight the current ascii column | 1119 | ;; Highlight the current ascii column |
| 1069 | (put-text-property (+ 13 39 highlight) (+ 13 40 highlight) | 1120 | (put-text-property (+ (hexl-ascii-start-column) highlight 1) |
| 1070 | 'face 'highlight s) | 1121 | (+ (hexl-ascii-start-column) highlight 2) |
| 1122 | 'face 'highlight s) | ||
| 1071 | s)) | 1123 | s)) |
| 1072 | 1124 | ||
| 1073 | ;; startup stuff. | 1125 | ;; startup stuff. |
diff --git a/lisp/image.el b/lisp/image.el index be1b1ef8f48..348c208781e 100644 --- a/lisp/image.el +++ b/lisp/image.el | |||
| @@ -412,7 +412,8 @@ means display it in the right marginal area." | |||
| 412 | (prop (if (null area) image (list (list 'margin area) image)))) | 412 | (prop (if (null area) image (list (list 'margin area) image)))) |
| 413 | (put-text-property 0 (length string) 'display prop string) | 413 | (put-text-property 0 (length string) 'display prop string) |
| 414 | (overlay-put overlay 'put-image t) | 414 | (overlay-put overlay 'put-image t) |
| 415 | (overlay-put overlay 'before-string string)))) | 415 | (overlay-put overlay 'before-string string) |
| 416 | overlay))) | ||
| 416 | 417 | ||
| 417 | 418 | ||
| 418 | ;;;###autoload | 419 | ;;;###autoload |
| @@ -684,26 +685,16 @@ The minimum delay between successive frames is 0.01s." | |||
| 684 | image n count time-elapsed limit)))) | 685 | image n count time-elapsed limit)))) |
| 685 | 686 | ||
| 686 | 687 | ||
| 687 | (defcustom imagemagick-types-inhibit | 688 | (defvar imagemagick--file-regexp nil |
| 688 | '(C HTML HTM TXT PDF) | 689 | "File extension regexp for ImageMagick files, if any. |
| 689 | "ImageMagick types that should not be visited in Image mode. | 690 | This is the extension installed into `auto-mode-alist' and |
| 690 | This should be a list of symbols, each of which should be one of | 691 | `image-type-file-name-regexps' by `imagemagick-register-types'.") |
| 691 | the ImageMagick types listed in `imagemagick-types'. These image | ||
| 692 | types are not registered by `imagemagick-register-types'. | ||
| 693 | |||
| 694 | If Emacs is compiled without ImageMagick support, this variable | ||
| 695 | has no effect." | ||
| 696 | :type '(choice (const :tag "Let ImageMagick handle all types it can" nil) | ||
| 697 | (repeat symbol)) | ||
| 698 | ;; Ideally, would have a :set function that checks if we already did | ||
| 699 | ;; imagemagick-register-types, and if so undoes it, then redoes it. | ||
| 700 | :version "24.1" | ||
| 701 | :group 'image) | ||
| 702 | 692 | ||
| 703 | ;;;###autoload | 693 | ;;;###autoload |
| 704 | (defun imagemagick-register-types () | 694 | (defun imagemagick-register-types () |
| 705 | "Register file types that can be handled by ImageMagick. | 695 | "Register file types that can be handled by ImageMagick. |
| 706 | This registers the ImageMagick types listed in `imagemagick-types', | 696 | This function is called at startup, after loading the init file. |
| 697 | It registers the ImageMagick types listed in `imagemagick-types', | ||
| 707 | excluding those listed in `imagemagick-types-inhibit'. | 698 | excluding those listed in `imagemagick-types-inhibit'. |
| 708 | 699 | ||
| 709 | Registered image types are added to `auto-mode-alist', so that | 700 | Registered image types are added to `auto-mode-alist', so that |
| @@ -713,14 +704,45 @@ recognizes these files as having image type `imagemagick'. | |||
| 713 | 704 | ||
| 714 | If Emacs is compiled without ImageMagick support, do nothing." | 705 | If Emacs is compiled without ImageMagick support, do nothing." |
| 715 | (when (fboundp 'imagemagick-types) | 706 | (when (fboundp 'imagemagick-types) |
| 716 | (let ((im-types '())) | 707 | (let ((re (if (eq imagemagick-types-inhibit t) |
| 717 | (dolist (im-type (imagemagick-types)) | 708 | ;; Use a bogus regexp to inhibit matches. |
| 718 | (unless (memq im-type imagemagick-types-inhibit) | 709 | "\\'a" |
| 719 | (push (downcase (symbol-name im-type)) im-types))) | 710 | (let ((types)) |
| 720 | (let ((extension (concat "\\." (regexp-opt im-types) "\\'"))) | 711 | (dolist (type (imagemagick-types)) |
| 721 | (push (cons extension 'image-mode) auto-mode-alist) | 712 | (unless (memq type imagemagick-types-inhibit) |
| 722 | (push (cons extension 'imagemagick) | 713 | (push (downcase (symbol-name type)) types))) |
| 723 | image-type-file-name-regexps))))) | 714 | (concat "\\." (regexp-opt types) "\\'")))) |
| 715 | (ama-elt (car (member (cons imagemagick--file-regexp 'image-mode) | ||
| 716 | auto-mode-alist))) | ||
| 717 | (itfnr-elt (car (member (cons imagemagick--file-regexp 'imagemagick) | ||
| 718 | image-type-file-name-regexps)))) | ||
| 719 | (if ama-elt | ||
| 720 | (setcar ama-elt re) | ||
| 721 | (push (cons re 'image-mode) auto-mode-alist)) | ||
| 722 | (if itfnr-elt | ||
| 723 | (setcar itfnr-elt re) | ||
| 724 | (push (cons re 'imagemagick) image-type-file-name-regexps)) | ||
| 725 | (setq imagemagick--file-regexp re)))) | ||
| 726 | |||
| 727 | (defcustom imagemagick-types-inhibit | ||
| 728 | '(C HTML HTM TXT PDF) | ||
| 729 | "List of ImageMagick types that should not be treated as images. | ||
| 730 | This should be a list of symbols, each of which should be one of | ||
| 731 | the ImageMagick types listed in `imagemagick-types'. The listed | ||
| 732 | image types are not registered by `imagemagick-register-types'. | ||
| 733 | |||
| 734 | If the value is t, inhibit the use of ImageMagick for images. | ||
| 735 | |||
| 736 | If Emacs is compiled without ImageMagick support, this variable | ||
| 737 | has no effect." | ||
| 738 | :type '(choice (const :tag "Support all ImageMagick types" nil) | ||
| 739 | (const :tag "Disable all ImageMagick types" t) | ||
| 740 | (repeat symbol)) | ||
| 741 | :set (lambda (symbol value) | ||
| 742 | (set-default symbol value) | ||
| 743 | (imagemagick-register-types)) | ||
| 744 | :version "24.1" | ||
| 745 | :group 'image) | ||
| 724 | 746 | ||
| 725 | (provide 'image) | 747 | (provide 'image) |
| 726 | 748 | ||
diff --git a/lisp/imenu.el b/lisp/imenu.el index 8363956355b..12ac3540925 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el | |||
| @@ -280,13 +280,13 @@ The function in this variable is called when selecting a normal index-item.") | |||
| 280 | ;; `(and | 280 | ;; `(and |
| 281 | ;; imenu-scanning-message | 281 | ;; imenu-scanning-message |
| 282 | ;; (let ((pos ,(if relpos | 282 | ;; (let ((pos ,(if relpos |
| 283 | ;; relpos | 283 | ;; relpos |
| 284 | ;; `(imenu--relative-position ,reverse)))) | 284 | ;; `(imenu--relative-position ,reverse)))) |
| 285 | ;; (if ,(if relpos t | 285 | ;; (if ,(if relpos t |
| 286 | ;; `(> pos (+ 5 ,prevpos))) | 286 | ;; `(> pos (+ 5 ,prevpos))) |
| 287 | ;; (progn | 287 | ;; (progn |
| 288 | ;; (message imenu-scanning-message pos) | 288 | ;; (message imenu-scanning-message pos) |
| 289 | ;; (setq ,prevpos pos))))) | 289 | ;; (setq ,prevpos pos))))) |
| 290 | ) | 290 | ) |
| 291 | 291 | ||
| 292 | 292 | ||
| @@ -338,13 +338,10 @@ Don't move point." | |||
| 338 | (let ((index-alist '()) | 338 | (let ((index-alist '()) |
| 339 | (index-var-alist '()) | 339 | (index-var-alist '()) |
| 340 | (index-type-alist '()) | 340 | (index-type-alist '()) |
| 341 | (index-unknown-alist '()) | 341 | (index-unknown-alist '())) |
| 342 | prev-pos) | ||
| 343 | (goto-char (point-max)) | 342 | (goto-char (point-max)) |
| 344 | (imenu-progress-message prev-pos 0) | ||
| 345 | ;; Search for the function | 343 | ;; Search for the function |
| 346 | (while (beginning-of-defun) | 344 | (while (beginning-of-defun) |
| 347 | (imenu-progress-message prev-pos nil t) | ||
| 348 | (save-match-data | 345 | (save-match-data |
| 349 | (and (looking-at "(def") | 346 | (and (looking-at "(def") |
| 350 | (save-excursion | 347 | (save-excursion |
| @@ -371,7 +368,6 @@ Don't move point." | |||
| 371 | (forward-sexp 2) | 368 | (forward-sexp 2) |
| 372 | (push (imenu-example--name-and-position) | 369 | (push (imenu-example--name-and-position) |
| 373 | index-unknown-alist))))))) | 370 | index-unknown-alist))))))) |
| 374 | (imenu-progress-message prev-pos 100) | ||
| 375 | (and index-var-alist | 371 | (and index-var-alist |
| 376 | (push (cons "Variables" index-var-alist) | 372 | (push (cons "Variables" index-var-alist) |
| 377 | index-alist)) | 373 | index-alist)) |
| @@ -396,15 +392,13 @@ Don't move point." | |||
| 396 | 392 | ||
| 397 | (defun imenu-example--create-c-index (&optional regexp) | 393 | (defun imenu-example--create-c-index (&optional regexp) |
| 398 | (let ((index-alist '()) | 394 | (let ((index-alist '()) |
| 399 | prev-pos char) | 395 | char) |
| 400 | (goto-char (point-min)) | 396 | (goto-char (point-min)) |
| 401 | (imenu-progress-message prev-pos 0) | ||
| 402 | ;; Search for the function | 397 | ;; Search for the function |
| 403 | (save-match-data | 398 | (save-match-data |
| 404 | (while (re-search-forward | 399 | (while (re-search-forward |
| 405 | (or regexp imenu-example--function-name-regexp-c) | 400 | (or regexp imenu-example--function-name-regexp-c) |
| 406 | nil t) | 401 | nil t) |
| 407 | (imenu-progress-message prev-pos) | ||
| 408 | (backward-up-list 1) | 402 | (backward-up-list 1) |
| 409 | (save-excursion | 403 | (save-excursion |
| 410 | (goto-char (scan-sexps (point) 1)) | 404 | (goto-char (scan-sexps (point) 1)) |
| @@ -412,7 +406,6 @@ Don't move point." | |||
| 412 | ;; Skip this function name if it is a prototype declaration. | 406 | ;; Skip this function name if it is a prototype declaration. |
| 413 | (if (not (eq char ?\;)) | 407 | (if (not (eq char ?\;)) |
| 414 | (push (imenu-example--name-and-position) index-alist)))) | 408 | (push (imenu-example--name-and-position) index-alist)))) |
| 415 | (imenu-progress-message prev-pos 100) | ||
| 416 | (nreverse index-alist))) | 409 | (nreverse index-alist))) |
| 417 | (make-obsolete 'imenu-example--create-c-index "your own" "23.2") | 410 | (make-obsolete 'imenu-example--create-c-index "your own" "23.2") |
| 418 | 411 | ||
| @@ -684,22 +677,19 @@ The alternate method, which is the one most often used, is to call | |||
| 684 | (cond ((and imenu-prev-index-position-function | 677 | (cond ((and imenu-prev-index-position-function |
| 685 | imenu-extract-index-name-function) | 678 | imenu-extract-index-name-function) |
| 686 | (let ((index-alist '()) (pos (point)) | 679 | (let ((index-alist '()) (pos (point)) |
| 687 | prev-pos name) | 680 | name) |
| 688 | (goto-char (point-max)) | 681 | (goto-char (point-max)) |
| 689 | (imenu-progress-message prev-pos 0 t) | ||
| 690 | ;; Search for the function | 682 | ;; Search for the function |
| 691 | (while (funcall imenu-prev-index-position-function) | 683 | (while (funcall imenu-prev-index-position-function) |
| 692 | (when (= pos (point)) | 684 | (when (= pos (point)) |
| 693 | (error "Infinite loop at %s:%d: imenu-prev-index-position-function does not move point" (buffer-name) pos)) | 685 | (error "Infinite loop at %s:%d: imenu-prev-index-position-function does not move point" (buffer-name) pos)) |
| 694 | (setq pos (point)) | 686 | (setq pos (point)) |
| 695 | (imenu-progress-message prev-pos nil t) | ||
| 696 | (save-excursion | 687 | (save-excursion |
| 697 | (setq name (funcall imenu-extract-index-name-function))) | 688 | (setq name (funcall imenu-extract-index-name-function))) |
| 698 | (and (stringp name) | 689 | (and (stringp name) |
| 699 | ;; [ydi] updated for imenu-use-markers | 690 | ;; [ydi] updated for imenu-use-markers |
| 700 | (push (cons name (if imenu-use-markers (point-marker) (point))) | 691 | (push (cons name (if imenu-use-markers (point-marker) (point))) |
| 701 | index-alist))) | 692 | index-alist))) |
| 702 | (imenu-progress-message prev-pos 100 t) | ||
| 703 | index-alist)) | 693 | index-alist)) |
| 704 | ;; Use generic expression if possible. | 694 | ;; Use generic expression if possible. |
| 705 | ((and imenu-generic-expression) | 695 | ((and imenu-generic-expression) |
| @@ -765,7 +755,6 @@ They may also be nested index alists like: | |||
| 765 | depending on PATTERNS." | 755 | depending on PATTERNS." |
| 766 | 756 | ||
| 767 | (let ((index-alist (list 'dummy)) | 757 | (let ((index-alist (list 'dummy)) |
| 768 | prev-pos | ||
| 769 | (case-fold-search (if (or (local-variable-p 'imenu-case-fold-search) | 758 | (case-fold-search (if (or (local-variable-p 'imenu-case-fold-search) |
| 770 | (not (local-variable-p 'font-lock-defaults))) | 759 | (not (local-variable-p 'font-lock-defaults))) |
| 771 | imenu-case-fold-search | 760 | imenu-case-fold-search |
| @@ -782,7 +771,6 @@ depending on PATTERNS." | |||
| 782 | (modify-syntax-entry c (cdr syn) table)) | 771 | (modify-syntax-entry c (cdr syn) table)) |
| 783 | (car syn)))) | 772 | (car syn)))) |
| 784 | (goto-char (point-max)) | 773 | (goto-char (point-max)) |
| 785 | (imenu-progress-message prev-pos 0 t) | ||
| 786 | (unwind-protect ; for syntax table | 774 | (unwind-protect ; for syntax table |
| 787 | (save-match-data | 775 | (save-match-data |
| 788 | (set-syntax-table table) | 776 | (set-syntax-table table) |
| @@ -800,7 +788,17 @@ depending on PATTERNS." | |||
| 800 | (goto-char (point-max)) | 788 | (goto-char (point-max)) |
| 801 | (while (and (if (functionp regexp) | 789 | (while (and (if (functionp regexp) |
| 802 | (funcall regexp) | 790 | (funcall regexp) |
| 803 | (re-search-backward regexp nil t)) | 791 | (and |
| 792 | (re-search-backward regexp nil t) | ||
| 793 | ;; Do not count invisible definitions. | ||
| 794 | (let ((invis (invisible-p (point)))) | ||
| 795 | (or (not invis) | ||
| 796 | (progn | ||
| 797 | (while (and invis | ||
| 798 | (not (bobp))) | ||
| 799 | (setq invis (not (re-search-backward | ||
| 800 | regexp nil 'move)))) | ||
| 801 | (not invis)))))) | ||
| 804 | ;; Exit the loop if we get an empty match, | 802 | ;; Exit the loop if we get an empty match, |
| 805 | ;; because it means a bad regexp was specified. | 803 | ;; because it means a bad regexp was specified. |
| 806 | (not (= (match-beginning 0) (match-end 0)))) | 804 | (not (= (match-beginning 0) (match-end 0)))) |
| @@ -810,7 +808,6 @@ depending on PATTERNS." | |||
| 810 | (goto-char (match-beginning index)) | 808 | (goto-char (match-beginning index)) |
| 811 | (beginning-of-line) | 809 | (beginning-of-line) |
| 812 | (setq beg (point)) | 810 | (setq beg (point)) |
| 813 | (imenu-progress-message prev-pos nil t) | ||
| 814 | ;; Add this sort of submenu only when we've found an | 811 | ;; Add this sort of submenu only when we've found an |
| 815 | ;; item for it, avoiding empty, duff menus. | 812 | ;; item for it, avoiding empty, duff menus. |
| 816 | (unless (assoc menu-title index-alist) | 813 | (unless (assoc menu-title index-alist) |
| @@ -835,7 +832,6 @@ depending on PATTERNS." | |||
| 835 | ;; keep making progress backwards. | 832 | ;; keep making progress backwards. |
| 836 | (goto-char start)))) | 833 | (goto-char start)))) |
| 837 | (set-syntax-table old-table))) | 834 | (set-syntax-table old-table))) |
| 838 | (imenu-progress-message prev-pos 100 t) | ||
| 839 | ;; Sort each submenu by position. | 835 | ;; Sort each submenu by position. |
| 840 | ;; This is in case one submenu gets items from two different regexps. | 836 | ;; This is in case one submenu gets items from two different regexps. |
| 841 | (dolist (item index-alist) | 837 | (dolist (item index-alist) |
| @@ -963,7 +959,8 @@ See the command `imenu' for more information." | |||
| 963 | imenu-generic-expression | 959 | imenu-generic-expression |
| 964 | (not (eq imenu-create-index-function | 960 | (not (eq imenu-create-index-function |
| 965 | 'imenu-default-create-index-function))) | 961 | 'imenu-default-create-index-function))) |
| 966 | (unless (keymapp (lookup-key (current-local-map) [menu-bar index])) | 962 | (unless (and (current-local-map) |
| 963 | (keymapp (lookup-key (current-local-map) [menu-bar index]))) | ||
| 967 | (let ((newmap (make-sparse-keymap))) | 964 | (let ((newmap (make-sparse-keymap))) |
| 968 | (set-keymap-parent newmap (current-local-map)) | 965 | (set-keymap-parent newmap (current-local-map)) |
| 969 | (setq imenu--last-menubar-index-alist nil) | 966 | (setq imenu--last-menubar-index-alist nil) |
| @@ -1028,7 +1025,7 @@ to `imenu-update-menubar'.") | |||
| 1028 | (imenu item) | 1025 | (imenu item) |
| 1029 | nil)) | 1026 | nil)) |
| 1030 | 1027 | ||
| 1031 | (defun imenu-default-goto-function (name position &optional rest) | 1028 | (defun imenu-default-goto-function (_name position &optional _rest) |
| 1032 | "Move to the given position. | 1029 | "Move to the given position. |
| 1033 | 1030 | ||
| 1034 | NAME is ignored. POSITION is where to move. REST is also ignored. | 1031 | NAME is ignored. POSITION is where to move. REST is also ignored. |
diff --git a/lisp/international/characters.el b/lisp/international/characters.el index 99985fa72c7..c75ca8106ac 100644 --- a/lisp/international/characters.el +++ b/lisp/international/characters.el | |||
| @@ -577,8 +577,6 @@ with L, LRE, or LRO Unicode bidi character type.") | |||
| 577 | (setq from (+ from 2)))))) | 577 | (setq from (+ from 2)))))) |
| 578 | 578 | ||
| 579 | (set-case-syntax-pair ?Ÿ ?ÿ tbl) | 579 | (set-case-syntax-pair ?Ÿ ?ÿ tbl) |
| 580 | (set-case-syntax-pair #x189 #x256 tbl) | ||
| 581 | (set-case-syntax-pair #x18A #x257 tbl) | ||
| 582 | 580 | ||
| 583 | ;; In some languages, such as Turkish, U+0049 LATIN CAPITAL LETTER I | 581 | ;; In some languages, such as Turkish, U+0049 LATIN CAPITAL LETTER I |
| 584 | ;; and U+0131 LATIN SMALL LETTER DOTLESS I make a case pair, and so | 582 | ;; and U+0131 LATIN SMALL LETTER DOTLESS I make a case pair, and so |
| @@ -594,6 +592,8 @@ with L, LRE, or LRO Unicode bidi character type.") | |||
| 594 | 592 | ||
| 595 | (set-case-syntax-pair ?Ɓ ?ɓ tbl) | 593 | (set-case-syntax-pair ?Ɓ ?ɓ tbl) |
| 596 | (set-case-syntax-pair ?Ɔ ?ɔ tbl) | 594 | (set-case-syntax-pair ?Ɔ ?ɔ tbl) |
| 595 | (set-case-syntax-pair ?Ɖ ?ɖ tbl) | ||
| 596 | (set-case-syntax-pair ?Ɗ ?ɗ tbl) | ||
| 597 | (set-case-syntax-pair ?Ǝ ?ǝ tbl) | 597 | (set-case-syntax-pair ?Ǝ ?ǝ tbl) |
| 598 | (set-case-syntax-pair ?Ə ?ə tbl) | 598 | (set-case-syntax-pair ?Ə ?ə tbl) |
| 599 | (set-case-syntax-pair ?Ɛ ?ɛ tbl) | 599 | (set-case-syntax-pair ?Ɛ ?ɛ tbl) |
| @@ -622,6 +622,12 @@ with L, LRE, or LRO Unicode bidi character type.") | |||
| 622 | (set-case-syntax-pair ?Dz ?dz tbl) | 622 | (set-case-syntax-pair ?Dz ?dz tbl) |
| 623 | (set-case-syntax-pair ?Ƕ ?ƕ tbl) | 623 | (set-case-syntax-pair ?Ƕ ?ƕ tbl) |
| 624 | (set-case-syntax-pair ?Ƿ ?ƿ tbl) | 624 | (set-case-syntax-pair ?Ƿ ?ƿ tbl) |
| 625 | (set-case-syntax-pair ?Ⱥ ?ⱥ tbl) | ||
| 626 | (set-case-syntax-pair ?Ƚ ?ƚ tbl) | ||
| 627 | (set-case-syntax-pair ?Ⱦ ?ⱦ tbl) | ||
| 628 | (set-case-syntax-pair ?Ƀ ?ƀ tbl) | ||
| 629 | (set-case-syntax-pair ?Ʉ ?ʉ tbl) | ||
| 630 | (set-case-syntax-pair ?Ʌ ?ʌ tbl) | ||
| 625 | 631 | ||
| 626 | ;; Latin Extended Additional | 632 | ;; Latin Extended Additional |
| 627 | (modify-category-entry '(#x1e00 . #x1ef9) ?l) | 633 | (modify-category-entry '(#x1e00 . #x1ef9) ?l) |
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 6d609b67d63..02d37f86da0 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el | |||
| @@ -1834,7 +1834,11 @@ The default status is as follows: | |||
| 1834 | This sets the coding system priority and the default input method | 1834 | This sets the coding system priority and the default input method |
| 1835 | and sometimes other things. LANGUAGE-NAME should be a string | 1835 | and sometimes other things. LANGUAGE-NAME should be a string |
| 1836 | which is the name of a language environment. For example, \"Latin-1\" | 1836 | which is the name of a language environment. For example, \"Latin-1\" |
| 1837 | specifies the character set for the major languages of Western Europe." | 1837 | specifies the character set for the major languages of Western Europe. |
| 1838 | |||
| 1839 | If there is a prior value for `current-language-environment', this | ||
| 1840 | runs the hook `exit-language-environment-hook'. After setting up | ||
| 1841 | the new language environment, it runs `set-language-environment-hook'." | ||
| 1838 | (interactive (list (read-language-name | 1842 | (interactive (list (read-language-name |
| 1839 | nil | 1843 | nil |
| 1840 | "Set language environment (default English): "))) | 1844 | "Set language environment (default English): "))) |
diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 7bf15009687..1f88df52fd4 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el | |||
| @@ -1754,8 +1754,9 @@ functions, so they won't be called at all." | |||
| 1754 | :type '(repeat function)) | 1754 | :type '(repeat function)) |
| 1755 | 1755 | ||
| 1756 | (defvar set-auto-coding-for-load nil | 1756 | (defvar set-auto-coding-for-load nil |
| 1757 | "Non-nil means look for `load-coding' property instead of `coding'. | 1757 | "Non-nil means respect a \"unibyte: t\" entry in file local variables. |
| 1758 | This is used for loading and byte-compiling Emacs Lisp files.") | 1758 | Emacs binds this variable to t when loading or byte-compiling Emacs Lisp |
| 1759 | files.") | ||
| 1759 | 1760 | ||
| 1760 | (defun auto-coding-alist-lookup (filename) | 1761 | (defun auto-coding-alist-lookup (filename) |
| 1761 | "Return the coding system specified by `auto-coding-alist' for FILENAME." | 1762 | "Return the coding system specified by `auto-coding-alist' for FILENAME." |
diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 70e6d4b69cb..4d69e2fdbcb 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el | |||
| @@ -486,19 +486,15 @@ non-Quail commands." | |||
| 486 | (setq translation-keymap (copy-keymap | 486 | (setq translation-keymap (copy-keymap |
| 487 | (if simple quail-simple-translation-keymap | 487 | (if simple quail-simple-translation-keymap |
| 488 | quail-translation-keymap))) | 488 | quail-translation-keymap))) |
| 489 | (while translation-keys | 489 | (dolist (trans translation-keys) |
| 490 | (define-key translation-keymap | 490 | (define-key translation-keymap (car trans) (cdr trans)))) |
| 491 | (car (car translation-keys)) (cdr (car translation-keys))) | ||
| 492 | (setq translation-keys (cdr translation-keys)))) | ||
| 493 | (setq translation-keymap | 491 | (setq translation-keymap |
| 494 | (if simple quail-simple-translation-keymap | 492 | (if simple quail-simple-translation-keymap |
| 495 | quail-translation-keymap))) | 493 | quail-translation-keymap))) |
| 496 | (when conversion-keys | 494 | (when conversion-keys |
| 497 | (setq conversion-keymap (copy-keymap quail-conversion-keymap)) | 495 | (setq conversion-keymap (copy-keymap quail-conversion-keymap)) |
| 498 | (while conversion-keys | 496 | (dolist (conv conversion-keys) |
| 499 | (define-key conversion-keymap | 497 | (define-key conversion-keymap (car conv) (cdr conv)))) |
| 500 | (car (car conversion-keys)) (cdr (car conversion-keys))) | ||
| 501 | (setq conversion-keys (cdr conversion-keys)))) | ||
| 502 | (quail-add-package | 498 | (quail-add-package |
| 503 | (list name title (list nil) guidance (or docstring "") | 499 | (list name title (list nil) guidance (or docstring "") |
| 504 | translation-keymap | 500 | translation-keymap |
| @@ -720,12 +716,11 @@ The command `quail-set-keyboard-layout' usually sets this variable." | |||
| 720 | (setq quail-keyboard-layout-substitution subst-list) | 716 | (setq quail-keyboard-layout-substitution subst-list) |
| 721 | ;; If there are additional key locations, map them to missing | 717 | ;; If there are additional key locations, map them to missing |
| 722 | ;; key locations. | 718 | ;; key locations. |
| 723 | (while missing-list | 719 | (dolist (missing missing-list) |
| 724 | (while (and subst-list (cdr (car subst-list))) | 720 | (while (and subst-list (cdr (car subst-list))) |
| 725 | (setq subst-list (cdr subst-list))) | 721 | (setq subst-list (cdr subst-list))) |
| 726 | (if subst-list | 722 | (if subst-list |
| 727 | (setcdr (car subst-list) (car missing-list))) | 723 | (setcdr (car subst-list) missing)))))) |
| 728 | (setq missing-list (cdr missing-list)))))) | ||
| 729 | 724 | ||
| 730 | (defcustom quail-keyboard-layout-type "standard" | 725 | (defcustom quail-keyboard-layout-type "standard" |
| 731 | "Type of keyboard layout used in Quail base input method. | 726 | "Type of keyboard layout used in Quail base input method. |
| @@ -806,9 +801,10 @@ The format of KBD-LAYOUT is the same as `quail-keyboard-layout'." | |||
| 806 | (if translation | 801 | (if translation |
| 807 | (progn | 802 | (progn |
| 808 | (if (consp translation) | 803 | (if (consp translation) |
| 809 | (if (> (length (cdr translation)) 0) | 804 | (setq translation |
| 810 | (setq translation (aref (cdr translation) 0)) | 805 | (if (> (length (cdr translation)) 0) |
| 811 | (setq translation " "))) | 806 | (aref (cdr translation) 0) |
| 807 | " "))) | ||
| 812 | (setq done-list (cons translation done-list))) | 808 | (setq done-list (cons translation done-list))) |
| 813 | (setq translation (aref kbd-layout i))) | 809 | (setq translation (aref kbd-layout i))) |
| 814 | (aset layout i translation)) | 810 | (aset layout i translation)) |
| @@ -834,17 +830,19 @@ The format of KBD-LAYOUT is the same as `quail-keyboard-layout'." | |||
| 834 | (if (< (if (stringp lower) (string-width lower) (char-width lower)) 2) | 830 | (if (< (if (stringp lower) (string-width lower) (char-width lower)) 2) |
| 835 | (insert " ")) | 831 | (insert " ")) |
| 836 | (if (characterp lower) | 832 | (if (characterp lower) |
| 837 | (if (eq (get-char-code-property lower 'general-category) 'Mn) | 833 | (setq lower |
| 838 | ;; Pad the left and right of non-spacing characters. | 834 | (if (eq (get-char-code-property lower 'general-category) 'Mn) |
| 839 | (setq lower (compose-string (string lower) 0 1 | 835 | ;; Pad the left and right of non-spacing characters. |
| 840 | (format "\t%c\t" lower))) | 836 | (compose-string (string lower) 0 1 |
| 841 | (setq lower (string lower)))) | 837 | (format "\t%c\t" lower)) |
| 838 | (string lower)))) | ||
| 842 | (if (characterp upper) | 839 | (if (characterp upper) |
| 843 | (if (eq (get-char-code-property upper 'general-category) 'Mn) | 840 | (setq upper |
| 844 | ;; Pad the left and right of non-spacing characters. | 841 | (if (eq (get-char-code-property upper 'general-category) 'Mn) |
| 845 | (setq upper (compose-string (string upper) 0 1 | 842 | ;; Pad the left and right of non-spacing characters. |
| 846 | (format "\t%c\t" upper))) | 843 | (compose-string (string upper) 0 1 |
| 847 | (setq upper (string upper)))) | 844 | (format "\t%c\t" upper)) |
| 845 | (string upper)))) | ||
| 848 | (insert (bidi-string-mark-left-to-right lower) | 846 | (insert (bidi-string-mark-left-to-right lower) |
| 849 | (propertize " " 'invisible t) | 847 | (propertize " " 'invisible t) |
| 850 | (bidi-string-mark-left-to-right upper)) | 848 | (bidi-string-mark-left-to-right upper)) |
| @@ -1032,8 +1030,8 @@ the following annotation types are supported. | |||
| 1032 | (let ((map (list nil)) | 1030 | (let ((map (list nil)) |
| 1033 | (decode-map (if (not no-decode-map) (list 'decode-map))) | 1031 | (decode-map (if (not no-decode-map) (list 'decode-map))) |
| 1034 | key trans) | 1032 | key trans) |
| 1035 | (while l | 1033 | (dolist (el l) |
| 1036 | (setq key (car (car l)) trans (car (cdr (car l))) l (cdr l)) | 1034 | (setq key (car el) trans (car (cdr el))) |
| 1037 | (quail-defrule-internal key trans map t decode-map props)) | 1035 | (quail-defrule-internal key trans map t decode-map props)) |
| 1038 | `(if (prog1 (quail-decode-map) | 1036 | `(if (prog1 (quail-decode-map) |
| 1039 | (quail-install-map ',map)) | 1037 | (quail-install-map ',map)) |
| @@ -1201,7 +1199,7 @@ function `quail-define-rules' for the detail." | |||
| 1201 | (if (stringp trans) | 1199 | (if (stringp trans) |
| 1202 | (setq trans (string-to-vector trans)))) | 1200 | (setq trans (string-to-vector trans)))) |
| 1203 | (let ((new (quail-vunion prevchars trans))) | 1201 | (let ((new (quail-vunion prevchars trans))) |
| 1204 | (setq trans | 1202 | (setq trans |
| 1205 | (if (equal new prevchars) | 1203 | (if (equal new prevchars) |
| 1206 | ;; Nothing to change, get back to orig value. | 1204 | ;; Nothing to change, get back to orig value. |
| 1207 | prev | 1205 | prev |
| @@ -1215,10 +1213,8 @@ where VECTOR is a vector of candidates (character or string) for | |||
| 1215 | the translation, and INDEX points into VECTOR to specify the currently | 1213 | the translation, and INDEX points into VECTOR to specify the currently |
| 1216 | selected translation." | 1214 | selected translation." |
| 1217 | (if (and def (symbolp def)) | 1215 | (if (and def (symbolp def)) |
| 1218 | (if (functionp def) | 1216 | ;; DEF is a symbol of a function which returns valid translation. |
| 1219 | ;; DEF is a symbol of a function which returns valid translation. | 1217 | (setq def (if (functionp def) (funcall def key len)))) |
| 1220 | (setq def (funcall def key len)) | ||
| 1221 | (setq def nil))) | ||
| 1222 | (if (and (consp def) (not (vectorp (cdr def)))) | 1218 | (if (and (consp def) (not (vectorp (cdr def)))) |
| 1223 | (setq def (car def))) | 1219 | (setq def (car def))) |
| 1224 | 1220 | ||
diff --git a/lisp/language/european.el b/lisp/language/european.el index b658f93d90f..259c06755a0 100644 --- a/lisp/language/european.el +++ b/lisp/language/european.el | |||
| @@ -324,6 +324,14 @@ Latin-9 is sometimes nicknamed `Latin-0'.")) | |||
| 324 | :mime-charset 'windows-1257) | 324 | :mime-charset 'windows-1257) |
| 325 | (define-coding-system-alias 'cp1257 'windows-1257) | 325 | (define-coding-system-alias 'cp1257 'windows-1257) |
| 326 | 326 | ||
| 327 | (define-coding-system 'cp775 | ||
| 328 | "DOS codepage 775 (PC Baltic, MS-DOS Baltic Rim)" | ||
| 329 | :coding-type 'charset | ||
| 330 | :mnemonic ?D | ||
| 331 | :charset-list '(cp775) | ||
| 332 | :mime-charset 'cp775) | ||
| 333 | (define-coding-system-alias 'ibm775 'cp775) | ||
| 334 | |||
| 327 | (define-coding-system 'cp850 | 335 | (define-coding-system 'cp850 |
| 328 | "DOS codepage 850 (Western European)" | 336 | "DOS codepage 850 (Western European)" |
| 329 | :coding-type 'charset | 337 | :coding-type 'charset |
diff --git a/lisp/loadup.el b/lisp/loadup.el index 2ba24c8fe37..f7ffa27a9ed 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el | |||
| @@ -193,6 +193,8 @@ | |||
| 193 | (if (fboundp 'x-create-frame) | 193 | (if (fboundp 'x-create-frame) |
| 194 | (progn | 194 | (progn |
| 195 | (load "fringe") | 195 | (load "fringe") |
| 196 | ;; Needed by `imagemagick-register-types' | ||
| 197 | (load "emacs-lisp/regexp-opt") | ||
| 196 | (load "image") | 198 | (load "image") |
| 197 | (load "international/fontset") | 199 | (load "international/fontset") |
| 198 | (load "dnd") | 200 | (load "dnd") |
diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el index 4e76e5cdb64..f35560841e2 100644 --- a/lisp/mail/feedmail.el +++ b/lisp/mail/feedmail.el | |||
| @@ -1586,7 +1586,7 @@ messages to make sure it works as expected." | |||
| 1586 | 1586 | ||
| 1587 | 1587 | ||
| 1588 | ;; feedmail-buffer-to-binmail, feedmail-buffer-to-sendmail, and | 1588 | ;; feedmail-buffer-to-binmail, feedmail-buffer-to-sendmail, and |
| 1589 | ;; feedmail-buffer-to-smptmail are the only things provided for values | 1589 | ;; feedmail-buffer-to-smtpmail are the only things provided for values |
| 1590 | ;; for the variable feedmail-buffer-eating-function. It's pretty easy | 1590 | ;; for the variable feedmail-buffer-eating-function. It's pretty easy |
| 1591 | ;; to write your own, though. | 1591 | ;; to write your own, though. |
| 1592 | (defun feedmail-buffer-to-binmail (prepped errors-to addr-listoid) | 1592 | (defun feedmail-buffer-to-binmail (prepped errors-to addr-listoid) |
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 093050229c4..d2b9890805c 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -40,6 +40,9 @@ | |||
| 40 | (require 'mail-utils) | 40 | (require 'mail-utils) |
| 41 | (require 'rfc2047) | 41 | (require 'rfc2047) |
| 42 | 42 | ||
| 43 | (declare-function compilation--message->loc "compile" (cl-x) t) | ||
| 44 | (declare-function epa--find-coding-system-for-mime-charset "epa" (mime-charset)) | ||
| 45 | |||
| 43 | (defconst rmail-attribute-header "X-RMAIL-ATTRIBUTES" | 46 | (defconst rmail-attribute-header "X-RMAIL-ATTRIBUTES" |
| 44 | "The header that stores the Rmail attribute data.") | 47 | "The header that stores the Rmail attribute data.") |
| 45 | 48 | ||
| @@ -3560,6 +3563,16 @@ does not pop any summary buffer." | |||
| 3560 | 3563 | ||
| 3561 | ;;;; *** Rmail Mailing Commands *** | 3564 | ;;;; *** Rmail Mailing Commands *** |
| 3562 | 3565 | ||
| 3566 | (defun rmail-yank-current-message (buffer) | ||
| 3567 | "Yank into the current buffer the current message of Rmail buffer BUFFER. | ||
| 3568 | If BUFFER is swapped with its message viewer buffer, yank out of BUFFER. | ||
| 3569 | If BUFFER is not swapped, yank out of its message viewer buffer." | ||
| 3570 | (with-current-buffer buffer | ||
| 3571 | (unless (rmail-buffers-swapped-p) | ||
| 3572 | (setq buffer rmail-view-buffer))) | ||
| 3573 | (insert-buffer buffer)) | ||
| 3574 | |||
| 3575 | |||
| 3563 | (defun rmail-start-mail (&optional noerase to subject in-reply-to cc | 3576 | (defun rmail-start-mail (&optional noerase to subject in-reply-to cc |
| 3564 | replybuffer sendactions same-window | 3577 | replybuffer sendactions same-window |
| 3565 | other-headers) | 3578 | other-headers) |
| @@ -3571,7 +3584,8 @@ does not pop any summary buffer." | |||
| 3571 | (if replybuffer | 3584 | (if replybuffer |
| 3572 | ;; The function used here must behave like insert-buffer wrt | 3585 | ;; The function used here must behave like insert-buffer wrt |
| 3573 | ;; point and mark (see doc of sc-cite-original). | 3586 | ;; point and mark (see doc of sc-cite-original). |
| 3574 | (setq yank-action (list 'insert-buffer replybuffer))) | 3587 | (setq yank-action |
| 3588 | `(rmail-yank-current-message ,replybuffer))) | ||
| 3575 | (push (cons "cc" cc) other-headers) | 3589 | (push (cons "cc" cc) other-headers) |
| 3576 | (push (cons "in-reply-to" in-reply-to) other-headers) | 3590 | (push (cons "in-reply-to" in-reply-to) other-headers) |
| 3577 | (setq other-headers | 3591 | (setq other-headers |
| @@ -3587,7 +3601,7 @@ does not pop any summary buffer." | |||
| 3587 | (prog1 | 3601 | (prog1 |
| 3588 | (compose-mail to subject other-headers noerase | 3602 | (compose-mail to subject other-headers noerase |
| 3589 | switch-function yank-action sendactions | 3603 | switch-function yank-action sendactions |
| 3590 | `(rmail-mail-return ,replybuffer)) | 3604 | (if replybuffer `(rmail-mail-return ,replybuffer))) |
| 3591 | (if (eq switch-function 'switch-to-buffer-other-frame) | 3605 | (if (eq switch-function 'switch-to-buffer-other-frame) |
| 3592 | ;; This is not a standard frame parameter; nothing except | 3606 | ;; This is not a standard frame parameter; nothing except |
| 3593 | ;; sendmail.el looks at it. | 3607 | ;; sendmail.el looks at it. |
| @@ -3644,7 +3658,7 @@ to switch to." | |||
| 3644 | While composing the message, use \\[mail-yank-original] to yank the | 3658 | While composing the message, use \\[mail-yank-original] to yank the |
| 3645 | original message into it." | 3659 | original message into it." |
| 3646 | (interactive) | 3660 | (interactive) |
| 3647 | (rmail-start-mail nil nil nil nil nil rmail-view-buffer)) | 3661 | (rmail-start-mail nil nil nil nil nil rmail-buffer)) |
| 3648 | 3662 | ||
| 3649 | ;; FIXME should complain if there is nothing to continue. | 3663 | ;; FIXME should complain if there is nothing to continue. |
| 3650 | (defun rmail-continue () | 3664 | (defun rmail-continue () |
| @@ -3731,9 +3745,7 @@ use \\[mail-yank-original] to yank the original message into it." | |||
| 3731 | (mail-strip-quoted-names | 3745 | (mail-strip-quoted-names |
| 3732 | (if (null cc) to (concat to ", " cc)))))) | 3746 | (if (null cc) to (concat to ", " cc)))))) |
| 3733 | (if (string= cc-list "") nil cc-list))) | 3747 | (if (string= cc-list "") nil cc-list))) |
| 3734 | (if (rmail-buffers-swapped-p) | 3748 | rmail-buffer |
| 3735 | rmail-buffer | ||
| 3736 | rmail-view-buffer) | ||
| 3737 | (list (list 'rmail-mark-message | 3749 | (list (list 'rmail-mark-message |
| 3738 | rmail-buffer | 3750 | rmail-buffer |
| 3739 | (with-current-buffer rmail-buffer | 3751 | (with-current-buffer rmail-buffer |
| @@ -3835,7 +3847,7 @@ see the documentation of `rmail-resend'." | |||
| 3835 | (or (mail-fetch-field "Subject") "") | 3847 | (or (mail-fetch-field "Subject") "") |
| 3836 | "]"))) | 3848 | "]"))) |
| 3837 | (if (rmail-start-mail | 3849 | (if (rmail-start-mail |
| 3838 | nil nil subject nil nil nil | 3850 | nil nil subject nil nil rmail-buffer |
| 3839 | (list (list 'rmail-mark-message | 3851 | (list (list 'rmail-mark-message |
| 3840 | forward-buffer | 3852 | forward-buffer |
| 3841 | (with-current-buffer rmail-buffer | 3853 | (with-current-buffer rmail-buffer |
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index f8958a691b2..cd3862985bd 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el | |||
| @@ -856,15 +856,17 @@ Prefix arg means don't delete this window." | |||
| 856 | (defun mail-bury (&optional arg) | 856 | (defun mail-bury (&optional arg) |
| 857 | "Bury this mail buffer." | 857 | "Bury this mail buffer." |
| 858 | (let ((newbuf (other-buffer (current-buffer))) | 858 | (let ((newbuf (other-buffer (current-buffer))) |
| 859 | (return-action mail-return-action) | 859 | (return-action mail-return-action)) |
| 860 | some-rmail) | ||
| 861 | (bury-buffer (current-buffer)) | 860 | (bury-buffer (current-buffer)) |
| 862 | ;; If there is an Rmail buffer, return to it nicely | 861 | ;; If there is an Rmail buffer, return to it nicely |
| 863 | ;; even if this message was not started by an Rmail command. | 862 | ;; even if this message was not started by an Rmail command. |
| 864 | (unless return-action | 863 | (unless return-action |
| 865 | (dolist (buffer (buffer-list)) | 864 | (dolist (buffer (buffer-list)) |
| 866 | (if (eq (buffer-local-value 'major-mode buffer) 'rmail-mode) | 865 | (if (and (eq (buffer-local-value 'major-mode buffer) 'rmail-mode) |
| 867 | (setq return-action `(rmail-mail-return ,newbuf))))) | 866 | (null return-action) |
| 867 | ;; Don't match message-viewer buffer. | ||
| 868 | (not (string-match "\\` " (buffer-name buffer)))) | ||
| 869 | (setq return-action `(rmail-mail-return ,buffer))))) | ||
| 868 | (if (and (null arg) return-action) | 870 | (if (and (null arg) return-action) |
| 869 | (apply (car return-action) (cdr return-action)) | 871 | (apply (car return-action) (cdr return-action)) |
| 870 | (switch-to-buffer newbuf)))) | 872 | (switch-to-buffer newbuf)))) |
diff --git a/lisp/mail/unrmail.el b/lisp/mail/unrmail.el index af16bbf8c73..bf7b9abe2c1 100644 --- a/lisp/mail/unrmail.el +++ b/lisp/mail/unrmail.el | |||
| @@ -61,8 +61,7 @@ For example, invoke `emacs -batch -f batch-unrmail RMAIL'." | |||
| 61 | (error "This file is not in Babyl format")) | 61 | (error "This file is not in Babyl format")) |
| 62 | 62 | ||
| 63 | ;; Decode the file contents just as Rmail did. | 63 | ;; Decode the file contents just as Rmail did. |
| 64 | (let ((modifiedp (buffer-modified-p)) | 64 | (let ((coding-system rmail-file-coding-system) |
| 65 | (coding-system rmail-file-coding-system) | ||
| 66 | from to) | 65 | from to) |
| 67 | (goto-char (point-min)) | 66 | (goto-char (point-min)) |
| 68 | (search-forward "\n\^_" nil t) ; Skip BABYL header. | 67 | (search-forward "\n\^_" nil t) ; Skip BABYL header. |
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 2c3d0dc3803..f98b4a7490e 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-04-21 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * mh-folder.el (top): Check whether which-func-modes is t before | ||
| 4 | adding mh-folder-mode. | ||
| 5 | |||
| 1 | 2011-11-20 Bill Wohler <wohler@newt.com> | 6 | 2011-11-20 Bill Wohler <wohler@newt.com> |
| 2 | 7 | ||
| 3 | * Release MH-E version 8.3.1. | 8 | * Release MH-E version 8.3.1. |
diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el index 71ef87385ca..d9e6c74f3f3 100644 --- a/lisp/mh-e/mh-folder.el +++ b/lisp/mh-e/mh-folder.el | |||
| @@ -520,7 +520,7 @@ font-lock is done highlighting.") | |||
| 520 | 520 | ||
| 521 | ;; Register mh-folder-mode as supporting which-function-mode... | 521 | ;; Register mh-folder-mode as supporting which-function-mode... |
| 522 | (mh-require 'which-func nil t) | 522 | (mh-require 'which-func nil t) |
| 523 | (when (boundp 'which-func-modes) | 523 | (when (and (boundp 'which-func-modes) (listp which-func-modes)) |
| 524 | (add-to-list 'which-func-modes 'mh-folder-mode)) | 524 | (add-to-list 'which-func-modes 'mh-folder-mode)) |
| 525 | 525 | ||
| 526 | ;; Shush compiler. | 526 | ;; Shush compiler. |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index bcc6a808d22..5a990f6ab35 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -1506,7 +1506,7 @@ exit." | |||
| 1506 | (let ((map (make-sparse-keymap))) | 1506 | (let ((map (make-sparse-keymap))) |
| 1507 | ;; FIXME: Only works if completion-in-region-mode was activated via | 1507 | ;; FIXME: Only works if completion-in-region-mode was activated via |
| 1508 | ;; completion-at-point called directly. | 1508 | ;; completion-at-point called directly. |
| 1509 | (define-key map "?" 'completion-help-at-point) | 1509 | (define-key map "\M-?" 'completion-help-at-point) |
| 1510 | (define-key map "\t" 'completion-at-point) | 1510 | (define-key map "\t" 'completion-at-point) |
| 1511 | map) | 1511 | map) |
| 1512 | "Keymap activated during `completion-in-region'.") | 1512 | "Keymap activated during `completion-in-region'.") |
| @@ -1817,6 +1817,12 @@ same as `substitute-in-file-name'." | |||
| 1817 | (condition-case nil | 1817 | (condition-case nil |
| 1818 | (cond | 1818 | (cond |
| 1819 | ((eq action 'metadata) '(metadata (category . file))) | 1819 | ((eq action 'metadata) '(metadata (category . file))) |
| 1820 | ((string-match-p "\\`~[^/\\]*\\'" string) | ||
| 1821 | (completion-table-with-context "~" | ||
| 1822 | (mapcar (lambda (u) (concat u "/")) | ||
| 1823 | (system-users)) | ||
| 1824 | (substring string 1) | ||
| 1825 | pred action)) | ||
| 1820 | ((eq (car-safe action) 'boundaries) | 1826 | ((eq (car-safe action) 'boundaries) |
| 1821 | (let ((start (length (file-name-directory string))) | 1827 | (let ((start (length (file-name-directory string))) |
| 1822 | (end (string-match-p "/" (cdr action)))) | 1828 | (end (string-match-p "/" (cdr action)))) |
| @@ -2045,6 +2051,21 @@ and `read-file-name-function'." | |||
| 2045 | (funcall (or read-file-name-function #'read-file-name-default) | 2051 | (funcall (or read-file-name-function #'read-file-name-default) |
| 2046 | prompt dir default-filename mustmatch initial predicate)) | 2052 | prompt dir default-filename mustmatch initial predicate)) |
| 2047 | 2053 | ||
| 2054 | (defvar minibuffer-local-filename-syntax | ||
| 2055 | (let ((table (make-syntax-table)) | ||
| 2056 | (punctuation (car (string-to-syntax ".")))) | ||
| 2057 | ;; Convert all punctuation entries to symbol. | ||
| 2058 | (map-char-table (lambda (c syntax) | ||
| 2059 | (when (eq (car syntax) punctuation) | ||
| 2060 | (modify-syntax-entry c "_" table))) | ||
| 2061 | table) | ||
| 2062 | (mapc | ||
| 2063 | (lambda (c) | ||
| 2064 | (modify-syntax-entry c "." table)) | ||
| 2065 | '(?/ ?: ?\\)) | ||
| 2066 | table) | ||
| 2067 | "Syntax table to be used in minibuffer for reading file name.") | ||
| 2068 | |||
| 2048 | ;; minibuffer-completing-file-name is a variable used internally in minibuf.c | 2069 | ;; minibuffer-completing-file-name is a variable used internally in minibuf.c |
| 2049 | ;; to determine whether to use minibuffer-local-filename-completion-map or | 2070 | ;; to determine whether to use minibuffer-local-filename-completion-map or |
| 2050 | ;; minibuffer-local-completion-map. It shouldn't be exported to Elisp. | 2071 | ;; minibuffer-local-completion-map. It shouldn't be exported to Elisp. |
| @@ -2113,7 +2134,8 @@ See `read-file-name' for the meaning of the arguments." | |||
| 2113 | (lambda () | 2134 | (lambda () |
| 2114 | (with-current-buffer | 2135 | (with-current-buffer |
| 2115 | (window-buffer (minibuffer-selected-window)) | 2136 | (window-buffer (minibuffer-selected-window)) |
| 2116 | (read-file-name--defaults dir initial))))) | 2137 | (read-file-name--defaults dir initial)))) |
| 2138 | (set-syntax-table minibuffer-local-filename-syntax)) | ||
| 2117 | (completing-read prompt 'read-file-name-internal | 2139 | (completing-read prompt 'read-file-name-internal |
| 2118 | pred mustmatch insdef | 2140 | pred mustmatch insdef |
| 2119 | 'file-name-history default-filename))) | 2141 | 'file-name-history default-filename))) |
diff --git a/lisp/misc.el b/lisp/misc.el index 4706c918db3..cb52ecbd36e 100644 --- a/lisp/misc.el +++ b/lisp/misc.el | |||
| @@ -138,6 +138,19 @@ variation of `C-x M-c M-butterfly' from url `http://xkcd.com/378/'." | |||
| 138 | (defvar list-dynamic-libraries--loaded-only-p) | 138 | (defvar list-dynamic-libraries--loaded-only-p) |
| 139 | (make-variable-buffer-local 'list-dynamic-libraries--loaded-only-p) | 139 | (make-variable-buffer-local 'list-dynamic-libraries--loaded-only-p) |
| 140 | 140 | ||
| 141 | (defun list-dynamic-libraries--loaded (from) | ||
| 142 | "Compute the \"Loaded from\" column. | ||
| 143 | Internal use only." | ||
| 144 | (if from | ||
| 145 | (let ((name (car from)) | ||
| 146 | (path (or (cdr from) "<unknown>"))) | ||
| 147 | ;; This is a roundabout way to change the tooltip without | ||
| 148 | ;; having to replace the default printer function | ||
| 149 | (propertize name | ||
| 150 | 'display (propertize name | ||
| 151 | 'help-echo (concat "Loaded from: " path)))) | ||
| 152 | "")) | ||
| 153 | |||
| 141 | (defun list-dynamic-libraries--refresh () | 154 | (defun list-dynamic-libraries--refresh () |
| 142 | "Recompute the list of dynamic libraries. | 155 | "Recompute the list of dynamic libraries. |
| 143 | Internal use only." | 156 | Internal use only." |
| @@ -159,7 +172,7 @@ Internal use only." | |||
| 159 | (when (or from | 172 | (when (or from |
| 160 | (not list-dynamic-libraries--loaded-only-p)) | 173 | (not list-dynamic-libraries--loaded-only-p)) |
| 161 | (push (list id (vector (symbol-name id) | 174 | (push (list id (vector (symbol-name id) |
| 162 | (or from "") | 175 | (list-dynamic-libraries--loaded from) |
| 163 | (mapconcat 'identity (cdr lib) ", "))) | 176 | (mapconcat 'identity (cdr lib) ", "))) |
| 164 | tabulated-list-entries))))) | 177 | tabulated-list-entries))))) |
| 165 | 178 | ||
diff --git a/lisp/mouse.el b/lisp/mouse.el index 2e119483797..8e08f89f22c 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; mouse.el --- window system-independent mouse support | 1 | ;;; mouse.el --- window system-independent mouse support |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1993-1995, 1999-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1993-1995, 1999-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Maintainer: FSF | 5 | ;; Maintainer: FSF |
| 6 | ;; Keywords: hardware, mouse | 6 | ;; Keywords: hardware, mouse |
| @@ -194,8 +194,7 @@ items `Turn Off' and `Help'." | |||
| 194 | (newmap (if ancestor | 194 | (newmap (if ancestor |
| 195 | (make-sparse-keymap (concat (format-mode-line mode-name) | 195 | (make-sparse-keymap (concat (format-mode-line mode-name) |
| 196 | " Mode")) | 196 | " Mode")) |
| 197 | menu-bar-edit-menu)) | 197 | menu-bar-edit-menu))) |
| 198 | uniq) | ||
| 199 | (if ancestor | 198 | (if ancestor |
| 200 | (set-keymap-parent newmap ancestor)) | 199 | (set-keymap-parent newmap ancestor)) |
| 201 | newmap)) | 200 | newmap)) |
| @@ -805,8 +804,8 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by | |||
| 805 | (= click-count 1))) | 804 | (= click-count 1))) |
| 806 | ;; Suppress automatic hscrolling, because that is a nuisance | 805 | ;; Suppress automatic hscrolling, because that is a nuisance |
| 807 | ;; when setting point near the right fringe (but see below). | 806 | ;; when setting point near the right fringe (but see below). |
| 808 | (automatic-hscrolling-saved automatic-hscrolling) | 807 | (auto-hscroll-mode-saved auto-hscroll-mode) |
| 809 | (automatic-hscrolling nil) | 808 | (auto-hscroll-mode nil) |
| 810 | event end end-point) | 809 | event end end-point) |
| 811 | 810 | ||
| 812 | (setq mouse-selection-click-count click-count) | 811 | (setq mouse-selection-click-count click-count) |
| @@ -838,7 +837,7 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by | |||
| 838 | ;; Automatic hscrolling did not occur during the call to | 837 | ;; Automatic hscrolling did not occur during the call to |
| 839 | ;; `read-event'; but if the user subsequently drags the | 838 | ;; `read-event'; but if the user subsequently drags the |
| 840 | ;; mouse, go ahead and hscroll. | 839 | ;; mouse, go ahead and hscroll. |
| 841 | (let ((automatic-hscrolling automatic-hscrolling-saved)) | 840 | (let ((auto-hscroll-mode auto-hscroll-mode-saved)) |
| 842 | (redisplay)) | 841 | (redisplay)) |
| 843 | (setq end (event-end event) | 842 | (setq end (event-end event) |
| 844 | end-point (posn-point end)) | 843 | end-point (posn-point end)) |
diff --git a/lisp/mpc.el b/lisp/mpc.el index 614f2bd6806..d2203a4deab 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; mpc.el --- A client for the Music Player Daemon -*- coding: utf-8; lexical-binding: t -*- | 1 | ;;; mpc.el --- A client for the Music Player Daemon -*- coding: utf-8; lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2006-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2006-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> | 5 | ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> |
| 6 | ;; Keywords: multimedia | 6 | ;; Keywords: multimedia |
| @@ -184,10 +184,7 @@ numerically rather than lexicographically." | |||
| 184 | (abs res)) | 184 | (abs res)) |
| 185 | res)))))))) | 185 | res)))))))) |
| 186 | 186 | ||
| 187 | (defun mpc-string-prefix-p (str1 str2) | 187 | (define-obsolete-function-alias 'mpc-string-prefix-p 'string-prefix-p "24.2") |
| 188 | ;; FIXME: copied from pcvs-util.el. | ||
| 189 | "Tell whether STR1 is a prefix of STR2." | ||
| 190 | (eq t (compare-strings str2 nil (length str1) str1 nil nil))) | ||
| 191 | 188 | ||
| 192 | ;; This can speed up mpc--song-search significantly. The table may grow | 189 | ;; This can speed up mpc--song-search significantly. The table may grow |
| 193 | ;; very large, tho. It's only bounded by the fact that it gets flushed | 190 | ;; very large, tho. It's only bounded by the fact that it gets flushed |
| @@ -1690,7 +1687,7 @@ Return non-nil if a selection was deactivated." | |||
| 1690 | (process-put (mpc-proc) prop | 1687 | (process-put (mpc-proc) prop |
| 1691 | (delq nil | 1688 | (delq nil |
| 1692 | (mapcar (lambda (x) | 1689 | (mapcar (lambda (x) |
| 1693 | (if (mpc-string-prefix-p name x) | 1690 | (if (string-prefix-p name x) |
| 1694 | nil x)) | 1691 | nil x)) |
| 1695 | new))))) | 1692 | new))))) |
| 1696 | (mpc-tagbrowser-refresh))) | 1693 | (mpc-tagbrowser-refresh))) |
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 0bfc8eda3b1..62c0e317a81 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el | |||
| @@ -467,7 +467,7 @@ commands reverses the effect of this variable. Requires Netscape version | |||
| 467 | ;; it in anonymous cases. If it's not anonymous the next regexp | 467 | ;; it in anonymous cases. If it's not anonymous the next regexp |
| 468 | ;; applies. | 468 | ;; applies. |
| 469 | ("^/\\([^:@]+@\\)?\\([^:]+\\):/*" . "ftp://\\1\\2/") | 469 | ("^/\\([^:@]+@\\)?\\([^:]+\\):/*" . "ftp://\\1\\2/") |
| 470 | ,@(if (memq system-type '(windows-nt ms-dos cygwin)) | 470 | ,@(if (memq system-type '(windows-nt ms-dos)) |
| 471 | '(("^\\([a-zA-Z]:\\)[\\/]" . "file:///\\1/") | 471 | '(("^\\([a-zA-Z]:\\)[\\/]" . "file:///\\1/") |
| 472 | ("^[\\/][\\/]+" . "file://"))) | 472 | ("^[\\/][\\/]+" . "file://"))) |
| 473 | ("^/+" . "file:///")) | 473 | ("^/+" . "file:///")) |
| @@ -724,12 +724,6 @@ interactively. Turn the filename into a URL with function | |||
| 724 | (defun browse-url-file-url (file) | 724 | (defun browse-url-file-url (file) |
| 725 | "Return the URL corresponding to FILE. | 725 | "Return the URL corresponding to FILE. |
| 726 | Use variable `browse-url-filename-alist' to map filenames to URLs." | 726 | Use variable `browse-url-filename-alist' to map filenames to URLs." |
| 727 | ;; De-munge Cygwin filenames before passing them to Windows browser. | ||
| 728 | (if (eq system-type 'cygwin) | ||
| 729 | (let ((winfile (with-output-to-string | ||
| 730 | (call-process "cygpath" nil standard-output | ||
| 731 | nil "-m" file)))) | ||
| 732 | (setq file (substring winfile 0 -1)))) | ||
| 733 | (let ((coding (and (default-value 'enable-multibyte-characters) | 727 | (let ((coding (and (default-value 'enable-multibyte-characters) |
| 734 | (or file-name-coding-system | 728 | (or file-name-coding-system |
| 735 | default-file-name-coding-system)))) | 729 | default-file-name-coding-system)))) |
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index feef78a305f..e3144a53fab 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el | |||
| @@ -37,6 +37,7 @@ | |||
| 37 | (declare-function dbus-init-bus "dbusbind.c") | 37 | (declare-function dbus-init-bus "dbusbind.c") |
| 38 | (declare-function dbus-method-return-internal "dbusbind.c") | 38 | (declare-function dbus-method-return-internal "dbusbind.c") |
| 39 | (declare-function dbus-method-error-internal "dbusbind.c") | 39 | (declare-function dbus-method-error-internal "dbusbind.c") |
| 40 | (declare-function dbus-register-service "dbusbind.c") | ||
| 40 | (declare-function dbus-register-signal "dbusbind.c") | 41 | (declare-function dbus-register-signal "dbusbind.c") |
| 41 | (declare-function dbus-register-method "dbusbind.c") | 42 | (declare-function dbus-register-method "dbusbind.c") |
| 42 | (declare-function dbus-send-signal "dbusbind.c") | 43 | (declare-function dbus-send-signal "dbusbind.c") |
| @@ -275,8 +276,7 @@ usage: (dbus-name-owner-changed-handler service old-owner new-owner)" | |||
| 275 | (stringp (cadr args)) | 276 | (stringp (cadr args)) |
| 276 | (stringp (caddr args))) | 277 | (stringp (caddr args))) |
| 277 | (let ((service (car args)) | 278 | (let ((service (car args)) |
| 278 | (old-owner (cadr args)) | 279 | (old-owner (cadr args))) |
| 279 | (new-owner (caddr args))) | ||
| 280 | ;; Check whether SERVICE is a known name. | 280 | ;; Check whether SERVICE is a known name. |
| 281 | (when (not (string-match "^:" service)) | 281 | (when (not (string-match "^:" service)) |
| 282 | (maphash | 282 | (maphash |
diff --git a/lisp/net/network-stream.el b/lisp/net/network-stream.el index 7a3d47ef1d1..81d05eabc5a 100644 --- a/lisp/net/network-stream.el +++ b/lisp/net/network-stream.el | |||
| @@ -125,9 +125,8 @@ values: | |||
| 125 | certificate. This parameter will only be used when doing TLS | 125 | certificate. This parameter will only be used when doing TLS |
| 126 | or STARTTLS connections. | 126 | or STARTTLS connections. |
| 127 | 127 | ||
| 128 | If :use-starttls-if-possible is non-nil, do opportunistic | 128 | :use-starttls-if-possible is a boolean that says to do opportunistic |
| 129 | STARTTLS upgrades even if Emacs doesn't have built-in TLS | 129 | STARTTLS upgrades even if Emacs doesn't have built-in TLS functionality. |
| 130 | functionality. | ||
| 131 | 130 | ||
| 132 | :nowait is a boolean that says the connection should be made | 131 | :nowait is a boolean that says the connection should be made |
| 133 | asynchronously, if possible." | 132 | asynchronously, if possible." |
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 9d7e8664542..1898b3d074f 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el | |||
| @@ -361,6 +361,14 @@ of a line. The string is passed as the first argument to | |||
| 361 | :type 'string | 361 | :type 'string |
| 362 | :group 'rcirc) | 362 | :group 'rcirc) |
| 363 | 363 | ||
| 364 | (defcustom rcirc-kill-channel-buffers nil | ||
| 365 | "When non-nil, kill channel buffers when the server buffer is killed. | ||
| 366 | Only the channel buffers associated with the server in question | ||
| 367 | will be killed." | ||
| 368 | :version "24.2" | ||
| 369 | :type 'boolean | ||
| 370 | :group 'rcirc) | ||
| 371 | |||
| 364 | (defvar rcirc-nick nil) | 372 | (defvar rcirc-nick nil) |
| 365 | 373 | ||
| 366 | (defvar rcirc-prompt-start-marker nil) | 374 | (defvar rcirc-prompt-start-marker nil) |
| @@ -471,7 +479,8 @@ If ARG is non-nil, instead prompt for connection parameters." | |||
| 471 | rcirc-default-full-name)) | 479 | rcirc-default-full-name)) |
| 472 | (channels (plist-get (cdr c) :channels)) | 480 | (channels (plist-get (cdr c) :channels)) |
| 473 | (password (plist-get (cdr c) :password)) | 481 | (password (plist-get (cdr c) :password)) |
| 474 | (encryption (plist-get (cdr c) :encryption))) | 482 | (encryption (plist-get (cdr c) :encryption)) |
| 483 | contact) | ||
| 475 | (when server | 484 | (when server |
| 476 | (let (connected) | 485 | (let (connected) |
| 477 | (dolist (p (rcirc-process-list)) | 486 | (dolist (p (rcirc-process-list)) |
| @@ -483,10 +492,11 @@ If ARG is non-nil, instead prompt for connection parameters." | |||
| 483 | full-name channels password encryption) | 492 | full-name channels password encryption) |
| 484 | (quit (message "Quit connecting to %s" server))) | 493 | (quit (message "Quit connecting to %s" server))) |
| 485 | (with-current-buffer (process-buffer connected) | 494 | (with-current-buffer (process-buffer connected) |
| 486 | (setq connected-servers | 495 | (setq contact (process-contact |
| 487 | (cons (process-contact (get-buffer-process | 496 | (get-buffer-process (current-buffer)) :host)) |
| 488 | (current-buffer)) :host) | 497 | (setq connected-servers |
| 489 | connected-servers)))))))) | 498 | (cons (if (stringp contact) contact server) |
| 499 | connected-servers)))))))) | ||
| 490 | (when connected-servers | 500 | (when connected-servers |
| 491 | (message "Already connected to %s" | 501 | (message "Already connected to %s" |
| 492 | (if (cdr connected-servers) | 502 | (if (cdr connected-servers) |
| @@ -1088,12 +1098,20 @@ Logfiles are kept in `rcirc-log-directory'." | |||
| 1088 | :group 'rcirc) | 1098 | :group 'rcirc) |
| 1089 | 1099 | ||
| 1090 | (defun rcirc-kill-buffer-hook () | 1100 | (defun rcirc-kill-buffer-hook () |
| 1091 | "Part the channel when killing an rcirc buffer." | 1101 | "Part the channel when killing an rcirc buffer. |
| 1102 | |||
| 1103 | If `rcirc-kill-channel-buffers' is non-nil and the killed buffer | ||
| 1104 | is a server buffer, kills all of the channel buffers associated | ||
| 1105 | with it." | ||
| 1092 | (when (eq major-mode 'rcirc-mode) | 1106 | (when (eq major-mode 'rcirc-mode) |
| 1093 | (when (and rcirc-log-flag | 1107 | (when (and rcirc-log-flag |
| 1094 | rcirc-log-directory) | 1108 | rcirc-log-directory) |
| 1095 | (rcirc-log-write)) | 1109 | (rcirc-log-write)) |
| 1096 | (rcirc-clean-up-buffer "Killed buffer"))) | 1110 | (rcirc-clean-up-buffer "Killed buffer") |
| 1111 | (when (and rcirc-buffer-alist ;; it's a server buffer | ||
| 1112 | rcirc-kill-channel-buffers) | ||
| 1113 | (dolist (channel rcirc-buffer-alist) | ||
| 1114 | (kill-buffer (cdr channel)))))) | ||
| 1097 | 1115 | ||
| 1098 | (defun rcirc-change-major-mode-hook () | 1116 | (defun rcirc-change-major-mode-hook () |
| 1099 | "Part the channel when changing the major-mode." | 1117 | "Part the channel when changing the major-mode." |
| @@ -2165,17 +2183,13 @@ CHANNELS is a comma- or space-separated string of channel names." | |||
| 2165 | (let ((channel (if (> (length channel) 0) channel target))) | 2183 | (let ((channel (if (> (length channel) 0) channel target))) |
| 2166 | (rcirc-send-string process (concat "PART " channel " :" rcirc-id-string)))) | 2184 | (rcirc-send-string process (concat "PART " channel " :" rcirc-id-string)))) |
| 2167 | 2185 | ||
| 2168 | (defun-rcirc-command quit (reason all) | 2186 | (defun-rcirc-command quit (reason) |
| 2169 | "Send a quit message to server with REASON. | 2187 | "Send a quit message to server with REASON." |
| 2170 | When called with prefix, quit all servers." | 2188 | (interactive "sQuit reason: ") |
| 2171 | (interactive "sQuit reason: \nP") | 2189 | (rcirc-send-string process (concat "QUIT :" |
| 2172 | (dolist (p (if all | 2190 | (if (not (zerop (length reason))) |
| 2173 | (rcirc-process-list) | 2191 | reason |
| 2174 | (list process))) | 2192 | rcirc-id-string)))) |
| 2175 | (rcirc-send-string p (concat "QUIT :" | ||
| 2176 | (if (not (zerop (length reason))) | ||
| 2177 | reason | ||
| 2178 | rcirc-id-string))))) | ||
| 2179 | 2193 | ||
| 2180 | (defun-rcirc-command nick (nick) | 2194 | (defun-rcirc-command nick (nick) |
| 2181 | "Change nick to NICK." | 2195 | "Change nick to NICK." |
diff --git a/lisp/net/tls.el b/lisp/net/tls.el index d232095444b..75d178e3225 100644 --- a/lisp/net/tls.el +++ b/lisp/net/tls.el | |||
| @@ -231,8 +231,7 @@ Fourth arg PORT is an integer specifying a port to connect to." | |||
| 231 | ?h host | 231 | ?h host |
| 232 | ?p (if (integerp port) | 232 | ?p (if (integerp port) |
| 233 | (int-to-string port) | 233 | (int-to-string port) |
| 234 | port)))) | 234 | port))))) |
| 235 | response) | ||
| 236 | (message "Opening TLS connection with `%s'..." formatted-cmd) | 235 | (message "Opening TLS connection with `%s'..." formatted-cmd) |
| 237 | (setq process (start-process | 236 | (setq process (start-process |
| 238 | name buffer shell-file-name shell-command-switch | 237 | name buffer shell-file-name shell-command-switch |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 5b4ea1e6f17..95848ac34ea 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -3133,11 +3133,12 @@ beginning of local filename are not substituted." | |||
| 3133 | (defun tramp-action-password (proc vec) | 3133 | (defun tramp-action-password (proc vec) |
| 3134 | "Query the user for a password." | 3134 | "Query the user for a password." |
| 3135 | (with-current-buffer (process-buffer proc) | 3135 | (with-current-buffer (process-buffer proc) |
| 3136 | (tramp-check-for-regexp proc tramp-password-prompt-regexp) | 3136 | (let ((enable-recursive-minibuffers t)) |
| 3137 | (tramp-message vec 3 "Sending %s" (match-string 1)) | 3137 | (tramp-check-for-regexp proc tramp-password-prompt-regexp) |
| 3138 | (tramp-enter-password proc) | 3138 | (tramp-message vec 3 "Sending %s" (match-string 1)) |
| 3139 | ;; Hide password prompt. | 3139 | (tramp-enter-password proc) |
| 3140 | (narrow-to-region (point-max) (point-max)))) | 3140 | ;; Hide password prompt. |
| 3141 | (narrow-to-region (point-max) (point-max))))) | ||
| 3141 | 3142 | ||
| 3142 | (defun tramp-action-succeed (proc vec) | 3143 | (defun tramp-action-succeed (proc vec) |
| 3143 | "Signal success in finding shell prompt." | 3144 | "Signal success in finding shell prompt." |
diff --git a/lisp/newcomment.el b/lisp/newcomment.el index 37a76e0309c..0862427c3ba 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el | |||
| @@ -269,6 +269,19 @@ makes the comment easier to read. Default is 1. nil means 0." | |||
| 269 | :type '(choice string integer (const nil)) | 269 | :type '(choice string integer (const nil)) |
| 270 | :group 'comment) | 270 | :group 'comment) |
| 271 | 271 | ||
| 272 | (defcustom comment-inline-offset 1 | ||
| 273 | "Inline comments have to be preceded by at least this many spaces. | ||
| 274 | This is useful when style-conventions require a certain minimal offset. | ||
| 275 | Python's PEP8 for example recommends two spaces, so you could do: | ||
| 276 | |||
| 277 | \(add-hook 'python-mode-hook | ||
| 278 | (lambda () (set (make-local-variable 'comment-inline-offset) 2))) | ||
| 279 | |||
| 280 | See `comment-padding' for whole-line comments." | ||
| 281 | :version "24.2" | ||
| 282 | :type 'integer | ||
| 283 | :group 'comment) | ||
| 284 | |||
| 272 | ;;;###autoload | 285 | ;;;###autoload |
| 273 | (defcustom comment-multi-line nil | 286 | (defcustom comment-multi-line nil |
| 274 | "Non-nil means `comment-indent-new-line' continues comments. | 287 | "Non-nil means `comment-indent-new-line' continues comments. |
| @@ -587,7 +600,7 @@ Point is expected to be at the start of the comment." | |||
| 587 | (save-excursion (end-of-line) (current-column))))) | 600 | (save-excursion (end-of-line) (current-column))))) |
| 588 | (other nil) | 601 | (other nil) |
| 589 | (min (save-excursion (skip-chars-backward " \t") | 602 | (min (save-excursion (skip-chars-backward " \t") |
| 590 | (if (bolp) 0 (1+ (current-column)))))) | 603 | (if (bolp) 0 (+ comment-inline-offset (current-column)))))) |
| 591 | ;; Fix up the range. | 604 | ;; Fix up the range. |
| 592 | (if (< max min) (setq max min)) | 605 | (if (< max min) (setq max min)) |
| 593 | ;; Don't move past the fill column. | 606 | ;; Don't move past the fill column. |
| @@ -687,7 +700,8 @@ If CONTINUE is non-nil, use the `comment-continue' markers if any." | |||
| 687 | (save-excursion | 700 | (save-excursion |
| 688 | (skip-chars-backward " \t") | 701 | (skip-chars-backward " \t") |
| 689 | (unless (bolp) | 702 | (unless (bolp) |
| 690 | (setq indent (max indent (1+ (current-column)))))) | 703 | (setq indent (max indent |
| 704 | (+ (current-column) comment-inline-offset))))) | ||
| 691 | ;; If that's different from comment's current position, change it. | 705 | ;; If that's different from comment's current position, change it. |
| 692 | (unless (= (current-column) indent) | 706 | (unless (= (current-column) indent) |
| 693 | (delete-region (point) (progn (skip-chars-backward " \t") (point))) | 707 | (delete-region (point) (progn (skip-chars-backward " \t") (point))) |
diff --git a/lisp/nxml/nxml-mode.el b/lisp/nxml/nxml-mode.el index f9122e7245e..5adafc3845c 100644 --- a/lisp/nxml/nxml-mode.el +++ b/lisp/nxml/nxml-mode.el | |||
| @@ -1236,7 +1236,7 @@ on the line, reindent the line." | |||
| 1236 | (unless arg | 1236 | (unless arg |
| 1237 | (if nxml-slash-auto-complete-flag | 1237 | (if nxml-slash-auto-complete-flag |
| 1238 | (if end-tag-p | 1238 | (if end-tag-p |
| 1239 | (condition-case err | 1239 | (condition-case nil |
| 1240 | (let ((start-tag-end | 1240 | (let ((start-tag-end |
| 1241 | (nxml-scan-element-backward (1- slash-pos) t))) | 1241 | (nxml-scan-element-backward (1- slash-pos) t))) |
| 1242 | (when start-tag-end | 1242 | (when start-tag-end |
| @@ -1434,7 +1434,7 @@ its line. Otherwise return nil." | |||
| 1434 | (nxml-token-after) | 1434 | (nxml-token-after) |
| 1435 | (= xmltok-start bol)) | 1435 | (= xmltok-start bol)) |
| 1436 | (eq xmltok-type 'data)) | 1436 | (eq xmltok-type 'data)) |
| 1437 | (condition-case err | 1437 | (condition-case nil |
| 1438 | (nxml-scan-element-backward | 1438 | (nxml-scan-element-backward |
| 1439 | (point) | 1439 | (point) |
| 1440 | nil | 1440 | nil |
| @@ -1559,8 +1559,7 @@ This expects the xmltok-* variables to be set up as by `xmltok-forward'." | |||
| 1559 | (off 0)) | 1559 | (off 0)) |
| 1560 | (if value-boundary | 1560 | (if value-boundary |
| 1561 | ;; inside an attribute value | 1561 | ;; inside an attribute value |
| 1562 | (let ((value-start (car value-boundary)) | 1562 | (let ((value-start (car value-boundary))) |
| 1563 | (value-end (cdr value-boundary))) | ||
| 1564 | (goto-char pos) | 1563 | (goto-char pos) |
| 1565 | (forward-line -1) | 1564 | (forward-line -1) |
| 1566 | (if (< (point) value-start) | 1565 | (if (< (point) value-start) |
| @@ -1753,7 +1752,7 @@ single name. A character reference contains a character number." | |||
| 1753 | xmltok-name-end) | 1752 | xmltok-name-end) |
| 1754 | (t end))) | 1753 | (t end))) |
| 1755 | 1754 | ||
| 1756 | (defun nxml-scan-backward-within (end) | 1755 | (defun nxml-scan-backward-within (_end) |
| 1757 | (setq xmltok-start | 1756 | (setq xmltok-start |
| 1758 | (+ xmltok-start | 1757 | (+ xmltok-start |
| 1759 | (nxml-start-delimiter-length xmltok-type))) | 1758 | (nxml-start-delimiter-length xmltok-type))) |
| @@ -2263,7 +2262,7 @@ ENDP is t in the former case, nil in the latter." | |||
| 2263 | 'nxml-in-mixed-content-hook)) | 2262 | 'nxml-in-mixed-content-hook)) |
| 2264 | nil) | 2263 | nil) |
| 2265 | ;; See if the matching tag does not start or end a line. | 2264 | ;; See if the matching tag does not start or end a line. |
| 2266 | ((condition-case err | 2265 | ((condition-case nil |
| 2267 | (progn | 2266 | (progn |
| 2268 | (setq matching-tag-pos | 2267 | (setq matching-tag-pos |
| 2269 | (xmltok-save | 2268 | (xmltok-save |
| @@ -2401,7 +2400,7 @@ Repeating \\[nxml-dynamic-markup-word] immediately after successful | |||
| 2401 | \\[nxml-dynamic-markup-word] removes the previously inserted markup | 2400 | \\[nxml-dynamic-markup-word] removes the previously inserted markup |
| 2402 | and attempts to find another possible way to do the markup." | 2401 | and attempts to find another possible way to do the markup." |
| 2403 | (interactive "*") | 2402 | (interactive "*") |
| 2404 | (let (search-start-pos done) | 2403 | (let (search-start-pos) |
| 2405 | (if (and (integerp nxml-dynamic-markup-prev-pos) | 2404 | (if (and (integerp nxml-dynamic-markup-prev-pos) |
| 2406 | (= nxml-dynamic-markup-prev-pos (point)) | 2405 | (= nxml-dynamic-markup-prev-pos (point)) |
| 2407 | (eq last-command this-command) | 2406 | (eq last-command this-command) |
diff --git a/lisp/mail/mailpost.el b/lisp/obsolete/mailpost.el index 7c4bea830d8..158523e8ef2 100644 --- a/lisp/mail/mailpost.el +++ b/lisp/obsolete/mailpost.el | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | ;; Maintainer: FSF | 9 | ;; Maintainer: FSF |
| 10 | ;; Created: 13 Jan 1986 | 10 | ;; Created: 13 Jan 1986 |
| 11 | ;; Keywords: mail | 11 | ;; Keywords: mail |
| 12 | ;; Obsolete-since: 24.2 | ||
| 12 | 13 | ||
| 13 | ;;; Commentary: | 14 | ;;; Commentary: |
| 14 | 15 | ||
diff --git a/lisp/mouse-sel.el b/lisp/obsolete/mouse-sel.el index 6323ef03696..45396d30ea5 100644 --- a/lisp/mouse-sel.el +++ b/lisp/obsolete/mouse-sel.el | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | ;; Author: Mike Williams <mdub@bigfoot.com> | 5 | ;; Author: Mike Williams <mdub@bigfoot.com> |
| 6 | ;; Keywords: mouse | 6 | ;; Keywords: mouse |
| 7 | ;; Obsolete-since: 24.2 | ||
| 7 | 8 | ||
| 8 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 9 | 10 | ||
| @@ -262,6 +263,8 @@ kill ring; mouse-1 or mouse-3 kills it." | |||
| 262 | interprogram-paste-function | 263 | interprogram-paste-function |
| 263 | mouse-sel-original-interprogram-paste-function)))) | 264 | mouse-sel-original-interprogram-paste-function)))) |
| 264 | 265 | ||
| 266 | (make-obsolete 'mouse-sel-mode "use the normal mouse modes" "24.2") | ||
| 267 | |||
| 265 | ;;=== Internal Variables/Constants ======================================== | 268 | ;;=== Internal Variables/Constants ======================================== |
| 266 | 269 | ||
| 267 | (defvar mouse-sel-primary-thing nil | 270 | (defvar mouse-sel-primary-thing nil |
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index 618d5753a46..86f493a0a5b 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog | |||
| @@ -1,3 +1,49 @@ | |||
| 1 | 2012-04-14 Bastien Guerry <bzg@gnu.org> | ||
| 2 | |||
| 3 | * org.el (org-point-at-end-of-empty-headline): Only try to match | ||
| 4 | `org-todo-line-regexp' when the value is non-nil, e.g. in non-org | ||
| 5 | modes. | ||
| 6 | (org-fontify-meta-lines-and-blocks-1): Prevent errors when trying | ||
| 7 | to fontify beyond (point-max). | ||
| 8 | |||
| 9 | * org-clock.el (org-clock-task-overrun-text) | ||
| 10 | (org-task-overrun, org-clock-get-clock-string) | ||
| 11 | (org-clock-update-mode-line) | ||
| 12 | (org-clock-notify-once-if-expired): Rename `org-task-overrun' | ||
| 13 | and `org-task-overrun-text' to `org-clock-task-overrun' and | ||
| 14 | `org-clock-task-overrun-text' respectively. | ||
| 15 | (org-task-overrun-text): New alias. | ||
| 16 | |||
| 17 | * org-table.el (org-table-eval-formula): Fix bug about handling | ||
| 18 | remote references as durations. | ||
| 19 | (org-table-get-range): Fix bug: make sure references to $0 are | ||
| 20 | correctly handled. | ||
| 21 | |||
| 22 | * org-pcomplete.el (pcomplete/org-mode/file-option): | ||
| 23 | Fix bug in `pcomplete/org-mode/file-option'. | ||
| 24 | (org-thing-at-point): Also match line options like LATEX_CLASS | ||
| 25 | when pcompleting from LATEX_. | ||
| 26 | |||
| 27 | * org-agenda.el (org-agenda-filter-make-matcher) | ||
| 28 | (org-agenda-filter-apply): Allow filtering entries out by | ||
| 29 | category. Using `C-u <' from the agenda view will redisplay | ||
| 30 | the agenda without entries from categories of the current line. | ||
| 31 | |||
| 32 | 2012-04-14 Eric Schulte <eric.schulte@gmx.com> | ||
| 33 | |||
| 34 | * ob-C.el (org-babel-C-ensure-main-wrap): | ||
| 35 | Add an explicit return to automatically generated main methods. | ||
| 36 | |||
| 37 | 2012-04-14 Matt Lundin <mdl@imapmail.org> | ||
| 38 | |||
| 39 | * org.el (org-after-todo-state-change-hook): | ||
| 40 | Fix docstring to reflect name change of state to `org-state'. | ||
| 41 | |||
| 42 | 2012-04-14 Mike Sperber <sperber@deinprogramm.de> (tiny change) | ||
| 43 | |||
| 44 | * org-footnote.el (org-footnote-normalize): | ||
| 45 | Correctly pass keyword arguments to `org-export-preprocess-string'. | ||
| 46 | |||
| 1 | 2012-04-03 Bastien Guerry <bzg@gnu.org> | 47 | 2012-04-03 Bastien Guerry <bzg@gnu.org> |
| 2 | 48 | ||
| 3 | * org.el (org-todo): Fix regression: rename `state' to | 49 | * org.el (org-todo): Fix regression: rename `state' to |
diff --git a/lisp/org/ob-C.el b/lisp/org/ob-C.el index 5f6c1cb1dd1..583510ac618 100644 --- a/lisp/org/ob-C.el +++ b/lisp/org/ob-C.el | |||
| @@ -152,7 +152,7 @@ it's header arguments." | |||
| 152 | "Wrap body in a \"main\" function call if none exists." | 152 | "Wrap body in a \"main\" function call if none exists." |
| 153 | (if (string-match "^[ \t]*[intvod]+[ \t\n\r]*main[ \t]*(.*)" body) | 153 | (if (string-match "^[ \t]*[intvod]+[ \t\n\r]*main[ \t]*(.*)" body) |
| 154 | body | 154 | body |
| 155 | (format "int main() {\n%s\n}\n" body))) | 155 | (format "int main() {\n%s\nreturn(0);\n}\n" body))) |
| 156 | 156 | ||
| 157 | (defun org-babel-prep-session:C (session params) | 157 | (defun org-babel-prep-session:C (session params) |
| 158 | "This function does nothing as C is a compiled language with no | 158 | "This function does nothing as C is a compiled language with no |
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index 324ddd27f9a..3bb0fc84897 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el | |||
| @@ -6365,7 +6365,9 @@ to switch to narrowing." | |||
| 6365 | (dolist (x (delete-dups | 6365 | (dolist (x (delete-dups |
| 6366 | (append (get 'org-agenda-category-filter | 6366 | (append (get 'org-agenda-category-filter |
| 6367 | :preset-filter) org-agenda-category-filter))) | 6367 | :preset-filter) org-agenda-category-filter))) |
| 6368 | (setq f1 (list 'equal (substring x 1) 'cat)) | 6368 | (if (equal "-" (substring x 0 1)) |
| 6369 | (setq f1 (list 'not (list 'equal (substring x 1) 'cat))) | ||
| 6370 | (setq f1 (list 'equal (substring x 1) 'cat))) | ||
| 6369 | (push f1 f)) | 6371 | (push f1 f)) |
| 6370 | (cons 'and (nreverse f)))) | 6372 | (cons 'and (nreverse f)))) |
| 6371 | 6373 | ||
| @@ -6396,9 +6398,13 @@ If the line does not have an effort defined, return nil." | |||
| 6396 | (let (tags cat) | 6398 | (let (tags cat) |
| 6397 | (if (eq type 'tag) | 6399 | (if (eq type 'tag) |
| 6398 | (setq org-agenda-tag-filter filter) | 6400 | (setq org-agenda-tag-filter filter) |
| 6399 | (setq org-agenda-category-filter filter | 6401 | (setq org-agenda-category-filter filter)) |
| 6400 | org-agenda-filtered-by-category t)) | ||
| 6401 | (setq org-agenda-filter-form (org-agenda-filter-make-matcher)) | 6402 | (setq org-agenda-filter-form (org-agenda-filter-make-matcher)) |
| 6403 | (if (and (eq type 'category) | ||
| 6404 | (not (equal (substring (car filter) 0 1) "-"))) | ||
| 6405 | ;; Only set `org-agenda-filtered-by-category' to t | ||
| 6406 | ;; when a unique category is used as the filter | ||
| 6407 | (setq org-agenda-filtered-by-category t)) | ||
| 6402 | (org-agenda-set-mode-name) | 6408 | (org-agenda-set-mode-name) |
| 6403 | (save-excursion | 6409 | (save-excursion |
| 6404 | (goto-char (point-min)) | 6410 | (goto-char (point-min)) |
| @@ -6412,7 +6418,7 @@ If the line does not have an effort defined, return nil." | |||
| 6412 | (beginning-of-line 2)) | 6418 | (beginning-of-line 2)) |
| 6413 | (beginning-of-line 2)))) | 6419 | (beginning-of-line 2)))) |
| 6414 | (if (get-char-property (point) 'invisible) | 6420 | (if (get-char-property (point) 'invisible) |
| 6415 | (org-agenda-previous-line)))) | 6421 | (ignore-errors (org-agenda-previous-line))))) |
| 6416 | 6422 | ||
| 6417 | (defun org-agenda-filter-hide-line (type) | 6423 | (defun org-agenda-filter-hide-line (type) |
| 6418 | (let (ov) | 6424 | (let (ov) |
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index 7105bfe13dc..434f6a1d5f6 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el | |||
| @@ -219,7 +219,8 @@ auto Automatically, either `all', or `repeat' for repeating tasks" | |||
| 219 | (const :tag "All task time" all) | 219 | (const :tag "All task time" all) |
| 220 | (const :tag "Automatically, `all' or since `repeat'" auto))) | 220 | (const :tag "Automatically, `all' or since `repeat'" auto))) |
| 221 | 221 | ||
| 222 | (defcustom org-task-overrun-text nil | 222 | (defvaralias 'org-task-overrun-text 'org-clock-task-overrun-text) |
| 223 | (defcustom org-clock-task-overrun-text nil | ||
| 223 | "The extra modeline text that should indicate that the clock is overrun. | 224 | "The extra modeline text that should indicate that the clock is overrun. |
| 224 | The can be nil to indicate that instead of adding text, the clock time | 225 | The can be nil to indicate that instead of adding text, the clock time |
| 225 | should get a different face (`org-mode-line-clock-overrun'). | 226 | should get a different face (`org-mode-line-clock-overrun'). |
| @@ -495,7 +496,7 @@ pointing to it." | |||
| 495 | (insert (format "[%c] %-15s %s\n" i cat task)) | 496 | (insert (format "[%c] %-15s %s\n" i cat task)) |
| 496 | (cons i marker))))) | 497 | (cons i marker))))) |
| 497 | 498 | ||
| 498 | (defvar org-task-overrun nil | 499 | (defvar org-clock-task-overrun nil |
| 499 | "Internal flag indicating if the clock has overrun the planned time.") | 500 | "Internal flag indicating if the clock has overrun the planned time.") |
| 500 | (defvar org-clock-update-period 60 | 501 | (defvar org-clock-update-period 60 |
| 501 | "Number of seconds between mode line clock string updates.") | 502 | "Number of seconds between mode line clock string updates.") |
| @@ -516,7 +517,7 @@ If not, show simply the clocked time like 01:50." | |||
| 516 | (work-done-str | 517 | (work-done-str |
| 517 | (org-propertize | 518 | (org-propertize |
| 518 | (format org-time-clocksum-format h m) | 519 | (format org-time-clocksum-format h m) |
| 519 | 'face (if (and org-task-overrun (not org-task-overrun-text)) | 520 | 'face (if (and org-clock-task-overrun (not org-clock-task-overrun-text)) |
| 520 | 'org-mode-line-clock-overrun 'org-mode-line-clock))) | 521 | 'org-mode-line-clock-overrun 'org-mode-line-clock))) |
| 521 | (effort-str (format org-time-clocksum-format effort-h effort-m)) | 522 | (effort-str (format org-time-clocksum-format effort-h effort-m)) |
| 522 | (clockstr (org-propertize | 523 | (clockstr (org-propertize |
| @@ -532,7 +533,7 @@ If not, show simply the clocked time like 01:50." | |||
| 532 | (defun org-clock-update-mode-line () | 533 | (defun org-clock-update-mode-line () |
| 533 | (if org-clock-effort | 534 | (if org-clock-effort |
| 534 | (org-clock-notify-once-if-expired) | 535 | (org-clock-notify-once-if-expired) |
| 535 | (setq org-task-overrun nil)) | 536 | (setq org-clock-task-overrun nil)) |
| 536 | (setq org-mode-line-string | 537 | (setq org-mode-line-string |
| 537 | (org-propertize | 538 | (org-propertize |
| 538 | (let ((clock-string (org-clock-get-clock-string)) | 539 | (let ((clock-string (org-clock-get-clock-string)) |
| @@ -546,10 +547,10 @@ If not, show simply the clocked time like 01:50." | |||
| 546 | 'local-map org-clock-mode-line-map | 547 | 'local-map org-clock-mode-line-map |
| 547 | 'mouse-face (if (featurep 'xemacs) 'highlight 'mode-line-highlight) | 548 | 'mouse-face (if (featurep 'xemacs) 'highlight 'mode-line-highlight) |
| 548 | )) | 549 | )) |
| 549 | (if (and org-task-overrun org-task-overrun-text) | 550 | (if (and org-clock-task-overrun org-clock-task-overrun-text) |
| 550 | (setq org-mode-line-string | 551 | (setq org-mode-line-string |
| 551 | (concat (org-propertize | 552 | (concat (org-propertize |
| 552 | org-task-overrun-text | 553 | org-clock-task-overrun-text |
| 553 | 'face 'org-mode-line-clock-overrun) org-mode-line-string))) | 554 | 'face 'org-mode-line-clock-overrun) org-mode-line-string))) |
| 554 | (force-mode-line-update)) | 555 | (force-mode-line-update)) |
| 555 | 556 | ||
| @@ -606,7 +607,7 @@ Notification is shown only once." | |||
| 606 | (when (org-clocking-p) | 607 | (when (org-clocking-p) |
| 607 | (let ((effort-in-minutes (org-duration-string-to-minutes org-clock-effort)) | 608 | (let ((effort-in-minutes (org-duration-string-to-minutes org-clock-effort)) |
| 608 | (clocked-time (org-clock-get-clocked-time))) | 609 | (clocked-time (org-clock-get-clocked-time))) |
| 609 | (if (setq org-task-overrun | 610 | (if (setq org-clock-task-overrun |
| 610 | (if (or (null effort-in-minutes) (zerop effort-in-minutes)) | 611 | (if (or (null effort-in-minutes) (zerop effort-in-minutes)) |
| 611 | nil | 612 | nil |
| 612 | (>= clocked-time effort-in-minutes))) | 613 | (>= clocked-time effort-in-minutes))) |
diff --git a/lisp/org/org-footnote.el b/lisp/org/org-footnote.el index 34fc31f39d6..9319e0813c0 100644 --- a/lisp/org/org-footnote.el +++ b/lisp/org/org-footnote.el | |||
| @@ -704,7 +704,7 @@ Additional note on `org-footnote-insert-pos-for-preprocessor': | |||
| 704 | (org-combine-plists | 704 | (org-combine-plists |
| 705 | export-props | 705 | export-props |
| 706 | '(:todo-keywords t :tags t :priority t)))) | 706 | '(:todo-keywords t :tags t :priority t)))) |
| 707 | (org-export-preprocess-string def parameters)) | 707 | (apply #'org-export-preprocess-string def parameters)) |
| 708 | def) | 708 | def) |
| 709 | ;; Reference beginning position is a marker | 709 | ;; Reference beginning position is a marker |
| 710 | ;; to preserve it during further buffer | 710 | ;; to preserve it during further buffer |
diff --git a/lisp/org/org-pcomplete.el b/lisp/org/org-pcomplete.el index 0ca8777878c..5950d8e26da 100644 --- a/lisp/org/org-pcomplete.el +++ b/lisp/org/org-pcomplete.el | |||
| @@ -69,7 +69,7 @@ The return value is a string naming the thing at point." | |||
| 69 | (re-search-backward "^[ \t]*#\\+\\([A-Z_]+\\):.*" | 69 | (re-search-backward "^[ \t]*#\\+\\([A-Z_]+\\):.*" |
| 70 | (line-beginning-position) t)) | 70 | (line-beginning-position) t)) |
| 71 | (cons "file-option" (match-string-no-properties 1))) | 71 | (cons "file-option" (match-string-no-properties 1))) |
| 72 | ((string-match "\\`[ \t]*#\\+[a-zA-Z]*\\'" line-to-here) | 72 | ((string-match "\\`[ \t]*#\\+[a-zA-Z_]*\\'" line-to-here) |
| 73 | (cons "file-option" nil)) | 73 | (cons "file-option" nil)) |
| 74 | ((equal (char-before beg) ?\[) | 74 | ((equal (char-before beg) ?\[) |
| 75 | (cons "link" nil)) | 75 | (cons "link" nil)) |
| @@ -144,7 +144,7 @@ When completing for #+STARTUP, for example, this function returns | |||
| 144 | (if (string-match "^#\\+\\([A-Z_]+:?\\)" x) | 144 | (if (string-match "^#\\+\\([A-Z_]+:?\\)" x) |
| 145 | (match-string 1 x))) | 145 | (match-string 1 x))) |
| 146 | (org-split-string (org-get-current-options) "\n")) | 146 | (org-split-string (org-get-current-options) "\n")) |
| 147 | org-additional-option-like-keywords))))) | 147 | (copy-sequence org-additional-option-like-keywords)))))) |
| 148 | (substring pcomplete-stub 2))) | 148 | (substring pcomplete-stub 2))) |
| 149 | 149 | ||
| 150 | (defvar org-startup-options) | 150 | (defvar org-startup-options) |
diff --git a/lisp/org/org-special-blocks.el b/lisp/org/org-special-blocks.el index 5bf8362357f..43b37c64016 100644 --- a/lisp/org/org-special-blocks.el +++ b/lisp/org/org-special-blocks.el | |||
| @@ -80,17 +80,17 @@ seen. This is run after a few special cases are taken care of." | |||
| 80 | (add-hook 'org-export-latex-after-blockquotes-hook | 80 | (add-hook 'org-export-latex-after-blockquotes-hook |
| 81 | 'org-special-blocks-convert-latex-special-cookies) | 81 | 'org-special-blocks-convert-latex-special-cookies) |
| 82 | 82 | ||
| 83 | (defvar org-special-blocks-line) | 83 | (defvar line) |
| 84 | (defun org-special-blocks-convert-html-special-cookies () | 84 | (defun org-special-blocks-convert-html-special-cookies () |
| 85 | "Converts the special cookies into div blocks." | 85 | "Converts the special cookies into div blocks." |
| 86 | ;; Uses the dynamically-bound variable `org-special-blocks-line'. | 86 | ;; Uses the dynamically-bound variable `line'. |
| 87 | (when (string-match "^ORG-\\(.*\\)-\\(START\\|END\\)$" org-special-blocks-line) | 87 | (when (string-match "^ORG-\\(.*\\)-\\(START\\|END\\)$" line) |
| 88 | (message "%s" (match-string 1)) | 88 | (message "%s" (match-string 1)) |
| 89 | (when (equal (match-string 2 org-special-blocks-line) "START") | 89 | (when (equal (match-string 2 line) "START") |
| 90 | (org-close-par-maybe) | 90 | (org-close-par-maybe) |
| 91 | (insert "\n<div class=\"" (match-string 1 org-special-blocks-line) "\">") | 91 | (insert "\n<div class=\"" (match-string 1 line) "\">") |
| 92 | (org-open-par)) | 92 | (org-open-par)) |
| 93 | (when (equal (match-string 2 org-special-blocks-line) "END") | 93 | (when (equal (match-string 2 line) "END") |
| 94 | (org-close-par-maybe) | 94 | (org-close-par-maybe) |
| 95 | (insert "\n</div>") | 95 | (insert "\n</div>") |
| 96 | (org-open-par)) | 96 | (org-open-par)) |
diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index ae12cee2abe..08981b57e49 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el | |||
| @@ -2526,8 +2526,13 @@ not overwrite the stored one." | |||
| 2526 | (replace-match | 2526 | (replace-match |
| 2527 | (save-match-data | 2527 | (save-match-data |
| 2528 | (org-table-make-reference | 2528 | (org-table-make-reference |
| 2529 | (org-table-get-remote-range | 2529 | (let ((rmtrng (org-table-get-remote-range |
| 2530 | (match-string 1 form) (match-string 2 form)) | 2530 | (match-string 1 form) (match-string 2 form)))) |
| 2531 | (if duration | ||
| 2532 | (if (listp rmtrng) | ||
| 2533 | (mapcar (lambda(x) (org-table-time-string-to-seconds x)) rmtrng) | ||
| 2534 | (org-table-time-string-to-seconds rmtrng)) | ||
| 2535 | rmtrng)) | ||
| 2531 | keep-empty numbers lispp)) | 2536 | keep-empty numbers lispp)) |
| 2532 | t t form))) | 2537 | t t form))) |
| 2533 | ;; Insert complex ranges | 2538 | ;; Insert complex ranges |
| @@ -2663,8 +2668,8 @@ in the buffer and column1 and column2 are table column numbers." | |||
| 2663 | ; (setq r2 (or r2 r1) c2 (or c2 c1)) | 2668 | ; (setq r2 (or r2 r1) c2 (or c2 c1)) |
| 2664 | (if (not r1) (setq r1 thisline)) | 2669 | (if (not r1) (setq r1 thisline)) |
| 2665 | (if (not r2) (setq r2 thisline)) | 2670 | (if (not r2) (setq r2 thisline)) |
| 2666 | (if (not c1) (setq c1 col)) | 2671 | (if (or (not c1) (= 0 c1)) (setq c1 col)) |
| 2667 | (if (not c2) (setq c2 col)) | 2672 | (if (or (not c2) (= 0 c2)) (setq c2 col)) |
| 2668 | (if (and (not corners-only) | 2673 | (if (and (not corners-only) |
| 2669 | (or (not rangep) (and (= r1 r2) (= c1 c2)))) | 2674 | (or (not rangep) (and (= r1 r2) (= c1 c2)))) |
| 2670 | ;; just one field | 2675 | ;; just one field |
diff --git a/lisp/org/org.el b/lisp/org/org.el index 0f13223d0c1..c2cc2354439 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Maintainer: Bastien Guerry <bzg at gnu dot org> | 6 | ;; Maintainer: Bastien Guerry <bzg at gnu dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.8.08 | 9 | ;; Version: 7.8.09 |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
| @@ -206,7 +206,7 @@ identifier." | |||
| 206 | 206 | ||
| 207 | ;;; Version | 207 | ;;; Version |
| 208 | 208 | ||
| 209 | (defconst org-version "7.8.08" | 209 | (defconst org-version "7.8.09" |
| 210 | "The version number of the file org.el.") | 210 | "The version number of the file org.el.") |
| 211 | 211 | ||
| 212 | ;;;###autoload | 212 | ;;;###autoload |
| @@ -2225,7 +2225,7 @@ property and include the word \"recursive\" into the value." | |||
| 2225 | (defcustom org-after-todo-state-change-hook nil | 2225 | (defcustom org-after-todo-state-change-hook nil |
| 2226 | "Hook which is run after the state of a TODO item was changed. | 2226 | "Hook which is run after the state of a TODO item was changed. |
| 2227 | The new state (a string with a TODO keyword, or nil) is available in the | 2227 | The new state (a string with a TODO keyword, or nil) is available in the |
| 2228 | Lisp variable `state'." | 2228 | Lisp variable `org-state'." |
| 2229 | :group 'org-todo | 2229 | :group 'org-todo |
| 2230 | :type 'hook) | 2230 | :type 'hook) |
| 2231 | 2231 | ||
| @@ -5427,7 +5427,8 @@ will be prompted for." | |||
| 5427 | (when (re-search-forward | 5427 | (when (re-search-forward |
| 5428 | (concat "^[ \t]*#\\+end" (match-string 4) "\\>.*") | 5428 | (concat "^[ \t]*#\\+end" (match-string 4) "\\>.*") |
| 5429 | nil t) ;; on purpose, we look further than LIMIT | 5429 | nil t) ;; on purpose, we look further than LIMIT |
| 5430 | (setq end (match-end 0) end1 (1- (match-beginning 0))) | 5430 | (setq end (min (point-max) (match-end 0)) |
| 5431 | end1 (min (point-max) (1- (match-beginning 0)))) | ||
| 5431 | (setq block-end (match-beginning 0)) | 5432 | (setq block-end (match-beginning 0)) |
| 5432 | (when quoting | 5433 | (when quoting |
| 5433 | (remove-text-properties beg end | 5434 | (remove-text-properties beg end |
| @@ -5455,11 +5456,12 @@ will be prompted for." | |||
| 5455 | '(face org-block))) ; end of source block | 5456 | '(face org-block))) ; end of source block |
| 5456 | ((not org-fontify-quote-and-verse-blocks)) | 5457 | ((not org-fontify-quote-and-verse-blocks)) |
| 5457 | ((string= block-type "quote") | 5458 | ((string= block-type "quote") |
| 5458 | (add-text-properties beg1 (1+ end1) '(face org-quote))) | 5459 | (add-text-properties beg1 (min (point-max) (1+ end1)) '(face org-quote))) |
| 5459 | ((string= block-type "verse") | 5460 | ((string= block-type "verse") |
| 5460 | (add-text-properties beg1 (1+ end1) '(face org-verse)))) | 5461 | (add-text-properties beg1 (min (point-max) (1+ end1)) '(face org-verse)))) |
| 5461 | (add-text-properties beg beg1 '(face org-block-begin-line)) | 5462 | (add-text-properties beg beg1 '(face org-block-begin-line)) |
| 5462 | (add-text-properties (1+ end) (1+ end1) '(face org-block-end-line)) | 5463 | (add-text-properties (min (point-max) (1+ end)) (min (point-max) (1+ end1)) |
| 5464 | '(face org-block-end-line)) | ||
| 5463 | t)) | 5465 | t)) |
| 5464 | ((member dc1 '("title:" "author:" "email:" "date:")) | 5466 | ((member dc1 '("title:" "author:" "email:" "date:")) |
| 5465 | (add-text-properties | 5467 | (add-text-properties |
| @@ -5475,7 +5477,7 @@ will be prompted for." | |||
| 5475 | ((not (member (char-after beg) '(?\ ?\t))) | 5477 | ((not (member (char-after beg) '(?\ ?\t))) |
| 5476 | ;; just any other in-buffer setting, but not indented | 5478 | ;; just any other in-buffer setting, but not indented |
| 5477 | (add-text-properties | 5479 | (add-text-properties |
| 5478 | beg (1+ (match-end 0)) | 5480 | beg (match-end 0) |
| 5479 | '(font-lock-fontified t face org-meta-line)) | 5481 | '(font-lock-fontified t face org-meta-line)) |
| 5480 | t) | 5482 | t) |
| 5481 | ((or (member dc1 '("begin:" "end:" "caption:" "label:" | 5483 | ((or (member dc1 '("begin:" "end:" "caption:" "label:" |
| @@ -13422,8 +13424,7 @@ With prefix ARG, realign all tags in headings in the current buffer." | |||
| 13422 | ;; Get a new set of tags from the user | 13424 | ;; Get a new set of tags from the user |
| 13423 | (save-excursion | 13425 | (save-excursion |
| 13424 | (setq table (append org-tag-persistent-alist | 13426 | (setq table (append org-tag-persistent-alist |
| 13425 | org-tag-alist | 13427 | (or org-tag-alist (org-get-buffer-tags)) |
| 13426 | (org-get-buffer-tags) | ||
| 13427 | (and | 13428 | (and |
| 13428 | org-complete-tags-always-offer-all-agenda-tags | 13429 | org-complete-tags-always-offer-all-agenda-tags |
| 13429 | (org-global-tags-completion-table | 13430 | (org-global-tags-completion-table |
| @@ -13725,11 +13726,9 @@ Returns the new tags string, or nil to not change the current settings." | |||
| 13725 | (condition-case nil | 13726 | (condition-case nil |
| 13726 | (setq tg (org-icompleting-read | 13727 | (setq tg (org-icompleting-read |
| 13727 | "Tag: " | 13728 | "Tag: " |
| 13728 | (delete-dups | 13729 | (or buffer-tags |
| 13729 | (append (or buffer-tags | 13730 | (with-current-buffer buf |
| 13730 | (with-current-buffer buf | 13731 | (org-get-buffer-tags))))) |
| 13731 | (mapcar 'car (org-get-buffer-tags)))) | ||
| 13732 | (mapcar 'car table))))) | ||
| 13733 | (quit (setq tg ""))) | 13732 | (quit (setq tg ""))) |
| 13734 | (when (string-match "\\S-" tg) | 13733 | (when (string-match "\\S-" tg) |
| 13735 | (add-to-list 'buffer-tags (list tg)) | 13734 | (add-to-list 'buffer-tags (list tg)) |
| @@ -20775,11 +20774,12 @@ This version does not only check the character property, but also | |||
| 20775 | If the heading only contains a TODO keyword, it is still still considered | 20774 | If the heading only contains a TODO keyword, it is still still considered |
| 20776 | empty." | 20775 | empty." |
| 20777 | (and (looking-at "[ \t]*$") | 20776 | (and (looking-at "[ \t]*$") |
| 20778 | (save-excursion | 20777 | (when org-todo-line-regexp |
| 20779 | (beginning-of-line 1) | 20778 | (save-excursion |
| 20780 | (let ((case-fold-search nil)) | 20779 | (beginning-of-line 1) |
| 20781 | (looking-at org-todo-line-regexp))) | 20780 | (let ((case-fold-search nil)) |
| 20782 | (string= (match-string 3) ""))) | 20781 | (looking-at org-todo-line-regexp) |
| 20782 | (string= (match-string 3) "")))))) | ||
| 20783 | 20783 | ||
| 20784 | (defun org-at-heading-or-item-p () | 20784 | (defun org-at-heading-or-item-p () |
| 20785 | (or (org-at-heading-p) (org-at-item-p))) | 20785 | (or (org-at-heading-p) (org-at-item-p))) |
diff --git a/lisp/pcmpl-rpm.el b/lisp/pcmpl-rpm.el index 8019b876562..f28469d791b 100644 --- a/lisp/pcmpl-rpm.el +++ b/lisp/pcmpl-rpm.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; pcmpl-rpm.el --- functions for dealing with rpm completions | 1 | ;;; pcmpl-rpm.el --- functions for dealing with rpm completions |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1999-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Package: pcomplete | 5 | ;; Package: pcomplete |
| 6 | 6 | ||
| @@ -29,6 +29,13 @@ | |||
| 29 | 29 | ||
| 30 | ;; Functions: | 30 | ;; Functions: |
| 31 | 31 | ||
| 32 | ;; FIXME rpm -qa can be slow, so: | ||
| 33 | ;; Adding --nodigest --nosignature is MUCH faster. | ||
| 34 | ;; (Probably need to test --help for those options though.) | ||
| 35 | ;; Consider caching the result (cf woman). | ||
| 36 | ;; Consider printing an explanatory message before running -qa. | ||
| 37 | ;; | ||
| 38 | ;; Seems pointless for this to be a defsubst. | ||
| 32 | (defsubst pcmpl-rpm-packages () | 39 | (defsubst pcmpl-rpm-packages () |
| 33 | (split-string (pcomplete-process-result "rpm" "-q" "-a"))) | 40 | (split-string (pcomplete-process-result "rpm" "-q" "-a"))) |
| 34 | 41 | ||
| @@ -92,6 +99,7 @@ | |||
| 92 | '("--changelog" | 99 | '("--changelog" |
| 93 | "--dbpath" | 100 | "--dbpath" |
| 94 | "--dump" | 101 | "--dump" |
| 102 | "--file" | ||
| 95 | "--ftpport" ;nyi for the next four | 103 | "--ftpport" ;nyi for the next four |
| 96 | "--ftpproxy" | 104 | "--ftpproxy" |
| 97 | "--httpport" | 105 | "--httpport" |
| @@ -112,6 +120,8 @@ | |||
| 112 | (pcomplete-here*)) | 120 | (pcomplete-here*)) |
| 113 | ((pcomplete-test "--rcfile") | 121 | ((pcomplete-test "--rcfile") |
| 114 | (pcomplete-here* (pcomplete-entries))) | 122 | (pcomplete-here* (pcomplete-entries))) |
| 123 | ((pcomplete-test "--file") | ||
| 124 | (pcomplete-here* (pcomplete-entries))) | ||
| 115 | ((pcomplete-test "--root") | 125 | ((pcomplete-test "--root") |
| 116 | (pcomplete-here* (pcomplete-dirs))) | 126 | (pcomplete-here* (pcomplete-dirs))) |
| 117 | ((pcomplete-test "--scripts") | 127 | ((pcomplete-test "--scripts") |
| @@ -129,7 +139,9 @@ | |||
| 129 | (pcomplete-opt "af.p(pcmpl-rpm-files)ilsdcvR") | 139 | (pcomplete-opt "af.p(pcmpl-rpm-files)ilsdcvR") |
| 130 | (if (pcomplete-test "-[^-]*p" 'first 1) | 140 | (if (pcomplete-test "-[^-]*p" 'first 1) |
| 131 | (pcomplete-here (pcmpl-rpm-files)) | 141 | (pcomplete-here (pcmpl-rpm-files)) |
| 132 | (pcomplete-here (pcmpl-rpm-packages)))))) | 142 | (if (pcomplete-test "-[^-]*f" 'first 1) |
| 143 | (pcomplete-here* (pcomplete-entries)) | ||
| 144 | (pcomplete-here (pcmpl-rpm-packages))))))) | ||
| 133 | ((pcomplete-test "--pipe") | 145 | ((pcomplete-test "--pipe") |
| 134 | (pcomplete-here* (funcall pcomplete-command-completion-function))) | 146 | (pcomplete-here* (funcall pcomplete-command-completion-function))) |
| 135 | ((pcomplete-test "--rmsource") | 147 | ((pcomplete-test "--rmsource") |
diff --git a/lisp/play/cookie1.el b/lisp/play/cookie1.el index 06bd962d925..cbf29a26a71 100644 --- a/lisp/play/cookie1.el +++ b/lisp/play/cookie1.el | |||
| @@ -96,6 +96,8 @@ of load, ENDMSG at the end." | |||
| 96 | "Reads in the PHRASE-FILE, returns it as a vector of strings. | 96 | "Reads in the PHRASE-FILE, returns it as a vector of strings. |
| 97 | Emit STARTMSG and ENDMSG before and after. Caches the result; second | 97 | Emit STARTMSG and ENDMSG before and after. Caches the result; second |
| 98 | and subsequent calls on the same file won't go to disk." | 98 | and subsequent calls on the same file won't go to disk." |
| 99 | (or (file-readable-p phrase-file) | ||
| 100 | (error "Cannot read file `%s'" phrase-file)) | ||
| 99 | (let ((sym (intern-soft phrase-file cookie-cache))) | 101 | (let ((sym (intern-soft phrase-file cookie-cache))) |
| 100 | (and sym (not (equal (symbol-function sym) | 102 | (and sym (not (equal (symbol-function sym) |
| 101 | (nth 5 (file-attributes phrase-file)))) | 103 | (nth 5 (file-attributes phrase-file)))) |
diff --git a/lisp/play/yow.el b/lisp/play/yow.el index fa32fdf8272..cb02a839cde 100644 --- a/lisp/play/yow.el +++ b/lisp/play/yow.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; yow.el --- quote random zippyisms | 1 | ;;; yow.el --- quote random zippyisms |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1993-1995, 2000-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1993-1995, 2000-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Maintainer: FSF | 5 | ;; Maintainer: FSF |
| 6 | ;; Author: Richard Mlynarik | 6 | ;; Author: Richard Mlynarik |
| @@ -24,10 +24,6 @@ | |||
| 24 | ;;; Commentary: | 24 | ;;; Commentary: |
| 25 | 25 | ||
| 26 | ;; Important pinheadery for GNU Emacs. | 26 | ;; Important pinheadery for GNU Emacs. |
| 27 | ;; | ||
| 28 | ;; See cookie1.el for implementation. Note --- the `n' argument of yow | ||
| 29 | ;; from the 18.xx implementation is no longer; we only support *random* | ||
| 30 | ;; random access now. | ||
| 31 | 27 | ||
| 32 | ;;; Code: | 28 | ;;; Code: |
| 33 | 29 | ||
| @@ -38,7 +34,7 @@ | |||
| 38 | :prefix "yow-" | 34 | :prefix "yow-" |
| 39 | :group 'games) | 35 | :group 'games) |
| 40 | 36 | ||
| 41 | (defcustom yow-file (concat data-directory "yow.lines") | 37 | (defcustom yow-file (expand-file-name "yow.lines" data-directory) |
| 42 | "File containing pertinent pinhead phrases." | 38 | "File containing pertinent pinhead phrases." |
| 43 | :type 'file | 39 | :type 'file |
| 44 | :group 'yow) | 40 | :group 'yow) |
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 55ab6c9981c..9cf20ccb516 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el | |||
| @@ -679,7 +679,7 @@ settings of `c-cleanup-list' are done." | |||
| 679 | ;; We want to inhibit blinking the paren since this would be | 679 | ;; We want to inhibit blinking the paren since this would be |
| 680 | ;; most disruptive. We'll blink it ourselves later on. | 680 | ;; most disruptive. We'll blink it ourselves later on. |
| 681 | (old-blink-paren blink-paren-function) | 681 | (old-blink-paren blink-paren-function) |
| 682 | blink-paren-function) | 682 | blink-paren-function case-fold-search) |
| 683 | 683 | ||
| 684 | (c-save-buffer-state () | 684 | (c-save-buffer-state () |
| 685 | (setq safepos (c-safe-position (point) (c-parse-state)) | 685 | (setq safepos (c-safe-position (point) (c-parse-state)) |
| @@ -1086,7 +1086,7 @@ numeric argument is supplied, or the point is inside a literal." | |||
| 1086 | 1086 | ||
| 1087 | (interactive "*P") | 1087 | (interactive "*P") |
| 1088 | (let ((c-echo-syntactic-information-p nil) | 1088 | (let ((c-echo-syntactic-information-p nil) |
| 1089 | final-pos close-paren-inserted found-delim) | 1089 | final-pos close-paren-inserted found-delim case-fold-search) |
| 1090 | 1090 | ||
| 1091 | (self-insert-command (prefix-numeric-value arg)) | 1091 | (self-insert-command (prefix-numeric-value arg)) |
| 1092 | (setq final-pos (point)) | 1092 | (setq final-pos (point)) |
| @@ -1172,7 +1172,8 @@ newline cleanups are done if appropriate; see the variable `c-cleanup-list'." | |||
| 1172 | (interactive "*P") | 1172 | (interactive "*P") |
| 1173 | (let ((literal (c-save-buffer-state () (c-in-literal))) | 1173 | (let ((literal (c-save-buffer-state () (c-in-literal))) |
| 1174 | ;; shut this up | 1174 | ;; shut this up |
| 1175 | (c-echo-syntactic-information-p nil)) | 1175 | (c-echo-syntactic-information-p nil) |
| 1176 | case-fold-search) | ||
| 1176 | (self-insert-command (prefix-numeric-value arg)) | 1177 | (self-insert-command (prefix-numeric-value arg)) |
| 1177 | 1178 | ||
| 1178 | (if (and (not arg) (not literal)) | 1179 | (if (and (not arg) (not literal)) |
| @@ -1585,7 +1586,7 @@ defun." | |||
| 1585 | ; structure with other users of c-state-cache. | 1586 | ; structure with other users of c-state-cache. |
| 1586 | (orig-point-min (point-min)) (orig-point-max (point-max)) | 1587 | (orig-point-min (point-min)) (orig-point-max (point-max)) |
| 1587 | lim ; Position of { which has been widened to. | 1588 | lim ; Position of { which has been widened to. |
| 1588 | where pos) | 1589 | where pos case-fold-search) |
| 1589 | 1590 | ||
| 1590 | (save-restriction | 1591 | (save-restriction |
| 1591 | (if (eq c-defun-tactic 'go-outward) | 1592 | (if (eq c-defun-tactic 'go-outward) |
| @@ -1709,7 +1710,8 @@ the open-parenthesis that starts a defun; see `beginning-of-defun'." | |||
| 1709 | ; structure with other users of c-state-cache. | 1710 | ; structure with other users of c-state-cache. |
| 1710 | (orig-point-min (point-min)) (orig-point-max (point-max)) | 1711 | (orig-point-min (point-min)) (orig-point-max (point-max)) |
| 1711 | lim | 1712 | lim |
| 1712 | where pos) | 1713 | where pos case-fold-search) |
| 1714 | |||
| 1713 | (save-restriction | 1715 | (save-restriction |
| 1714 | (if (eq c-defun-tactic 'go-outward) | 1716 | (if (eq c-defun-tactic 'go-outward) |
| 1715 | (setq lim (c-widen-to-enclosing-decl-scope ; e.g. class, namespace | 1717 | (setq lim (c-widen-to-enclosing-decl-scope ; e.g. class, namespace |
| @@ -1769,8 +1771,8 @@ with a brace block." | |||
| 1769 | (interactive) | 1771 | (interactive) |
| 1770 | (c-save-buffer-state | 1772 | (c-save-buffer-state |
| 1771 | (beginning-of-defun-function end-of-defun-function | 1773 | (beginning-of-defun-function end-of-defun-function |
| 1772 | where pos name-end) | 1774 | where pos name-end case-fold-search) |
| 1773 | 1775 | ||
| 1774 | (save-restriction | 1776 | (save-restriction |
| 1775 | (widen) | 1777 | (widen) |
| 1776 | (save-excursion | 1778 | (save-excursion |
| @@ -1969,7 +1971,7 @@ As opposed to \\[c-beginning-of-defun] and \\[c-end-of-defun], this | |||
| 1969 | function does not require the declaration to contain a brace block." | 1971 | function does not require the declaration to contain a brace block." |
| 1970 | (interactive) | 1972 | (interactive) |
| 1971 | 1973 | ||
| 1972 | (let (decl-limits) | 1974 | (let (decl-limits case-fold-search) |
| 1973 | (c-save-buffer-state nil | 1975 | (c-save-buffer-state nil |
| 1974 | ;; We try to be line oriented, unless there are several | 1976 | ;; We try to be line oriented, unless there are several |
| 1975 | ;; declarations on the same line. | 1977 | ;; declarations on the same line. |
| @@ -2001,11 +2003,12 @@ function does not require the declaration to contain a brace block." | |||
| 2001 | (defun c-cpp-define-name () | 2003 | (defun c-cpp-define-name () |
| 2002 | "Return the name of the current CPP macro, or NIL if we're not in one." | 2004 | "Return the name of the current CPP macro, or NIL if we're not in one." |
| 2003 | (interactive) | 2005 | (interactive) |
| 2004 | (save-excursion | 2006 | (let (case-fold-search) |
| 2005 | (and c-opt-cpp-macro-define-start | 2007 | (save-excursion |
| 2006 | (c-beginning-of-macro) | 2008 | (and c-opt-cpp-macro-define-start |
| 2007 | (looking-at c-opt-cpp-macro-define-start) | 2009 | (c-beginning-of-macro) |
| 2008 | (match-string-no-properties 1)))) | 2010 | (looking-at c-opt-cpp-macro-define-start) |
| 2011 | (match-string-no-properties 1))))) | ||
| 2009 | 2012 | ||
| 2010 | 2013 | ||
| 2011 | ;; Movement by statements. | 2014 | ;; Movement by statements. |
| @@ -2888,7 +2891,8 @@ See `c-indent-comment-alist' for a description." | |||
| 2888 | (eq (match-end 0) eot)) | 2891 | (eq (match-end 0) eot)) |
| 2889 | 'cpp-end-block) | 2892 | 'cpp-end-block) |
| 2890 | (t | 2893 | (t |
| 2891 | 'other)))) | 2894 | 'other))) |
| 2895 | case-fold-search) | ||
| 2892 | (if (and (memq line-type '(anchored-comment empty-line)) | 2896 | (if (and (memq line-type '(anchored-comment empty-line)) |
| 2893 | c-indent-comments-syntactically-p) | 2897 | c-indent-comments-syntactically-p) |
| 2894 | (let ((c-syntactic-context (c-guess-basic-syntax))) | 2898 | (let ((c-syntactic-context (c-guess-basic-syntax))) |
| @@ -3024,7 +3028,7 @@ are treated as conditional clause limits. Normally they are ignored." | |||
| 3024 | (let* ((forward (> count 0)) | 3028 | (let* ((forward (> count 0)) |
| 3025 | (increment (if forward -1 1)) | 3029 | (increment (if forward -1 1)) |
| 3026 | (search-function (if forward 're-search-forward 're-search-backward)) | 3030 | (search-function (if forward 're-search-forward 're-search-backward)) |
| 3027 | new) | 3031 | new case-fold-search) |
| 3028 | (unless (integerp target-depth) | 3032 | (unless (integerp target-depth) |
| 3029 | (setq target-depth (if target-depth -1 0))) | 3033 | (setq target-depth (if target-depth -1 0))) |
| 3030 | (save-excursion | 3034 | (save-excursion |
| @@ -3226,7 +3230,7 @@ balanced expression is found." | |||
| 3226 | In the macro case this also has the effect of realigning any line | 3230 | In the macro case this also has the effect of realigning any line |
| 3227 | continuation backslashes, unless `c-auto-align-backslashes' is nil." | 3231 | continuation backslashes, unless `c-auto-align-backslashes' is nil." |
| 3228 | (interactive "*") | 3232 | (interactive "*") |
| 3229 | (let ((here (point-marker)) decl-limits) | 3233 | (let ((here (point-marker)) decl-limits case-fold-search) |
| 3230 | (unwind-protect | 3234 | (unwind-protect |
| 3231 | (progn | 3235 | (progn |
| 3232 | (c-save-buffer-state nil | 3236 | (c-save-buffer-state nil |
| @@ -4638,7 +4642,8 @@ inside a preprocessor directive." | |||
| 4638 | 4642 | ||
| 4639 | (interactive "*") | 4643 | (interactive "*") |
| 4640 | (let* (c-lit-limits c-lit-type | 4644 | (let* (c-lit-limits c-lit-type |
| 4641 | (c-macro-start c-macro-start)) | 4645 | (c-macro-start c-macro-start) |
| 4646 | case-fold-search) | ||
| 4642 | 4647 | ||
| 4643 | (c-save-buffer-state () | 4648 | (c-save-buffer-state () |
| 4644 | (setq c-lit-limits (c-literal-limits nil nil t) | 4649 | (setq c-lit-limits (c-literal-limits nil nil t) |
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index cf38001c123..65e28c11e21 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -5382,7 +5382,7 @@ comment at the start of cc-engine.el for more info." | |||
| 5382 | new-beg new-end need-new-beg need-new-end) | 5382 | new-beg new-end need-new-beg need-new-end) |
| 5383 | ;; Locate the barrier before the changed region | 5383 | ;; Locate the barrier before the changed region |
| 5384 | (goto-char (if beg-lit-limits (car beg-lit-limits) beg)) | 5384 | (goto-char (if beg-lit-limits (car beg-lit-limits) beg)) |
| 5385 | (c-syntactic-skip-backward "^;{}" (max (- beg 2048) (point-min))) | 5385 | (c-syntactic-skip-backward "^;{}" (c-determine-limit 512)) |
| 5386 | (setq new-beg (point)) | 5386 | (setq new-beg (point)) |
| 5387 | 5387 | ||
| 5388 | ;; Remove the syntax-table properties from each pertinent <...> pair. | 5388 | ;; Remove the syntax-table properties from each pertinent <...> pair. |
| @@ -5393,8 +5393,7 @@ comment at the start of cc-engine.el for more info." | |||
| 5393 | 5393 | ||
| 5394 | ;; Locate the barrier after END. | 5394 | ;; Locate the barrier after END. |
| 5395 | (goto-char (if end-lit-limits (cdr end-lit-limits) end)) | 5395 | (goto-char (if end-lit-limits (cdr end-lit-limits) end)) |
| 5396 | (c-syntactic-re-search-forward "[;{}]" | 5396 | (c-syntactic-re-search-forward "[;{}]" (c-determine-+ve-limit 512) 'end) |
| 5397 | (min (+ end 2048) (point-max)) 'end) | ||
| 5398 | (setq new-end (point)) | 5397 | (setq new-end (point)) |
| 5399 | 5398 | ||
| 5400 | ;; Remove syntax-table properties from the remaining pertinent <...> | 5399 | ;; Remove syntax-table properties from the remaining pertinent <...> |
diff --git a/lisp/progmodes/cc-menus.el b/lisp/progmodes/cc-menus.el index f57fcbff5ca..a53d65f6307 100644 --- a/lisp/progmodes/cc-menus.el +++ b/lisp/progmodes/cc-menus.el | |||
| @@ -63,6 +63,20 @@ For example: | |||
| 63 | 63 | ||
| 64 | A sample value might look like: `\\(_P\\|_PROTO\\)'.") | 64 | A sample value might look like: `\\(_P\\|_PROTO\\)'.") |
| 65 | 65 | ||
| 66 | ;; *Warning for cc-mode developers* | ||
| 67 | ;; | ||
| 68 | ;; `cc-imenu-objc-generic-expression' elements depend on | ||
| 69 | ;; `cc-imenu-c++-generic-expression'. So if you change this | ||
| 70 | ;; expression, you need to change following variables, | ||
| 71 | ;; `cc-imenu-objc-generic-expression-*-index', | ||
| 72 | ;; too. `cc-imenu-objc-function' uses these *-index variables, in | ||
| 73 | ;; order to know where the each regexp *group \\(foobar\\)* elements | ||
| 74 | ;; are started. | ||
| 75 | ;; | ||
| 76 | ;; *-index variables are initialized during `cc-imenu-objc-generic-expression' | ||
| 77 | ;; being initialized. | ||
| 78 | ;; | ||
| 79 | |||
| 66 | (defvar cc-imenu-c++-generic-expression | 80 | (defvar cc-imenu-c++-generic-expression |
| 67 | `( | 81 | `( |
| 68 | ;; Try to match ::operator definitions first. Otherwise `X::operator new ()' | 82 | ;; Try to match ::operator definitions first. Otherwise `X::operator new ()' |
| @@ -187,23 +201,8 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") | |||
| 187 | ")" | 201 | ")" |
| 188 | "[.," c-alnum " \t\n\r]*" | 202 | "[.," c-alnum " \t\n\r]*" |
| 189 | "{" | 203 | "{" |
| 190 | )) 1)) | 204 | )) 1)) |
| 191 | "Imenu generic expression for Java mode. See | 205 | "Imenu generic expression for Java mode. See `imenu-generic-expression'.") |
| 192 | `imenu-generic-expression'.") | ||
| 193 | |||
| 194 | ;; *Warning for cc-mode developers* | ||
| 195 | ;; | ||
| 196 | ;; `cc-imenu-objc-generic-expression' elements depend on | ||
| 197 | ;; `cc-imenu-c++-generic-expression'. So if you change this | ||
| 198 | ;; expression, you need to change following variables, | ||
| 199 | ;; `cc-imenu-objc-generic-expression-*-index', | ||
| 200 | ;; too. `cc-imenu-objc-function' uses these *-index variables, in | ||
| 201 | ;; order to know where the each regexp *group \\(foobar\\)* elements | ||
| 202 | ;; are started. | ||
| 203 | ;; | ||
| 204 | ;; *-index variables are initialized during `cc-imenu-objc-generic-expression' | ||
| 205 | ;; being initialized. | ||
| 206 | ;; | ||
| 207 | 206 | ||
| 208 | ;; Internal variables | 207 | ;; Internal variables |
| 209 | (defvar cc-imenu-objc-generic-expression-noreturn-index nil) | 208 | (defvar cc-imenu-objc-generic-expression-noreturn-index nil) |
| @@ -224,7 +223,7 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") | |||
| 224 | "\\|" | 223 | "\\|" |
| 225 | ;; > General function name regexp | 224 | ;; > General function name regexp |
| 226 | ;; Pick a token by (match-string 3) | 225 | ;; Pick a token by (match-string 3) |
| 227 | (car (cdr (nth 2 cc-imenu-c++-generic-expression))) ; -> index += 5 | 226 | (car (cdr (nth 2 cc-imenu-c++-generic-expression))) ; -> index += 6 |
| 228 | (prog2 (setq cc-imenu-objc-generic-expression-general-func-index 3) "") | 227 | (prog2 (setq cc-imenu-objc-generic-expression-general-func-index 3) "") |
| 229 | ;; > Special case for definitions using phony prototype macros like: | 228 | ;; > Special case for definitions using phony prototype macros like: |
| 230 | ;; > `int main _PROTO( (int argc,char *argv[]) )'. | 229 | ;; > `int main _PROTO( (int argc,char *argv[]) )'. |
| @@ -233,11 +232,11 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") | |||
| 233 | (concat | 232 | (concat |
| 234 | "\\|" | 233 | "\\|" |
| 235 | (car (cdr (nth 3 cc-imenu-c++-generic-expression))) ; -> index += 1 | 234 | (car (cdr (nth 3 cc-imenu-c++-generic-expression))) ; -> index += 1 |
| 236 | (prog2 (setq cc-imenu-objc-generic-expression-objc-base-index 9) "") | 235 | (prog2 (setq cc-imenu-objc-generic-expression-objc-base-index 10) "") |
| 237 | ) | 236 | ) |
| 238 | (prog2 (setq cc-imenu-objc-generic-expression-objc-base-index 8) "") | 237 | (prog2 (setq cc-imenu-objc-generic-expression-objc-base-index 9) "") |
| 239 | "") ; -> index += 0 | 238 | "") ; -> index += 0 |
| 240 | (prog2 (setq cc-imenu-objc-generic-expression-proto-index 8) "") | 239 | (prog2 (setq cc-imenu-objc-generic-expression-proto-index 9) "") |
| 241 | ;; | 240 | ;; |
| 242 | ;; For Objective-C | 241 | ;; For Objective-C |
| 243 | ;; Pick a token by (match-string 8 or 9) | 242 | ;; Pick a token by (match-string 8 or 9) |
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 7c018feefbb..ff18f56bbe8 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el | |||
| @@ -1170,10 +1170,10 @@ Note that the style variables are always made local to the buffer." | |||
| 1170 | ;; | 1170 | ;; |
| 1171 | ;; | 1171 | ;; |
| 1172 | ;; void myfunc(T* p) {} | 1172 | ;; void myfunc(T* p) {} |
| 1173 | ;; | 1173 | ;; |
| 1174 | ;; Type a space in the first blank line, and the fontification of the next | 1174 | ;; Type a space in the first blank line, and the fontification of the next |
| 1175 | ;; line was fouled up by context fontification. | 1175 | ;; line was fouled up by context fontification. |
| 1176 | (let ((new-beg beg) (new-end end) new-region) | 1176 | (let ((new-beg beg) (new-end end) new-region case-fold-search) |
| 1177 | (if c-in-after-change-fontification | 1177 | (if c-in-after-change-fontification |
| 1178 | (setq c-in-after-change-fontification nil) | 1178 | (setq c-in-after-change-fontification nil) |
| 1179 | (save-restriction | 1179 | (save-restriction |
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 07393c6954d..ed8eb81932e 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el | |||
| @@ -1356,8 +1356,12 @@ if ARG is omitted or nil." | |||
| 1356 | (setq flymake-timer | 1356 | (setq flymake-timer |
| 1357 | (run-at-time nil 1 'flymake-on-timer-event (current-buffer))) | 1357 | (run-at-time nil 1 'flymake-on-timer-event (current-buffer))) |
| 1358 | 1358 | ||
| 1359 | (when flymake-start-syntax-check-on-find-file | 1359 | (when (and flymake-start-syntax-check-on-find-file |
| 1360 | (flymake-start-syntax-check))))) | 1360 | ;; Since we write temp files in current dir, there's no point |
| 1361 | ;; trying if the directory is read-only (bug#8954). | ||
| 1362 | (file-writable-p (file-name-directory buffer-file-name))) | ||
| 1363 | (with-demoted-errors | ||
| 1364 | (flymake-start-syntax-check)))))) | ||
| 1361 | 1365 | ||
| 1362 | ;; Turning the mode OFF. | 1366 | ;; Turning the mode OFF. |
| 1363 | (t | 1367 | (t |
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 89450cd2276..1be74ff544b 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el | |||
| @@ -375,9 +375,8 @@ Emacs always switches to the thread which caused the stop." | |||
| 375 | :version "23.2" | 375 | :version "23.2" |
| 376 | :link '(info-link "(gdb)GDB/MI Async Records")) | 376 | :link '(info-link "(gdb)GDB/MI Async Records")) |
| 377 | 377 | ||
| 378 | (defcustom gdb-stopped-hooks nil | 378 | (defcustom gdb-stopped-functions nil |
| 379 | "This variable holds a list of functions to be called whenever | 379 | "List of functions called whenever GDB stops. |
| 380 | GDB stops. | ||
| 381 | 380 | ||
| 382 | Each function takes one argument, a parsed MI response, which | 381 | Each function takes one argument, a parsed MI response, which |
| 383 | contains fields of corresponding MI *stopped async record: | 382 | contains fields of corresponding MI *stopped async record: |
| @@ -818,6 +817,8 @@ detailed description of this mode. | |||
| 818 | nil 'local) | 817 | nil 'local) |
| 819 | (local-set-key "\C-i" 'completion-at-point) | 818 | (local-set-key "\C-i" 'completion-at-point) |
| 820 | 819 | ||
| 820 | (local-set-key [remap comint-delchar-or-maybe-eof] 'gdb-delchar-or-quit) | ||
| 821 | |||
| 821 | (setq gdb-first-prompt t) | 822 | (setq gdb-first-prompt t) |
| 822 | (setq gud-running nil) | 823 | (setq gud-running nil) |
| 823 | 824 | ||
| @@ -859,15 +860,8 @@ detailed description of this mode. | |||
| 859 | 860 | ||
| 860 | (gdb-get-buffer-create 'gdb-inferior-io) | 861 | (gdb-get-buffer-create 'gdb-inferior-io) |
| 861 | (gdb-clear-inferior-io) | 862 | (gdb-clear-inferior-io) |
| 862 | (set-process-filter (get-process "gdb-inferior") 'gdb-inferior-filter) | 863 | (gdb-inferior-io--init-proc (get-process "gdb-inferior")) |
| 863 | (gdb-input | 864 | |
| 864 | ;; Needs GDB 6.4 onwards | ||
| 865 | (concat "-inferior-tty-set " | ||
| 866 | (or | ||
| 867 | ;; The process can run on a remote host. | ||
| 868 | (process-get (get-process "gdb-inferior") 'remote-tty) | ||
| 869 | (process-tty-name (get-process "gdb-inferior")))) | ||
| 870 | 'ignore) | ||
| 871 | (if (eq window-system 'w32) | 865 | (if (eq window-system 'w32) |
| 872 | (gdb-input "-gdb-set new-console off" 'ignore)) | 866 | (gdb-input "-gdb-set new-console off" 'ignore)) |
| 873 | (gdb-input "-gdb-set height 0" 'ignore) | 867 | (gdb-input "-gdb-set height 0" 'ignore) |
| @@ -905,6 +899,25 @@ detailed description of this mode. | |||
| 905 | (setq gdb-non-stop nil) | 899 | (setq gdb-non-stop nil) |
| 906 | (gdb-input "-gdb-set non-stop 0" 'ignore))) | 900 | (gdb-input "-gdb-set non-stop 0" 'ignore))) |
| 907 | 901 | ||
| 902 | (defun gdb-delchar-or-quit (arg) | ||
| 903 | "Delete ARG characters or send a quit command to GDB. | ||
| 904 | Send a quit only if point is at the end of the buffer, there is | ||
| 905 | no input, and GDB is waiting for input." | ||
| 906 | (interactive "p") | ||
| 907 | (unless (and (eq (current-buffer) gud-comint-buffer) | ||
| 908 | (eq gud-minor-mode 'gdbmi)) | ||
| 909 | (error "Not in a GDB-MI buffer")) | ||
| 910 | (let ((proc (get-buffer-process gud-comint-buffer))) | ||
| 911 | (if (and (eobp) proc (process-live-p proc) | ||
| 912 | (not gud-running) | ||
| 913 | (= (point) (marker-position (process-mark proc)))) | ||
| 914 | ;; Sending an EOF does not work with GDB-MI; submit an | ||
| 915 | ;; explicit quit command. | ||
| 916 | (progn | ||
| 917 | (insert "quit") | ||
| 918 | (comint-send-input t t)) | ||
| 919 | (delete-char arg)))) | ||
| 920 | |||
| 908 | (defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.") | 921 | (defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.") |
| 909 | 922 | ||
| 910 | (defun gdb-create-define-alist () | 923 | (defun gdb-create-define-alist () |
| @@ -929,7 +942,6 @@ detailed description of this mode. | |||
| 929 | (push (cons name define) gdb-define-alist)))) | 942 | (push (cons name define) gdb-define-alist)))) |
| 930 | 943 | ||
| 931 | (declare-function tooltip-show "tooltip" (text &optional use-echo-area)) | 944 | (declare-function tooltip-show "tooltip" (text &optional use-echo-area)) |
| 932 | (defvar tooltip-use-echo-area) | ||
| 933 | 945 | ||
| 934 | (defun gdb-tooltip-print (expr) | 946 | (defun gdb-tooltip-print (expr) |
| 935 | (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer) | 947 | (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer) |
| @@ -937,7 +949,7 @@ detailed description of this mode. | |||
| 937 | (if (re-search-forward ".*value=\\(\".*\"\\)" nil t) | 949 | (if (re-search-forward ".*value=\\(\".*\"\\)" nil t) |
| 938 | (tooltip-show | 950 | (tooltip-show |
| 939 | (concat expr " = " (read (match-string 1))) | 951 | (concat expr " = " (read (match-string 1))) |
| 940 | (or gud-tooltip-echo-area tooltip-use-echo-area | 952 | (or gud-tooltip-echo-area |
| 941 | (not (display-graphic-p))))))) | 953 | (not (display-graphic-p))))))) |
| 942 | 954 | ||
| 943 | ;; If expr is a macro for a function don't print because of possible dangerous | 955 | ;; If expr is a macro for a function don't print because of possible dangerous |
| @@ -1056,7 +1068,7 @@ positive, otherwise don't automatically raise it." | |||
| 1056 | (if gdb-speedbar-auto-raise "en" "dis")))) | 1068 | (if gdb-speedbar-auto-raise "en" "dis")))) |
| 1057 | 1069 | ||
| 1058 | (define-key gud-minor-mode-map "\C-c\C-w" 'gud-watch) | 1070 | (define-key gud-minor-mode-map "\C-c\C-w" 'gud-watch) |
| 1059 | (define-key global-map (concat gud-key-prefix "\C-w") 'gud-watch) | 1071 | (define-key global-map (vconcat gud-key-prefix "\C-w") 'gud-watch) |
| 1060 | 1072 | ||
| 1061 | (declare-function tooltip-identifier-from-point "tooltip" (point)) | 1073 | (declare-function tooltip-identifier-from-point "tooltip" (point)) |
| 1062 | 1074 | ||
| @@ -1510,6 +1522,31 @@ DOC is an optional documentation string." | |||
| 1510 | (gdb-display-buffer | 1522 | (gdb-display-buffer |
| 1511 | (gdb-get-buffer-create 'gdb-inferior-io) t)) | 1523 | (gdb-get-buffer-create 'gdb-inferior-io) t)) |
| 1512 | 1524 | ||
| 1525 | (defun gdb-inferior-io--init-proc (proc) | ||
| 1526 | ;; Set up inferior I/O. Needs GDB 6.4 onwards. | ||
| 1527 | (set-process-filter proc 'gdb-inferior-filter) | ||
| 1528 | (set-process-sentinel proc 'gdb-inferior-io-sentinel) | ||
| 1529 | (gdb-input | ||
| 1530 | (concat "-inferior-tty-set " | ||
| 1531 | ;; The process can run on a remote host. | ||
| 1532 | (or (process-get proc 'remote-tty) | ||
| 1533 | (process-tty-name proc))) | ||
| 1534 | 'ignore)) | ||
| 1535 | |||
| 1536 | (defun gdb-inferior-io-sentinel (proc str) | ||
| 1537 | (when (eq (process-status proc) 'failed) | ||
| 1538 | ;; When the debugged process exits, Emacs gets an EIO error on | ||
| 1539 | ;; read from the pty, and stops listening to it. If the gdb | ||
| 1540 | ;; process is still running, remove the pty, make a new one, and | ||
| 1541 | ;; pass it to gdb. | ||
| 1542 | (let ((gdb-proc (get-buffer-process gud-comint-buffer)) | ||
| 1543 | (io-buffer (process-buffer proc))) | ||
| 1544 | (when (and gdb-proc (process-live-p gdb-proc) | ||
| 1545 | (buffer-live-p io-buffer)) | ||
| 1546 | ;; `comint-exec' deletes the original process as a side effect. | ||
| 1547 | (comint-exec io-buffer "gdb-inferior" nil nil nil) | ||
| 1548 | (gdb-inferior-io--init-proc (get-buffer-process io-buffer)))))) | ||
| 1549 | |||
| 1513 | (defconst gdb-frame-parameters | 1550 | (defconst gdb-frame-parameters |
| 1514 | '((height . 14) (width . 80) | 1551 | '((height . 14) (width . 80) |
| 1515 | (unsplittable . t) | 1552 | (unsplittable . t) |
| @@ -1746,24 +1783,27 @@ If `gdb-thread-number' is nil, just wrap NAME in asterisks." | |||
| 1746 | (setq gdb-output-sink 'user) | 1783 | (setq gdb-output-sink 'user) |
| 1747 | (setq gdb-pending-triggers nil)) | 1784 | (setq gdb-pending-triggers nil)) |
| 1748 | 1785 | ||
| 1749 | (defun gdb-update () | 1786 | (defun gdb-update (&optional no-proc) |
| 1750 | "Update buffers showing status of debug session." | 1787 | "Update buffers showing status of debug session. |
| 1788 | If NO-PROC is non-nil, do not try to contact the GDB process." | ||
| 1751 | (when gdb-first-prompt | 1789 | (when gdb-first-prompt |
| 1752 | (gdb-force-mode-line-update | 1790 | (gdb-force-mode-line-update |
| 1753 | (propertize "initializing..." 'face font-lock-variable-name-face)) | 1791 | (propertize "initializing..." 'face font-lock-variable-name-face)) |
| 1754 | (gdb-init-1) | 1792 | (gdb-init-1) |
| 1755 | (setq gdb-first-prompt nil)) | 1793 | (setq gdb-first-prompt nil)) |
| 1756 | 1794 | ||
| 1757 | (gdb-get-main-selected-frame) | 1795 | (unless no-proc |
| 1796 | (gdb-get-main-selected-frame)) | ||
| 1797 | |||
| 1758 | ;; We may need to update gdb-threads-list so we can use | 1798 | ;; We may need to update gdb-threads-list so we can use |
| 1759 | (gdb-get-buffer-create 'gdb-threads-buffer) | 1799 | (gdb-get-buffer-create 'gdb-threads-buffer) |
| 1760 | ;; gdb-break-list is maintained in breakpoints handler | 1800 | ;; gdb-break-list is maintained in breakpoints handler |
| 1761 | (gdb-get-buffer-create 'gdb-breakpoints-buffer) | 1801 | (gdb-get-buffer-create 'gdb-breakpoints-buffer) |
| 1762 | 1802 | ||
| 1763 | (gdb-emit-signal gdb-buf-publisher 'update) | 1803 | (unless no-proc |
| 1804 | (gdb-emit-signal gdb-buf-publisher 'update)) | ||
| 1764 | 1805 | ||
| 1765 | (gdb-get-changed-registers) | 1806 | (gdb-get-changed-registers) |
| 1766 | |||
| 1767 | (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) | 1807 | (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) |
| 1768 | (dolist (var gdb-var-list) | 1808 | (dolist (var gdb-var-list) |
| 1769 | (setcar (nthcdr 5 var) nil)) | 1809 | (setcar (nthcdr 5 var) nil)) |
| @@ -2045,7 +2085,7 @@ current thread and update GDB buffers." | |||
| 2045 | ;; In all-stop this updates gud-running properly as well. | 2085 | ;; In all-stop this updates gud-running properly as well. |
| 2046 | (gdb-update) | 2086 | (gdb-update) |
| 2047 | (setq gdb-first-done-or-error nil)) | 2087 | (setq gdb-first-done-or-error nil)) |
| 2048 | (run-hook-with-args 'gdb-stopped-hooks result))) | 2088 | (run-hook-with-args 'gdb-stopped-functions result))) |
| 2049 | 2089 | ||
| 2050 | ;; Remove the trimmings from log stream containing debugging messages | 2090 | ;; Remove the trimmings from log stream containing debugging messages |
| 2051 | ;; being produced by GDB's internals, use warning face and send to GUD | 2091 | ;; being produced by GDB's internals, use warning face and send to GUD |
| @@ -2085,23 +2125,28 @@ current thread and update GDB buffers." | |||
| 2085 | (setq gdb-output-sink 'emacs)) | 2125 | (setq gdb-output-sink 'emacs)) |
| 2086 | 2126 | ||
| 2087 | (gdb-clear-partial-output) | 2127 | (gdb-clear-partial-output) |
| 2088 | (when gdb-first-done-or-error | ||
| 2089 | (unless (or token-number gud-running) | ||
| 2090 | (setq gdb-filter-output (concat gdb-filter-output gdb-prompt-name))) | ||
| 2091 | (gdb-update) | ||
| 2092 | (setq gdb-first-done-or-error nil)) | ||
| 2093 | 2128 | ||
| 2094 | (setq gdb-filter-output | 2129 | ;; The process may already be dead (e.g. C-d at the gdb prompt). |
| 2095 | (gdb-concat-output gdb-filter-output output-field)) | 2130 | (let* ((proc (get-buffer-process gud-comint-buffer)) |
| 2131 | (no-proc (or (null proc) | ||
| 2132 | (memq (process-status proc) '(exit signal))))) | ||
| 2096 | 2133 | ||
| 2097 | (if token-number | 2134 | (when gdb-first-done-or-error |
| 2098 | (progn | 2135 | (unless (or token-number gud-running no-proc) |
| 2099 | (with-current-buffer | 2136 | (setq gdb-filter-output (concat gdb-filter-output gdb-prompt-name))) |
| 2100 | (gdb-get-buffer-create 'gdb-partial-output-buffer) | 2137 | (gdb-update no-proc) |
| 2101 | (funcall | 2138 | (setq gdb-first-done-or-error nil)) |
| 2102 | (cdr (assoc (string-to-number token-number) gdb-handler-alist)))) | 2139 | |
| 2103 | (setq gdb-handler-alist | 2140 | (setq gdb-filter-output |
| 2104 | (assq-delete-all token-number gdb-handler-alist))))) | 2141 | (gdb-concat-output gdb-filter-output output-field)) |
| 2142 | |||
| 2143 | (when token-number | ||
| 2144 | (with-current-buffer | ||
| 2145 | (gdb-get-buffer-create 'gdb-partial-output-buffer) | ||
| 2146 | (funcall | ||
| 2147 | (cdr (assoc (string-to-number token-number) gdb-handler-alist)))) | ||
| 2148 | (setq gdb-handler-alist | ||
| 2149 | (assq-delete-all token-number gdb-handler-alist))))) | ||
| 2105 | 2150 | ||
| 2106 | (defun gdb-concat-output (so-far new) | 2151 | (defun gdb-concat-output (so-far new) |
| 2107 | (cond | 2152 | (cond |
| @@ -4105,9 +4150,15 @@ This arrangement depends on the value of `gdb-many-windows'." | |||
| 4105 | (gud-find-file gdb-main-file))) | 4150 | (gud-find-file gdb-main-file))) |
| 4106 | (setq gdb-source-window win))))) | 4151 | (setq gdb-source-window win))))) |
| 4107 | 4152 | ||
| 4153 | ;; Called from `gud-sentinel' in gud.el: | ||
| 4108 | (defun gdb-reset () | 4154 | (defun gdb-reset () |
| 4109 | "Exit a debugging session cleanly. | 4155 | "Exit a debugging session cleanly. |
| 4110 | Kills the gdb buffers, and resets variables and the source buffers." | 4156 | Kills the gdb buffers, and resets variables and the source buffers." |
| 4157 | ;; The gdb-inferior buffer has a pty hooked up to the main gdb | ||
| 4158 | ;; process. This pty must be deleted explicitly. | ||
| 4159 | (let ((pty (get-process "gdb-inferior"))) | ||
| 4160 | (if pty (delete-process pty))) | ||
| 4161 | ;; Find gdb-mi buffers and kill them. | ||
| 4111 | (dolist (buffer (buffer-list)) | 4162 | (dolist (buffer (buffer-list)) |
| 4112 | (unless (eq buffer gud-comint-buffer) | 4163 | (unless (eq buffer gud-comint-buffer) |
| 4113 | (with-current-buffer buffer | 4164 | (with-current-buffer buffer |
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index d41364547f2..a6ae42f86b1 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -728,9 +728,9 @@ This function is called from `compilation-filter-hook'." | |||
| 728 | (defun grep (command-args) | 728 | (defun grep (command-args) |
| 729 | "Run grep, with user-specified args, and collect output in a buffer. | 729 | "Run grep, with user-specified args, and collect output in a buffer. |
| 730 | While grep runs asynchronously, you can use \\[next-error] (M-x next-error), | 730 | While grep runs asynchronously, you can use \\[next-error] (M-x next-error), |
| 731 | or \\<grep-mode-map>\\[compile-goto-error] in the grep \ | 731 | or \\<grep-mode-map>\\[compile-goto-error] in the *grep* \ |
| 732 | output buffer, to go to the lines where grep | 732 | buffer, to go to the lines where grep found |
| 733 | found matches. | 733 | matches. To kill the grep job before it finishes, type \\[kill-compilation]. |
| 734 | 734 | ||
| 735 | For doing a recursive `grep', see the `rgrep' command. For running | 735 | For doing a recursive `grep', see the `rgrep' command. For running |
| 736 | `grep' in a specific directory, see `lgrep'. | 736 | `grep' in a specific directory, see `lgrep'. |
| @@ -957,10 +957,11 @@ With \\[universal-argument] prefix, you can edit the constructed shell command l | |||
| 957 | before it is executed. | 957 | before it is executed. |
| 958 | With two \\[universal-argument] prefixes, directly edit and run `grep-find-command'. | 958 | With two \\[universal-argument] prefixes, directly edit and run `grep-find-command'. |
| 959 | 959 | ||
| 960 | Collect output in a buffer. While find runs asynchronously, you | 960 | Collect output in a buffer. While the recursive grep is running, |
| 961 | can use \\[next-error] (M-x next-error), or \\<grep-mode-map>\\[compile-goto-error] \ | 961 | you can use \\[next-error] (M-x next-error), or \\<grep-mode-map>\\[compile-goto-error] \ |
| 962 | in the grep output buffer, | 962 | in the grep output buffer, |
| 963 | to go to the lines where grep found matches. | 963 | to visit the lines where matches were found. To kill the job |
| 964 | before it finishes, type \\[kill-compilation]. | ||
| 964 | 965 | ||
| 965 | This command shares argument histories with \\[lgrep] and \\[grep-find]. | 966 | This command shares argument histories with \\[lgrep] and \\[grep-find]. |
| 966 | 967 | ||
| @@ -1024,7 +1025,8 @@ to specify a command to run." | |||
| 1024 | (shell-quote-argument ")") | 1025 | (shell-quote-argument ")") |
| 1025 | " -prune -o ")) | 1026 | " -prune -o ")) |
| 1026 | (and grep-find-ignored-files | 1027 | (and grep-find-ignored-files |
| 1027 | (concat (shell-quote-argument "(") | 1028 | (concat (shell-quote-argument "!") " -type d " |
| 1029 | (shell-quote-argument "(") | ||
| 1028 | ;; we should use shell-quote-argument here | 1030 | ;; we should use shell-quote-argument here |
| 1029 | " -name " | 1031 | " -name " |
| 1030 | (mapconcat | 1032 | (mapconcat |
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 6b1f891b230..1f60c351252 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -66,10 +66,10 @@ Supported debuggers include gdb, sdb, dbx, xdb, perldb, pdb (Python) and jdb." | |||
| 66 | 66 | ||
| 67 | (defcustom gud-key-prefix "\C-x\C-a" | 67 | (defcustom gud-key-prefix "\C-x\C-a" |
| 68 | "Prefix of all GUD commands valid in C buffers." | 68 | "Prefix of all GUD commands valid in C buffers." |
| 69 | :type 'string | 69 | :type 'key-sequence |
| 70 | :group 'gud) | 70 | :group 'gud) |
| 71 | 71 | ||
| 72 | (global-set-key (concat gud-key-prefix "\C-l") 'gud-refresh) | 72 | (global-set-key (vconcat gud-key-prefix "\C-l") 'gud-refresh) |
| 73 | (define-key ctl-x-map " " 'gud-break) ;; backward compatibility hack | 73 | (define-key ctl-x-map " " 'gud-break) ;; backward compatibility hack |
| 74 | 74 | ||
| 75 | (defvar gud-marker-filter nil) | 75 | (defvar gud-marker-filter nil) |
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index e2016e206a8..b6d2b5e319c 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el | |||
| @@ -802,12 +802,15 @@ If `hs-hide-comments-when-hiding-all' is non-nil, also hide the comments." | |||
| 802 | (forward-comment (point-max))) | 802 | (forward-comment (point-max))) |
| 803 | (re-search-forward re (point-max) t)) | 803 | (re-search-forward re (point-max) t)) |
| 804 | (if (match-beginning 1) | 804 | (if (match-beginning 1) |
| 805 | ;; we have found a block beginning | 805 | ;; We have found a block beginning. |
| 806 | (progn | 806 | (progn |
| 807 | (goto-char (match-beginning 1)) | 807 | (goto-char (match-beginning 1)) |
| 808 | (if hs-hide-all-non-comment-function | 808 | (unless (if hs-hide-all-non-comment-function |
| 809 | (funcall hs-hide-all-non-comment-function) | 809 | (funcall hs-hide-all-non-comment-function) |
| 810 | (hs-hide-block-at-point t))) | 810 | (hs-hide-block-at-point t)) |
| 811 | ;; Go to end of matched data to prevent from getting stuck | ||
| 812 | ;; with an endless loop. | ||
| 813 | (goto-char (match-end 0)))) | ||
| 811 | ;; found a comment, probably | 814 | ;; found a comment, probably |
| 812 | (let ((c-reg (hs-inside-comment-p))) | 815 | (let ((c-reg (hs-inside-comment-p))) |
| 813 | (when (and c-reg (car c-reg)) | 816 | (when (and c-reg (car c-reg)) |
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index aab5f8f65a4..9df9943cc00 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; perl-mode.el --- Perl code editing commands for GNU Emacs | 1 | ;;; perl-mode.el --- Perl code editing commands for GNU Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1990, 1994, 2001-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1990, 1994, 2001-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: William F. Mann | 5 | ;; Author: William F. Mann |
| 6 | ;; Maintainer: FSF | 6 | ;; Maintainer: FSF |
| @@ -133,11 +133,6 @@ | |||
| 133 | map) | 133 | map) |
| 134 | "Keymap used in Perl mode.") | 134 | "Keymap used in Perl mode.") |
| 135 | 135 | ||
| 136 | (autoload 'c-macro-expand "cmacexp" | ||
| 137 | "Display the result of expanding all C macros occurring in the region. | ||
| 138 | The expansion is entirely correct because it uses the C preprocessor." | ||
| 139 | t) | ||
| 140 | |||
| 141 | (defvar perl-mode-syntax-table | 136 | (defvar perl-mode-syntax-table |
| 142 | (let ((st (make-syntax-table (standard-syntax-table)))) | 137 | (let ((st (make-syntax-table (standard-syntax-table)))) |
| 143 | (modify-syntax-entry ?\n ">" st) | 138 | (modify-syntax-entry ?\n ">" st) |
| @@ -511,6 +506,14 @@ If nil, continued arguments are aligned with the first argument." | |||
| 511 | :type '(choice integer (const nil)) | 506 | :type '(choice integer (const nil)) |
| 512 | :group 'perl) | 507 | :group 'perl) |
| 513 | 508 | ||
| 509 | (defcustom perl-indent-parens-as-block nil | ||
| 510 | "Non-nil means that non-block ()-, {}- and []-groups are indented as blocks. | ||
| 511 | The closing bracket is aligned with the line of the opening bracket, | ||
| 512 | not the contents of the brackets." | ||
| 513 | :version "24.2" | ||
| 514 | :type 'boolean | ||
| 515 | :group 'perl) | ||
| 516 | |||
| 514 | (defcustom perl-tab-always-indent tab-always-indent | 517 | (defcustom perl-tab-always-indent tab-always-indent |
| 515 | "Non-nil means TAB in Perl mode always indents the current line. | 518 | "Non-nil means TAB in Perl mode always indents the current line. |
| 516 | Otherwise it inserts a tab character if you type it past the first | 519 | Otherwise it inserts a tab character if you type it past the first |
| @@ -853,7 +856,8 @@ Optional argument PARSE-START should be the position of `beginning-of-defun'." | |||
| 853 | (cond ((nth 3 state) 'noindent) ; In a quoted string? | 856 | (cond ((nth 3 state) 'noindent) ; In a quoted string? |
| 854 | ((null containing-sexp) ; Line is at top level. | 857 | ((null containing-sexp) ; Line is at top level. |
| 855 | (skip-chars-forward " \t\f") | 858 | (skip-chars-forward " \t\f") |
| 856 | (if (= (following-char) ?{) | 859 | (if (memq (following-char) |
| 860 | (if perl-indent-parens-as-block '(?\{ ?\( ?\[) '(?\{))) | ||
| 857 | 0 ; move to beginning of line if it starts a function body | 861 | 0 ; move to beginning of line if it starts a function body |
| 858 | ;; indent a little if this is a continuation line | 862 | ;; indent a little if this is a continuation line |
| 859 | (perl-backward-to-noncomment) | 863 | (perl-backward-to-noncomment) |
| @@ -897,7 +901,9 @@ Optional argument PARSE-START should be the position of `beginning-of-defun'." | |||
| 897 | 0 perl-continued-statement-offset) | 901 | 0 perl-continued-statement-offset) |
| 898 | (current-column) | 902 | (current-column) |
| 899 | (if (save-excursion (goto-char indent-point) | 903 | (if (save-excursion (goto-char indent-point) |
| 900 | (looking-at "[ \t]*{")) | 904 | (looking-at |
| 905 | (if perl-indent-parens-as-block | ||
| 906 | "[ \t]*[{(\[]" "[ \t]*{"))) | ||
| 901 | perl-continued-brace-offset 0))) | 907 | perl-continued-brace-offset 0))) |
| 902 | ;; This line starts a new statement. | 908 | ;; This line starts a new statement. |
| 903 | ;; Position at last unclosed open. | 909 | ;; Position at last unclosed open. |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index f7566c31b41..2922330e6f9 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -69,11 +69,7 @@ | |||
| 69 | (require 'comint) | 69 | (require 'comint) |
| 70 | (require 'ansi-color) | 70 | (require 'ansi-color) |
| 71 | 71 | ||
| 72 | (eval-when-compile | 72 | (eval-when-compile (require 'compile)) |
| 73 | (require 'compile) | ||
| 74 | (require 'hippie-exp)) | ||
| 75 | |||
| 76 | (autoload 'comint-mode "comint") | ||
| 77 | 73 | ||
| 78 | (defgroup python nil | 74 | (defgroup python nil |
| 79 | "Silly walks in the Python language." | 75 | "Silly walks in the Python language." |
| @@ -1488,8 +1484,6 @@ Don't save anything for STR matching `inferior-python-filter-regexp'." | |||
| 1488 | res) | 1484 | res) |
| 1489 | (t (concat res s))))) | 1485 | (t (concat res s))))) |
| 1490 | 1486 | ||
| 1491 | (autoload 'comint-check-proc "comint") | ||
| 1492 | |||
| 1493 | (defvar python-version-checked nil) | 1487 | (defvar python-version-checked nil) |
| 1494 | (defun python-check-version (cmd) | 1488 | (defun python-check-version (cmd) |
| 1495 | "Check that CMD runs a suitable version of Python." | 1489 | "Check that CMD runs a suitable version of Python." |
| @@ -1684,8 +1678,6 @@ value to determine defaults." | |||
| 1684 | "Caches (directory . file) pair used in the last `python-load-file' command. | 1678 | "Caches (directory . file) pair used in the last `python-load-file' command. |
| 1685 | Used for determining the default in the next one.") | 1679 | Used for determining the default in the next one.") |
| 1686 | 1680 | ||
| 1687 | (autoload 'comint-get-source "comint") | ||
| 1688 | |||
| 1689 | (defun python-load-file (file-name) | 1681 | (defun python-load-file (file-name) |
| 1690 | "Load a Python file FILE-NAME into the inferior Python process. | 1682 | "Load a Python file FILE-NAME into the inferior Python process. |
| 1691 | If the file has extension `.py' import or reload it as a module. | 1683 | If the file has extension `.py' import or reload it as a module. |
| @@ -1776,7 +1768,7 @@ will." | |||
| 1776 | ;; allow C-c C-f in help buffer. | 1768 | ;; allow C-c C-f in help buffer. |
| 1777 | (let ((temp-buffer-show-hook ; avoid xref stuff | 1769 | (let ((temp-buffer-show-hook ; avoid xref stuff |
| 1778 | (lambda () | 1770 | (lambda () |
| 1779 | (toggle-read-only 1) | 1771 | (setq buffer-read-only t) |
| 1780 | (setq view-return-to-alist | 1772 | (setq view-return-to-alist |
| 1781 | (list (cons (selected-window) help-return-method)))))) | 1773 | (list (cons (selected-window) help-return-method)))))) |
| 1782 | (with-output-to-temp-buffer (help-buffer) | 1774 | (with-output-to-temp-buffer (help-buffer) |
| @@ -1959,7 +1951,7 @@ the string's indentation." | |||
| 1959 | ;; paragraph in a multi-line string properly, so narrow | 1951 | ;; paragraph in a multi-line string properly, so narrow |
| 1960 | ;; to the string and then fill around (the end of) the | 1952 | ;; to the string and then fill around (the end of) the |
| 1961 | ;; current line. | 1953 | ;; current line. |
| 1962 | ((eq t (nth 3 syntax)) ; in fenced string | 1954 | ((nth 3 syntax) ; in fenced string |
| 1963 | (goto-char (nth 8 syntax)) ; string start | 1955 | (goto-char (nth 8 syntax)) ; string start |
| 1964 | (setq start (line-beginning-position)) | 1956 | (setq start (line-beginning-position)) |
| 1965 | (setq end (condition-case () ; for unbalanced quotes | 1957 | (setq end (condition-case () ; for unbalanced quotes |
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index c8ef8f0324c..0139795dd38 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el | |||
| @@ -3592,7 +3592,7 @@ Key bindings specific to `verilog-mode-map' are: | |||
| 3592 | (set (make-local-variable 'imenu-generic-expression) | 3592 | (set (make-local-variable 'imenu-generic-expression) |
| 3593 | verilog-imenu-generic-expression) | 3593 | verilog-imenu-generic-expression) |
| 3594 | ;; Tell which-func-modes that imenu knows about verilog | 3594 | ;; Tell which-func-modes that imenu knows about verilog |
| 3595 | (when (boundp 'which-func-modes) | 3595 | (when (and (boundp 'which-func-modes) (listp which-func-modes)) |
| 3596 | (add-to-list 'which-func-modes 'verilog-mode)) | 3596 | (add-to-list 'which-func-modes 'verilog-mode)) |
| 3597 | ;; hideshow support | 3597 | ;; hideshow support |
| 3598 | (when (boundp 'hs-special-modes-alist) | 3598 | (when (boundp 'hs-special-modes-alist) |
diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index 721c610517a..c8435c14ea2 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; which-func.el --- print current function in mode line | 1 | ;;; which-func.el --- print current function in mode line |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1994, 1997-1998, 2001-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1994, 1997-1998, 2001-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Alex Rezinsky <alexr@msil.sps.mot.com> | 5 | ;; Author: Alex Rezinsky <alexr@msil.sps.mot.com> |
| 6 | ;; (doesn't seem to be responsive any more) | 6 | ;; (doesn't seem to be responsive any more) |
| @@ -72,14 +72,15 @@ | |||
| 72 | :group 'tools | 72 | :group 'tools |
| 73 | :version "20.3") | 73 | :version "20.3") |
| 74 | 74 | ||
| 75 | (defcustom which-func-modes | 75 | (defcustom which-func-modes t |
| 76 | '(emacs-lisp-mode c-mode c++-mode perl-mode cperl-mode python-mode | 76 | ;; '(emacs-lisp-mode c-mode c++-mode objc-mode perl-mode cperl-mode python-mode |
| 77 | makefile-mode sh-mode fortran-mode f90-mode ada-mode | 77 | ;; makefile-mode sh-mode fortran-mode f90-mode ada-mode |
| 78 | diff-mode) | 78 | ;; diff-mode) |
| 79 | "List of major modes for which Which Function mode should be used. | 79 | "List of major modes for which Which Function mode should be used. |
| 80 | For other modes it is disabled. If this is equal to t, | 80 | For other modes it is disabled. If this is equal to t, |
| 81 | then Which Function mode is enabled in any major mode that supports it." | 81 | then Which Function mode is enabled in any major mode that supports it." |
| 82 | :group 'which-func | 82 | :group 'which-func |
| 83 | :version "24.2" ; explicit list -> t | ||
| 83 | :type '(choice (const :tag "All modes" t) | 84 | :type '(choice (const :tag "All modes" t) |
| 84 | (repeat (symbol :tag "Major mode")))) | 85 | (repeat (symbol :tag "Major mode")))) |
| 85 | 86 | ||
diff --git a/lisp/recentf.el b/lisp/recentf.el index 8b0b36cdddc..636110f41de 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el | |||
| @@ -1061,6 +1061,8 @@ Go to the beginning of buffer if not found." | |||
| 1061 | (let ((km (copy-keymap recentf--shortcuts-keymap))) | 1061 | (let ((km (copy-keymap recentf--shortcuts-keymap))) |
| 1062 | (set-keymap-parent km widget-keymap) | 1062 | (set-keymap-parent km widget-keymap) |
| 1063 | (define-key km "q" 'recentf-cancel-dialog) | 1063 | (define-key km "q" 'recentf-cancel-dialog) |
| 1064 | (define-key km "n" 'next-line) | ||
| 1065 | (define-key km "p" 'previous-line) | ||
| 1064 | (define-key km [follow-link] "\C-m") | 1066 | (define-key km [follow-link] "\C-m") |
| 1065 | km) | 1067 | km) |
| 1066 | "Keymap used in recentf dialogs.") | 1068 | "Keymap used in recentf dialogs.") |
diff --git a/lisp/scroll-all.el b/lisp/scroll-all.el index 9ff0a61db2f..fed886c2b55 100644 --- a/lisp/scroll-all.el +++ b/lisp/scroll-all.el | |||
| @@ -111,7 +111,6 @@ one window apply to all visible windows in the same frame." | |||
| 111 | nil " *SL*" nil | 111 | nil " *SL*" nil |
| 112 | :global t | 112 | :global t |
| 113 | :group 'windows | 113 | :group 'windows |
| 114 | :group 'scrolling | ||
| 115 | (if scroll-all-mode | 114 | (if scroll-all-mode |
| 116 | (add-hook 'post-command-hook 'scroll-all-check-to-scroll) | 115 | (add-hook 'post-command-hook 'scroll-all-check-to-scroll) |
| 117 | (remove-hook 'post-command-hook 'scroll-all-check-to-scroll))) | 116 | (remove-hook 'post-command-hook 'scroll-all-check-to-scroll))) |
diff --git a/lisp/server.el b/lisp/server.el index 404bebc4747..1e2f458ac9c 100644 --- a/lisp/server.el +++ b/lisp/server.el | |||
| @@ -139,6 +139,32 @@ directory residing in a NTFS partition instead." | |||
| 139 | ;;;###autoload | 139 | ;;;###autoload |
| 140 | (put 'server-auth-dir 'risky-local-variable t) | 140 | (put 'server-auth-dir 'risky-local-variable t) |
| 141 | 141 | ||
| 142 | (defcustom server-auth-key nil | ||
| 143 | "Server authentication key. | ||
| 144 | |||
| 145 | Normally, the authentication key is randomly generated when the | ||
| 146 | server starts, which guarantees some level of security. It is | ||
| 147 | recommended to leave it that way. Using a long-lived shared key | ||
| 148 | will decrease security (especially since the key is transmitted as | ||
| 149 | plain text). | ||
| 150 | |||
| 151 | In some situations however, it can be difficult to share randomly | ||
| 152 | generated passwords with remote hosts (eg. no shared directory), | ||
| 153 | so you can set the key with this variable and then copy the | ||
| 154 | server file to the remote host (with possible changes to IP | ||
| 155 | address and/or port if that applies). | ||
| 156 | |||
| 157 | The key must consist of 64 ASCII printable characters except for | ||
| 158 | space (this means characters from ! to ~; or from code 33 to 126). | ||
| 159 | |||
| 160 | You can use \\[server-generate-key] to get a random authentication | ||
| 161 | key." | ||
| 162 | :group 'server | ||
| 163 | :type '(choice | ||
| 164 | (const :tag "Random" nil) | ||
| 165 | (string :tag "Password")) | ||
| 166 | :version "24.2") | ||
| 167 | |||
| 142 | (defcustom server-raise-frame t | 168 | (defcustom server-raise-frame t |
| 143 | "If non-nil, raise frame when switching to a buffer." | 169 | "If non-nil, raise frame when switching to a buffer." |
| 144 | :group 'server | 170 | :group 'server |
| @@ -494,41 +520,62 @@ Creates the directory if necessary and makes sure: | |||
| 494 | ;; Check that it's safe for use. | 520 | ;; Check that it's safe for use. |
| 495 | (let* ((uid (nth 2 attrs)) | 521 | (let* ((uid (nth 2 attrs)) |
| 496 | (w32 (eq system-type 'windows-nt)) | 522 | (w32 (eq system-type 'windows-nt)) |
| 497 | (safe (catch :safe | 523 | (safe (cond |
| 498 | (unless (eq t (car attrs)) ; is a dir? | 524 | ((not (eq t (car attrs))) nil) ; is a dir? |
| 499 | (throw :safe nil)) | 525 | ((and w32 (zerop uid)) ; on FAT32? |
| 500 | (when (and w32 (zerop uid)) ; on FAT32? | 526 | (display-warning |
| 501 | (display-warning | 527 | 'server |
| 502 | 'server | 528 | (format "Using `%s' to store Emacs-server authentication files. |
| 503 | (format "Using `%s' to store Emacs-server authentication files. | ||
| 504 | Directories on FAT32 filesystems are NOT secure against tampering. | 529 | Directories on FAT32 filesystems are NOT secure against tampering. |
| 505 | See variable `server-auth-dir' for details." | 530 | See variable `server-auth-dir' for details." |
| 506 | (file-name-as-directory dir)) | 531 | (file-name-as-directory dir)) |
| 507 | :warning) | 532 | :warning) |
| 508 | (throw :safe t)) | 533 | t) |
| 509 | (unless (or (= uid (user-uid)) ; is the dir ours? | 534 | ((and (/= uid (user-uid)) ; is the dir ours? |
| 510 | (and w32 | 535 | (or (not w32) |
| 511 | ;; Files created on Windows by | 536 | ;; Files created on Windows by Administrator |
| 512 | ;; Administrator (RID=500) have | 537 | ;; (RID=500) have the Administrators (RID=544) |
| 513 | ;; the Administrators (RID=544) | 538 | ;; group recorded as the owner. |
| 514 | ;; group recorded as the owner. | 539 | (/= uid 544) (/= (user-uid) 500))) |
| 515 | (= uid 544) (= (user-uid) 500))) | 540 | nil) |
| 516 | (throw :safe nil)) | 541 | (w32 t) ; on NTFS? |
| 517 | (when w32 ; on NTFS? | 542 | (t ; else, check permissions |
| 518 | (throw :safe t)) | 543 | (zerop (logand ?\077 (file-modes dir))))))) |
| 519 | (unless (zerop (logand ?\077 (file-modes dir))) | ||
| 520 | (throw :safe nil)) | ||
| 521 | t))) | ||
| 522 | (unless safe | 544 | (unless safe |
| 523 | (error "The directory `%s' is unsafe" dir))))) | 545 | (error "The directory `%s' is unsafe" dir))))) |
| 524 | 546 | ||
| 547 | (defun server-generate-key () | ||
| 548 | "Generate and return a random authentication key. | ||
| 549 | The key is a 64-byte string of random chars in the range `!'..`~'. | ||
| 550 | If called interactively, also inserts it into current buffer." | ||
| 551 | (interactive) | ||
| 552 | (let ((auth-key | ||
| 553 | (loop repeat 64 | ||
| 554 | collect (+ 33 (random 94)) into auth | ||
| 555 | finally return (concat auth)))) | ||
| 556 | (if (called-interactively-p 'interactive) | ||
| 557 | (insert auth-key)) | ||
| 558 | auth-key)) | ||
| 559 | |||
| 560 | (defun server-get-auth-key () | ||
| 561 | "Return server's authentication key. | ||
| 562 | |||
| 563 | If `server-auth-key' is nil, just call `server-generate-key'. | ||
| 564 | Otherwise, if `server-auth-key' is a valid key, return it. | ||
| 565 | If the key is not valid, signal an error." | ||
| 566 | (if server-auth-key | ||
| 567 | (if (string-match-p "^[!-~]\\{64\\}$" server-auth-key) | ||
| 568 | server-auth-key | ||
| 569 | (error "The key '%s' is invalid" server-auth-key)) | ||
| 570 | (server-generate-key))) | ||
| 571 | |||
| 525 | ;;;###autoload | 572 | ;;;###autoload |
| 526 | (defun server-start (&optional leave-dead inhibit-prompt) | 573 | (defun server-start (&optional leave-dead inhibit-prompt) |
| 527 | "Allow this Emacs process to be a server for client processes. | 574 | "Allow this Emacs process to be a server for client processes. |
| 528 | This starts a server communications subprocess through which | 575 | This starts a server communications subprocess through which client |
| 529 | client \"editors\" can send your editing commands to this Emacs | 576 | \"editors\" can send your editing commands to this Emacs job. |
| 530 | job. To use the server, set up the program `emacsclient' in the | 577 | To use the server, set up the program `emacsclient' in the Emacs |
| 531 | Emacs distribution as your standard \"editor\". | 578 | distribution as your standard \"editor\". |
| 532 | 579 | ||
| 533 | Optional argument LEAVE-DEAD (interactively, a prefix arg) means just | 580 | Optional argument LEAVE-DEAD (interactively, a prefix arg) means just |
| 534 | kill any existing server communications subprocess. | 581 | kill any existing server communications subprocess. |
| @@ -615,13 +662,7 @@ server or call `M-x server-force-delete' to forcibly disconnect it.") | |||
| 615 | (unless server-process (error "Could not start server process")) | 662 | (unless server-process (error "Could not start server process")) |
| 616 | (process-put server-process :server-file server-file) | 663 | (process-put server-process :server-file server-file) |
| 617 | (when server-use-tcp | 664 | (when server-use-tcp |
| 618 | (let ((auth-key | 665 | (let ((auth-key (server-get-auth-key))) |
| 619 | (loop | ||
| 620 | ;; The auth key is a 64-byte string of random chars in the | ||
| 621 | ;; range `!'..`~'. | ||
| 622 | repeat 64 | ||
| 623 | collect (+ 33 (random 94)) into auth | ||
| 624 | finally return (concat auth)))) | ||
| 625 | (process-put server-process :auth-key auth-key) | 666 | (process-put server-process :auth-key auth-key) |
| 626 | (with-temp-file server-file | 667 | (with-temp-file server-file |
| 627 | (set-buffer-multibyte nil) | 668 | (set-buffer-multibyte nil) |
| @@ -780,10 +821,6 @@ This handles splitting the command if it would be bigger than | |||
| 780 | (select-frame frame) | 821 | (select-frame frame) |
| 781 | (process-put proc 'frame frame) | 822 | (process-put proc 'frame frame) |
| 782 | (process-put proc 'terminal (frame-terminal frame)) | 823 | (process-put proc 'terminal (frame-terminal frame)) |
| 783 | |||
| 784 | ;; Display *scratch* by default. | ||
| 785 | (switch-to-buffer (get-buffer-create "*scratch*") 'norecord) | ||
| 786 | |||
| 787 | frame)) | 824 | frame)) |
| 788 | 825 | ||
| 789 | (defun server-create-window-system-frame (display nowait proc parent-id | 826 | (defun server-create-window-system-frame (display nowait proc parent-id |
| @@ -816,9 +853,6 @@ This handles splitting the command if it would be bigger than | |||
| 816 | (select-frame frame) | 853 | (select-frame frame) |
| 817 | (process-put proc 'frame frame) | 854 | (process-put proc 'frame frame) |
| 818 | (process-put proc 'terminal (frame-terminal frame)) | 855 | (process-put proc 'terminal (frame-terminal frame)) |
| 819 | |||
| 820 | ;; Display *scratch* by default. | ||
| 821 | (switch-to-buffer (get-buffer-create "*scratch*") 'norecord) | ||
| 822 | frame))) | 856 | frame))) |
| 823 | 857 | ||
| 824 | (defun server-goto-toplevel (proc) | 858 | (defun server-goto-toplevel (proc) |
| @@ -1042,8 +1076,9 @@ The following commands are accepted by the client: | |||
| 1042 | 1076 | ||
| 1043 | ;; -window-system: Open a new X frame. | 1077 | ;; -window-system: Open a new X frame. |
| 1044 | (`"-window-system" | 1078 | (`"-window-system" |
| 1045 | (setq dontkill t) | 1079 | (if (fboundp 'x-create-frame) |
| 1046 | (setq tty-name 'window-system)) | 1080 | (setq dontkill t |
| 1081 | tty-name 'window-system))) | ||
| 1047 | 1082 | ||
| 1048 | ;; -resume: Resume a suspended tty frame. | 1083 | ;; -resume: Resume a suspended tty frame. |
| 1049 | (`"-resume" | 1084 | (`"-resume" |
| @@ -1071,7 +1106,8 @@ The following commands are accepted by the client: | |||
| 1071 | (setq dontkill t) | 1106 | (setq dontkill t) |
| 1072 | (pop args-left)) | 1107 | (pop args-left)) |
| 1073 | 1108 | ||
| 1074 | ;; -tty DEVICE-NAME TYPE: Open a new tty frame at the client. | 1109 | ;; -tty DEVICE-NAME TYPE: Open a new tty frame. |
| 1110 | ;; (But if we see -window-system later, use that.) | ||
| 1075 | (`"-tty" | 1111 | (`"-tty" |
| 1076 | (setq tty-name (pop args-left) | 1112 | (setq tty-name (pop args-left) |
| 1077 | tty-type (pop args-left) | 1113 | tty-type (pop args-left) |
| @@ -1133,6 +1169,13 @@ The following commands are accepted by the client: | |||
| 1133 | ;; Unknown command. | 1169 | ;; Unknown command. |
| 1134 | (arg (error "Unknown command: %s" arg)))) | 1170 | (arg (error "Unknown command: %s" arg)))) |
| 1135 | 1171 | ||
| 1172 | ;; If both -no-wait and -tty are given with file or sexp | ||
| 1173 | ;; arguments, use an existing frame. | ||
| 1174 | (and nowait | ||
| 1175 | (not (eq tty-name 'window-system)) | ||
| 1176 | (or files commands) | ||
| 1177 | (setq use-current-frame t)) | ||
| 1178 | |||
| 1136 | (setq frame | 1179 | (setq frame |
| 1137 | (cond | 1180 | (cond |
| 1138 | ((and use-current-frame | 1181 | ((and use-current-frame |
| @@ -1182,12 +1225,17 @@ The following commands are accepted by the client: | |||
| 1182 | ;; including code that needs to wait. | 1225 | ;; including code that needs to wait. |
| 1183 | (with-local-quit | 1226 | (with-local-quit |
| 1184 | (condition-case err | 1227 | (condition-case err |
| 1185 | (let* ((buffers | 1228 | (let ((buffers (server-visit-files files proc nowait))) |
| 1186 | (when files | ||
| 1187 | (server-visit-files files proc nowait)))) | ||
| 1188 | |||
| 1189 | (mapc 'funcall (nreverse commands)) | 1229 | (mapc 'funcall (nreverse commands)) |
| 1190 | 1230 | ||
| 1231 | ;; If we were told only to open a new client, obey | ||
| 1232 | ;; `initial-buffer-choice' if it specifies a file. | ||
| 1233 | (unless (or files commands) | ||
| 1234 | (if (stringp initial-buffer-choice) | ||
| 1235 | (find-file initial-buffer-choice) | ||
| 1236 | (switch-to-buffer (get-buffer-create "*scratch*") | ||
| 1237 | 'norecord))) | ||
| 1238 | |||
| 1191 | ;; Delete the client if necessary. | 1239 | ;; Delete the client if necessary. |
| 1192 | (cond | 1240 | (cond |
| 1193 | (nowait | 1241 | (nowait |
diff --git a/lisp/ses.el b/lisp/ses.el index 0638fc344c7..da18046c953 100644 --- a/lisp/ses.el +++ b/lisp/ses.el | |||
| @@ -282,6 +282,9 @@ default printer and then modify its output.") | |||
| 282 | ses--numcols ses--numrows ses--symbolic-formulas | 282 | ses--numcols ses--numrows ses--symbolic-formulas |
| 283 | ses--data-marker ses--params-marker (ses--Dijkstra-attempt-nb . 0) | 283 | ses--data-marker ses--params-marker (ses--Dijkstra-attempt-nb . 0) |
| 284 | ses--Dijkstra-weight-bound | 284 | ses--Dijkstra-weight-bound |
| 285 | ;; This list is useful to speed-up clean-up of symbols when | ||
| 286 | ;; an area containing renamed cell is deleted. | ||
| 287 | ses--renamed-cell-symb-list | ||
| 285 | ;; Global variables that we override | 288 | ;; Global variables that we override |
| 286 | mode-line-process next-line-add-newlines transient-mark-mode) | 289 | mode-line-process next-line-add-newlines transient-mark-mode) |
| 287 | "Buffer-local variables used by SES.") | 290 | "Buffer-local variables used by SES.") |
| @@ -674,6 +677,17 @@ for this spreadsheet." | |||
| 674 | (put sym 'ses-cell (cons xrow xcol)) | 677 | (put sym 'ses-cell (cons xrow xcol)) |
| 675 | (make-local-variable sym))))) | 678 | (make-local-variable sym))))) |
| 676 | 679 | ||
| 680 | (defun ses-create-cell-variable (sym row col) | ||
| 681 | "Create a buffer-local variable `SYM' for cell at position (ROW, COL). | ||
| 682 | |||
| 683 | SYM is the symbol for that variable, ROW and COL are integers for | ||
| 684 | row and column of the cell, with numbering starting from 0. | ||
| 685 | |||
| 686 | Return nil in case of failure." | ||
| 687 | (unless (local-variable-p sym) | ||
| 688 | (make-local-variable sym) | ||
| 689 | (put sym 'ses-cell (cons row col)))) | ||
| 690 | |||
| 677 | ;; We do not delete the ses-cell properties for the cell-variables, in | 691 | ;; We do not delete the ses-cell properties for the cell-variables, in |
| 678 | ;; case a formula that refers to this cell is in the kill-ring and is | 692 | ;; case a formula that refers to this cell is in the kill-ring and is |
| 679 | ;; later pasted back in. | 693 | ;; later pasted back in. |
| @@ -682,7 +696,10 @@ for this spreadsheet." | |||
| 682 | (let (sym) | 696 | (let (sym) |
| 683 | (dotimes (row (1+ (- maxrow minrow))) | 697 | (dotimes (row (1+ (- maxrow minrow))) |
| 684 | (dotimes (col (1+ (- maxcol mincol))) | 698 | (dotimes (col (1+ (- maxcol mincol))) |
| 685 | (setq sym (ses-create-cell-symbol (+ row minrow) (+ col mincol))) | 699 | (let ((xrow (+ row minrow)) (xcol (+ col mincol))) |
| 700 | (setq sym (if (and (< xrow ses--numrows) (< xcol ses--numcols)) | ||
| 701 | (ses-cell-symbol xrow xcol) | ||
| 702 | (ses-create-cell-symbol xrow xcol)))) | ||
| 686 | (if (boundp sym) | 703 | (if (boundp sym) |
| 687 | (push `(apply ses-set-with-undo ,sym ,(symbol-value sym)) | 704 | (push `(apply ses-set-with-undo ,sym ,(symbol-value sym)) |
| 688 | buffer-undo-list)) | 705 | buffer-undo-list)) |
| @@ -1400,7 +1417,8 @@ removed. Example: | |||
| 1400 | Sets `ses-relocate-return' to 'delete if cell-references were removed." | 1417 | Sets `ses-relocate-return' to 'delete if cell-references were removed." |
| 1401 | (let (rowcol result) | 1418 | (let (rowcol result) |
| 1402 | (if (or (atom formula) (eq (car formula) 'quote)) | 1419 | (if (or (atom formula) (eq (car formula) 'quote)) |
| 1403 | (if (setq rowcol (ses-sym-rowcol formula)) | 1420 | (if (and (setq rowcol (ses-sym-rowcol formula)) |
| 1421 | (string-match "\\`[A-Z]+[0-9]+\\'" (symbol-name formula))) | ||
| 1404 | (ses-relocate-symbol formula rowcol | 1422 | (ses-relocate-symbol formula rowcol |
| 1405 | startrow startcol rowincr colincr) | 1423 | startrow startcol rowincr colincr) |
| 1406 | formula) ; Pass through as-is. | 1424 | formula) ; Pass through as-is. |
| @@ -1508,14 +1526,15 @@ if the range was altered." | |||
| 1508 | the rectangle (MINROW,MINCOL)..(NUMROWS,NUMCOLS) by adding ROWINCR and COLINCR | 1526 | the rectangle (MINROW,MINCOL)..(NUMROWS,NUMCOLS) by adding ROWINCR and COLINCR |
| 1509 | to each symbol." | 1527 | to each symbol." |
| 1510 | (let (reform) | 1528 | (let (reform) |
| 1511 | (let (mycell newval) | 1529 | (let (mycell newval xrow) |
| 1512 | (dotimes-with-progress-reporter | 1530 | (dotimes-with-progress-reporter |
| 1513 | (row ses--numrows) "Relocating formulas..." | 1531 | (row ses--numrows) "Relocating formulas..." |
| 1514 | (dotimes (col ses--numcols) | 1532 | (dotimes (col ses--numcols) |
| 1515 | (setq ses-relocate-return nil | 1533 | (setq ses-relocate-return nil |
| 1516 | mycell (ses-get-cell row col) | 1534 | mycell (ses-get-cell row col) |
| 1517 | newval (ses-relocate-formula (ses-cell-formula mycell) | 1535 | newval (ses-relocate-formula (ses-cell-formula mycell) |
| 1518 | minrow mincol rowincr colincr)) | 1536 | minrow mincol rowincr colincr) |
| 1537 | xrow (- row rowincr)) | ||
| 1519 | (ses-set-cell row col 'formula newval) | 1538 | (ses-set-cell row col 'formula newval) |
| 1520 | (if (eq ses-relocate-return 'range) | 1539 | (if (eq ses-relocate-return 'range) |
| 1521 | ;; This cell contains a (ses-range X Y) where a cell has been | 1540 | ;; This cell contains a (ses-range X Y) where a cell has been |
| @@ -1531,8 +1550,22 @@ to each symbol." | |||
| 1531 | minrow mincol rowincr colincr)) | 1550 | minrow mincol rowincr colincr)) |
| 1532 | (ses-set-cell row col 'references newval) | 1551 | (ses-set-cell row col 'references newval) |
| 1533 | (and (>= row minrow) (>= col mincol) | 1552 | (and (>= row minrow) (>= col mincol) |
| 1534 | (ses-set-cell row col 'symbol | 1553 | (let ((sym (ses-cell-symbol row col)) |
| 1535 | (ses-create-cell-symbol row col)))))) | 1554 | (xcol (- col colincr))) |
| 1555 | (if (and | ||
| 1556 | sym | ||
| 1557 | (>= xrow 0) | ||
| 1558 | (>= xcol 0) | ||
| 1559 | (null (eq sym | ||
| 1560 | (ses-create-cell-symbol xrow xcol)))) | ||
| 1561 | ;; This is a renamed cell, do not update the cell | ||
| 1562 | ;; name, but just update the coordinate property. | ||
| 1563 | (put sym 'ses-cell (cons row col)) | ||
| 1564 | (ses-set-cell row col 'symbol | ||
| 1565 | (setq sym (ses-create-cell-symbol row col))) | ||
| 1566 | (unless (and (boundp sym) (local-variable-p sym)) | ||
| 1567 | (set (make-local-variable sym) nil) | ||
| 1568 | (put sym 'ses-cell (cons row col)))))) ))) | ||
| 1536 | ;; Relocate the cell values. | 1569 | ;; Relocate the cell values. |
| 1537 | (let (oldval myrow mycol xrow xcol) | 1570 | (let (oldval myrow mycol xrow xcol) |
| 1538 | (cond | 1571 | (cond |
| @@ -1545,11 +1578,17 @@ to each symbol." | |||
| 1545 | (setq mycol (+ col mincol) | 1578 | (setq mycol (+ col mincol) |
| 1546 | xrow (- myrow rowincr) | 1579 | xrow (- myrow rowincr) |
| 1547 | xcol (- mycol colincr)) | 1580 | xcol (- mycol colincr)) |
| 1548 | (if (and (< xrow ses--numrows) (< xcol ses--numcols)) | 1581 | (let ((sym (ses-cell-symbol myrow mycol)) |
| 1549 | (setq oldval (ses-cell-value xrow xcol)) | 1582 | (xsym (ses-create-cell-symbol xrow xcol))) |
| 1550 | ;; Cell is off the end of the array. | 1583 | ;; Make the value relocation only when if the cell is not |
| 1551 | (setq oldval (symbol-value (ses-create-cell-symbol xrow xcol)))) | 1584 | ;; a renamed cell. Otherwise this is not needed. |
| 1552 | (ses-set-cell myrow mycol 'value oldval)))) | 1585 | (and (eq sym xsym) |
| 1586 | (ses-set-cell myrow mycol 'value | ||
| 1587 | (if (and (< xrow ses--numrows) (< xcol ses--numcols)) | ||
| 1588 | (ses-cell-value xrow xcol) | ||
| 1589 | ;;Cell is off the end of the array | ||
| 1590 | (symbol-value xsym)))))))) | ||
| 1591 | |||
| 1553 | ((and (wholenump rowincr) (wholenump colincr)) | 1592 | ((and (wholenump rowincr) (wholenump colincr)) |
| 1554 | ;; Insertion of rows and/or columns. Run the loop backwards. | 1593 | ;; Insertion of rows and/or columns. Run the loop backwards. |
| 1555 | (let ((disty (1- ses--numrows)) | 1594 | (let ((disty (1- ses--numrows)) |
| @@ -1659,7 +1698,6 @@ Does not execute cell formulas or print functions." | |||
| 1659 | (message "Upgrading from SES-1 file format"))) | 1698 | (message "Upgrading from SES-1 file format"))) |
| 1660 | (or (= ses--file-format 2) | 1699 | (or (= ses--file-format 2) |
| 1661 | (error "This file needs a newer version of the SES library code")) | 1700 | (error "This file needs a newer version of the SES library code")) |
| 1662 | (ses-create-cell-variable-range 0 (1- ses--numrows) 0 (1- ses--numcols)) | ||
| 1663 | ;; Initialize cell array. | 1701 | ;; Initialize cell array. |
| 1664 | (setq ses--cells (make-vector ses--numrows nil)) | 1702 | (setq ses--cells (make-vector ses--numrows nil)) |
| 1665 | (dotimes (row ses--numrows) | 1703 | (dotimes (row ses--numrows) |
| @@ -1679,11 +1717,10 @@ Does not execute cell formulas or print functions." | |||
| 1679 | (dotimes (row ses--numrows) | 1717 | (dotimes (row ses--numrows) |
| 1680 | (dotimes (col ses--numcols) | 1718 | (dotimes (col ses--numcols) |
| 1681 | (let* ((x (read (current-buffer))) | 1719 | (let* ((x (read (current-buffer))) |
| 1682 | (rowcol (ses-sym-rowcol (car-safe (cdr-safe x))))) | 1720 | (sym (car-safe (cdr-safe x)))) |
| 1683 | (or (and (looking-at "\n") | 1721 | (or (and (looking-at "\n") |
| 1684 | (eq (car-safe x) 'ses-cell) | 1722 | (eq (car-safe x) 'ses-cell) |
| 1685 | (eq row (car rowcol)) | 1723 | (ses-create-cell-variable sym row col)) |
| 1686 | (eq col (cdr rowcol))) | ||
| 1687 | (error "Cell-def error")) | 1724 | (error "Cell-def error")) |
| 1688 | (eval x))) | 1725 | (eval x))) |
| 1689 | (or (looking-at "\n\n") | 1726 | (or (looking-at "\n\n") |
| @@ -3140,6 +3177,63 @@ highlighted range in the spreadsheet." | |||
| 3140 | (mouse-set-point event) | 3177 | (mouse-set-point event) |
| 3141 | (ses-insert-ses-range)) | 3178 | (ses-insert-ses-range)) |
| 3142 | 3179 | ||
| 3180 | (defun ses-replace-name-in-formula (formula old-name new-name) | ||
| 3181 | (let ((new-formula formula)) | ||
| 3182 | (unless (and (consp formula) | ||
| 3183 | (eq (car-safe formula) 'quote)) | ||
| 3184 | (while formula | ||
| 3185 | (let ((elt (car-safe formula))) | ||
| 3186 | (cond | ||
| 3187 | ((consp elt) | ||
| 3188 | (setcar formula (ses-replace-name-in-formula elt old-name new-name))) | ||
| 3189 | ((and (symbolp elt) | ||
| 3190 | (eq (car-safe formula) old-name)) | ||
| 3191 | (setcar formula new-name)))) | ||
| 3192 | (setq formula (cdr formula)))) | ||
| 3193 | new-formula)) | ||
| 3194 | |||
| 3195 | (defun ses-rename-cell (new-name) | ||
| 3196 | "Rename current cell." | ||
| 3197 | (interactive "*SEnter new name: ") | ||
| 3198 | (ses-check-curcell) | ||
| 3199 | (or | ||
| 3200 | (and (local-variable-p new-name) | ||
| 3201 | (ses-sym-rowcol new-name) | ||
| 3202 | ;; this test is needed because ses-cell property of deleted cells | ||
| 3203 | ;; is not deleted in case of subsequent undo | ||
| 3204 | (memq new-name ses--renamed-cell-symb-list) | ||
| 3205 | (error "Already a cell name")) | ||
| 3206 | (and (boundp new-name) | ||
| 3207 | (null (yes-or-no-p (format "`%S' is already bound outside this buffer, continue? " | ||
| 3208 | new-name))) | ||
| 3209 | (error "Already a bound cell name"))) | ||
| 3210 | (let* ((rowcol (ses-sym-rowcol ses--curcell)) | ||
| 3211 | (cell (ses-get-cell (car rowcol) (cdr rowcol)))) | ||
| 3212 | (put new-name 'ses-cell rowcol) | ||
| 3213 | (dolist (reference (ses-cell-references (car rowcol) (cdr rowcol))) | ||
| 3214 | (let* ((rowcol (ses-sym-rowcol reference)) | ||
| 3215 | (cell (ses-get-cell (car rowcol) (cdr rowcol)))) | ||
| 3216 | (ses-cell-set-formula (car rowcol) | ||
| 3217 | (cdr rowcol) | ||
| 3218 | (ses-replace-name-in-formula | ||
| 3219 | (ses-cell-formula cell) | ||
| 3220 | ses--curcell | ||
| 3221 | new-name)))) | ||
| 3222 | (push new-name ses--renamed-cell-symb-list) | ||
| 3223 | (set new-name (symbol-value ses--curcell)) | ||
| 3224 | (aset cell 0 new-name) | ||
| 3225 | (put ses--curcell 'ses-cell nil) | ||
| 3226 | (makunbound ses--curcell) | ||
| 3227 | (setq ses--curcell new-name) | ||
| 3228 | (let* ((pos (point)) | ||
| 3229 | (inhibit-read-only t) | ||
| 3230 | (col (current-column)) | ||
| 3231 | (end (save-excursion | ||
| 3232 | (move-to-column (1+ col)) | ||
| 3233 | (if (eolp) | ||
| 3234 | (+ pos (ses-col-width col) 1) | ||
| 3235 | (point))))) | ||
| 3236 | (put-text-property pos end 'intangible new-name))) ) | ||
| 3143 | 3237 | ||
| 3144 | ;;---------------------------------------------------------------------------- | 3238 | ;;---------------------------------------------------------------------------- |
| 3145 | ;; Checking formulas for safety | 3239 | ;; Checking formulas for safety |
diff --git a/lisp/simple.el b/lisp/simple.el index 9fab1d6dd86..67f6e4eedf7 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; simple.el --- basic editing commands for Emacs | 1 | ;;; simple.el --- basic editing commands for Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985-1987, 1993-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1985-1987, 1993-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Maintainer: FSF | 5 | ;; Maintainer: FSF |
| 6 | ;; Keywords: internal | 6 | ;; Keywords: internal |
| @@ -2464,9 +2464,9 @@ COMMAND. | |||
| 2464 | To specify a coding system for converting non-ASCII characters | 2464 | To specify a coding system for converting non-ASCII characters |
| 2465 | in the input and output to the shell command, use \\[universal-coding-system-argument] | 2465 | in the input and output to the shell command, use \\[universal-coding-system-argument] |
| 2466 | before this command. By default, the input (from the current buffer) | 2466 | before this command. By default, the input (from the current buffer) |
| 2467 | is encoded in the same coding system that will be used to save the file, | 2467 | is encoded using coding-system specified by `process-coding-system-alist', |
| 2468 | `buffer-file-coding-system'. If the output is going to replace the region, | 2468 | falling back to `default-process-coding-system' if no match for COMMAND |
| 2469 | then it is decoded from that same coding system. | 2469 | is found in `process-coding-system-alist'. |
| 2470 | 2470 | ||
| 2471 | The noninteractive arguments are START, END, COMMAND, | 2471 | The noninteractive arguments are START, END, COMMAND, |
| 2472 | OUTPUT-BUFFER, REPLACE, ERROR-BUFFER, and DISPLAY-ERROR-BUFFER. | 2472 | OUTPUT-BUFFER, REPLACE, ERROR-BUFFER, and DISPLAY-ERROR-BUFFER. |
| @@ -2677,13 +2677,13 @@ value passed." | |||
| 2677 | (defvar process-file-side-effects t | 2677 | (defvar process-file-side-effects t |
| 2678 | "Whether a call of `process-file' changes remote files. | 2678 | "Whether a call of `process-file' changes remote files. |
| 2679 | 2679 | ||
| 2680 | Per default, this variable is always set to `t', meaning that a | 2680 | By default, this variable is always set to `t', meaning that a |
| 2681 | call of `process-file' could potentially change any file on a | 2681 | call of `process-file' could potentially change any file on a |
| 2682 | remote host. When set to `nil', a file handler could optimize | 2682 | remote host. When set to `nil', a file handler could optimize |
| 2683 | its behavior with respect to remote file attributes caching. | 2683 | its behavior with respect to remote file attribute caching. |
| 2684 | 2684 | ||
| 2685 | This variable should never be changed by `setq'. Instead of, it | 2685 | You should only ever change this variable with a let-binding; |
| 2686 | shall be set only by let-binding.") | 2686 | never with `setq'.") |
| 2687 | 2687 | ||
| 2688 | (defun start-file-process (name buffer program &rest program-args) | 2688 | (defun start-file-process (name buffer program &rest program-args) |
| 2689 | "Start a program in a subprocess. Return the process object for it. | 2689 | "Start a program in a subprocess. Return the process object for it. |
| @@ -3487,14 +3487,14 @@ and KILLP is t if a prefix arg was specified." | |||
| 3487 | "Kill up to and including ARGth occurrence of CHAR. | 3487 | "Kill up to and including ARGth occurrence of CHAR. |
| 3488 | Case is ignored if `case-fold-search' is non-nil in the current buffer. | 3488 | Case is ignored if `case-fold-search' is non-nil in the current buffer. |
| 3489 | Goes backward if ARG is negative; error if CHAR not found." | 3489 | Goes backward if ARG is negative; error if CHAR not found." |
| 3490 | (interactive "p\ncZap to char: ") | 3490 | (interactive (list (prefix-numeric-value current-prefix-arg) |
| 3491 | (read-char "Zap to char: " t))) | ||
| 3491 | ;; Avoid "obsolete" warnings for translation-table-for-input. | 3492 | ;; Avoid "obsolete" warnings for translation-table-for-input. |
| 3492 | (with-no-warnings | 3493 | (with-no-warnings |
| 3493 | (if (char-table-p translation-table-for-input) | 3494 | (if (char-table-p translation-table-for-input) |
| 3494 | (setq char (or (aref translation-table-for-input char) char)))) | 3495 | (setq char (or (aref translation-table-for-input char) char)))) |
| 3495 | (kill-region (point) (progn | 3496 | (kill-region (point) (progn |
| 3496 | (search-forward (char-to-string char) nil nil arg) | 3497 | (search-forward (char-to-string char) nil nil arg) |
| 3497 | ; (goto-char (if (> arg 0) (1- (point)) (1+ (point)))) | ||
| 3498 | (point)))) | 3498 | (point)))) |
| 3499 | 3499 | ||
| 3500 | ;; kill-line and its subroutines. | 3500 | ;; kill-line and its subroutines. |
| @@ -4405,23 +4405,25 @@ lines." | |||
| 4405 | ;; a cleaner solution to the problem of making C-n do something | 4405 | ;; a cleaner solution to the problem of making C-n do something |
| 4406 | ;; useful given a tall image. | 4406 | ;; useful given a tall image. |
| 4407 | (defun line-move (arg &optional noerror to-end try-vscroll) | 4407 | (defun line-move (arg &optional noerror to-end try-vscroll) |
| 4408 | (unless (and auto-window-vscroll try-vscroll | 4408 | (if noninteractive |
| 4409 | ;; Only vscroll for single line moves | 4409 | (forward-line arg) |
| 4410 | (= (abs arg) 1) | 4410 | (unless (and auto-window-vscroll try-vscroll |
| 4411 | ;; But don't vscroll in a keyboard macro. | 4411 | ;; Only vscroll for single line moves |
| 4412 | (not defining-kbd-macro) | 4412 | (= (abs arg) 1) |
| 4413 | (not executing-kbd-macro) | 4413 | ;; But don't vscroll in a keyboard macro. |
| 4414 | (line-move-partial arg noerror to-end)) | 4414 | (not defining-kbd-macro) |
| 4415 | (set-window-vscroll nil 0 t) | 4415 | (not executing-kbd-macro) |
| 4416 | (if (and line-move-visual | 4416 | (line-move-partial arg noerror to-end)) |
| 4417 | ;; Display-based column are incompatible with goal-column. | 4417 | (set-window-vscroll nil 0 t) |
| 4418 | (not goal-column) | 4418 | (if (and line-move-visual |
| 4419 | ;; When the text in the window is scrolled to the left, | 4419 | ;; Display-based column are incompatible with goal-column. |
| 4420 | ;; display-based motion doesn't make sense (because each | 4420 | (not goal-column) |
| 4421 | ;; logical line occupies exactly one screen line). | 4421 | ;; When the text in the window is scrolled to the left, |
| 4422 | (not (> (window-hscroll) 0))) | 4422 | ;; display-based motion doesn't make sense (because each |
| 4423 | (line-move-visual arg noerror) | 4423 | ;; logical line occupies exactly one screen line). |
| 4424 | (line-move-1 arg noerror to-end)))) | 4424 | (not (> (window-hscroll) 0))) |
| 4425 | (line-move-visual arg noerror) | ||
| 4426 | (line-move-1 arg noerror to-end))))) | ||
| 4425 | 4427 | ||
| 4426 | ;; Display-based alternative to line-move-1. | 4428 | ;; Display-based alternative to line-move-1. |
| 4427 | ;; Arg says how many lines to move. The value is t if we can move the | 4429 | ;; Arg says how many lines to move. The value is t if we can move the |
diff --git a/lisp/speedbar.el b/lisp/speedbar.el index bb1debb4552..9065d9ed131 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; speedbar --- quick access to files and tags in a frame | 1 | ;;; speedbar --- quick access to files and tags in a frame |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1996-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1996-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Eric M. Ludlam <zappo@gnu.org> | 5 | ;; Author: Eric M. Ludlam <zappo@gnu.org> |
| 6 | ;; Keywords: file, tags, tools | 6 | ;; Keywords: file, tags, tools |
| @@ -1022,7 +1022,7 @@ supported at a time. | |||
| 1022 | (set (make-local-variable 'dframe-delete-frame-function) | 1022 | (set (make-local-variable 'dframe-delete-frame-function) |
| 1023 | 'speedbar-handle-delete-frame) | 1023 | 'speedbar-handle-delete-frame) |
| 1024 | ;; hscroll | 1024 | ;; hscroll |
| 1025 | (set (make-local-variable 'automatic-hscrolling) nil) ; Emacs 21 | 1025 | (set (make-local-variable 'auto-hscroll-mode) nil) |
| 1026 | ;; reset the selection variable | 1026 | ;; reset the selection variable |
| 1027 | (setq speedbar-last-selected-file nil)) | 1027 | (setq speedbar-last-selected-file nil)) |
| 1028 | 1028 | ||
diff --git a/lisp/startup.el b/lisp/startup.el index 518b53ccdf1..4a8af55af2f 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -1169,38 +1169,6 @@ the `--debug-init' option to view a complete error backtrace." | |||
| 1169 | (or mail-host-address | 1169 | (or mail-host-address |
| 1170 | (system-name)))))) | 1170 | (system-name)))))) |
| 1171 | 1171 | ||
| 1172 | ;; Originally face attributes were specified via | ||
| 1173 | ;; `font-lock-face-attributes'. Users then changed the default | ||
| 1174 | ;; face attributes by setting that variable. However, we try and | ||
| 1175 | ;; be back-compatible and respect its value if set except for | ||
| 1176 | ;; faces where M-x customize has been used to save changes for the | ||
| 1177 | ;; face. | ||
| 1178 | (when (boundp 'font-lock-face-attributes) | ||
| 1179 | (let ((face-attributes font-lock-face-attributes)) | ||
| 1180 | (while face-attributes | ||
| 1181 | (let* ((face-attribute (pop face-attributes)) | ||
| 1182 | (face (car face-attribute))) | ||
| 1183 | ;; Rustle up a `defface' SPEC from a | ||
| 1184 | ;; `font-lock-face-attributes' entry. | ||
| 1185 | (unless (get face 'saved-face) | ||
| 1186 | (let ((foreground (nth 1 face-attribute)) | ||
| 1187 | (background (nth 2 face-attribute)) | ||
| 1188 | (bold-p (nth 3 face-attribute)) | ||
| 1189 | (italic-p (nth 4 face-attribute)) | ||
| 1190 | (underline-p (nth 5 face-attribute)) | ||
| 1191 | face-spec) | ||
| 1192 | (when foreground | ||
| 1193 | (setq face-spec (cons ':foreground (cons foreground face-spec)))) | ||
| 1194 | (when background | ||
| 1195 | (setq face-spec (cons ':background (cons background face-spec)))) | ||
| 1196 | (when bold-p | ||
| 1197 | (setq face-spec (append '(:weight bold) face-spec))) | ||
| 1198 | (when italic-p | ||
| 1199 | (setq face-spec (append '(:slant italic) face-spec))) | ||
| 1200 | (when underline-p | ||
| 1201 | (setq face-spec (append '(:underline t) face-spec))) | ||
| 1202 | (face-spec-set face (list (list t face-spec)) nil))))))) | ||
| 1203 | |||
| 1204 | ;; If parameter have been changed in the init file which influence | 1172 | ;; If parameter have been changed in the init file which influence |
| 1205 | ;; face realization, clear the face cache so that new faces will | 1173 | ;; face realization, clear the face cache so that new faces will |
| 1206 | ;; be realized. | 1174 | ;; be realized. |
| @@ -2348,6 +2316,7 @@ A fancy display is used on graphic displays, normal otherwise." | |||
| 2348 | (if (or inhibit-startup-screen | 2316 | (if (or inhibit-startup-screen |
| 2349 | initial-buffer-choice | 2317 | initial-buffer-choice |
| 2350 | noninteractive | 2318 | noninteractive |
| 2319 | (daemonp) | ||
| 2351 | inhibit-x-resources) | 2320 | inhibit-x-resources) |
| 2352 | 2321 | ||
| 2353 | ;; Not displaying a startup screen. If 3 or more files | 2322 | ;; Not displaying a startup screen. If 3 or more files |
| @@ -2390,9 +2359,7 @@ A fancy display is used on graphic displays, normal otherwise." | |||
| 2390 | ;; (with-no-warnings | 2359 | ;; (with-no-warnings |
| 2391 | ;; (setq menubar-bindings-done t)) | 2360 | ;; (setq menubar-bindings-done t)) |
| 2392 | 2361 | ||
| 2393 | (if (> file-count 0) | 2362 | (display-startup-screen (> file-count 0))))) |
| 2394 | (display-startup-screen t) | ||
| 2395 | (display-startup-screen nil))))) | ||
| 2396 | 2363 | ||
| 2397 | (defun command-line-normalize-file-name (file) | 2364 | (defun command-line-normalize-file-name (file) |
| 2398 | "Collapse multiple slashes to one, to handle non-Emacs file names." | 2365 | "Collapse multiple slashes to one, to handle non-Emacs file names." |
diff --git a/lisp/subr.el b/lisp/subr.el index a6ad67283be..8e296aa7422 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -678,7 +678,6 @@ Subkeymaps may be modified but are not canonicalized." | |||
| 678 | ;; Process the bindings starting from the end. | 678 | ;; Process the bindings starting from the end. |
| 679 | (dolist (binding (prog1 bindings (setq bindings ()))) | 679 | (dolist (binding (prog1 bindings (setq bindings ()))) |
| 680 | (let* ((key (car binding)) | 680 | (let* ((key (car binding)) |
| 681 | (item (cdr binding)) | ||
| 682 | (oldbind (assq key bindings))) | 681 | (oldbind (assq key bindings))) |
| 683 | (push (if (not oldbind) | 682 | (push (if (not oldbind) |
| 684 | ;; The normal case: no duplicate bindings. | 683 | ;; The normal case: no duplicate bindings. |
| @@ -871,6 +870,7 @@ The normal global definition of the character C-x indirects to this keymap.") | |||
| 871 | (defsubst eventp (obj) | 870 | (defsubst eventp (obj) |
| 872 | "True if the argument is an event object." | 871 | "True if the argument is an event object." |
| 873 | (or (and (integerp obj) | 872 | (or (and (integerp obj) |
| 873 | ;; FIXME: Why bother? | ||
| 874 | ;; Filter out integers too large to be events. | 874 | ;; Filter out integers too large to be events. |
| 875 | ;; M is the biggest modifier. | 875 | ;; M is the biggest modifier. |
| 876 | (zerop (logand obj (lognot (1- (lsh ?\M-\^@ 1))))) | 876 | (zerop (logand obj (lognot (1- (lsh ?\M-\^@ 1))))) |
| @@ -1888,8 +1888,7 @@ Used from `delayed-warnings-hook' (which see)." | |||
| 1888 | (push warning collapsed))) | 1888 | (push warning collapsed))) |
| 1889 | (setq delayed-warnings-list (nreverse collapsed)))) | 1889 | (setq delayed-warnings-list (nreverse collapsed)))) |
| 1890 | 1890 | ||
| 1891 | ;; At present this is only really useful for Emacs internals. | 1891 | ;; At present this is only used for Emacs internals. |
| 1892 | ;; Document in the lispref if it becomes generally useful. | ||
| 1893 | ;; Ref http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00085.html | 1892 | ;; Ref http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00085.html |
| 1894 | (defvar delayed-warnings-hook '(collapse-delayed-warnings | 1893 | (defvar delayed-warnings-hook '(collapse-delayed-warnings |
| 1895 | display-delayed-warnings) | 1894 | display-delayed-warnings) |
| @@ -1989,6 +1988,10 @@ obey the input decoding and translations usually done by `read-key-sequence'. | |||
| 1989 | So escape sequences and keyboard encoding are taken into account. | 1988 | So escape sequences and keyboard encoding are taken into account. |
| 1990 | When there's an ambiguity because the key looks like the prefix of | 1989 | When there's an ambiguity because the key looks like the prefix of |
| 1991 | some sort of escape sequence, the ambiguity is resolved via `read-key-delay'." | 1990 | some sort of escape sequence, the ambiguity is resolved via `read-key-delay'." |
| 1991 | ;; This overriding-terminal-local-map binding also happens to | ||
| 1992 | ;; disable quail's input methods, so although read-key-sequence | ||
| 1993 | ;; always inherits the input method, in practice read-key does not | ||
| 1994 | ;; inherit the input method (at least not if it's based on quail). | ||
| 1992 | (let ((overriding-terminal-local-map read-key-empty-map) | 1995 | (let ((overriding-terminal-local-map read-key-empty-map) |
| 1993 | (overriding-local-map nil) | 1996 | (overriding-local-map nil) |
| 1994 | (echo-keystrokes 0) | 1997 | (echo-keystrokes 0) |
| @@ -2093,77 +2096,45 @@ Optional DEFAULT is a default password to use instead of empty input. | |||
| 2093 | 2096 | ||
| 2094 | This function echoes `.' for each character that the user types. | 2097 | This function echoes `.' for each character that the user types. |
| 2095 | 2098 | ||
| 2096 | The user ends with RET, LFD, or ESC. DEL or C-h rubs out. | ||
| 2097 | C-y yanks the current kill. C-u kills line. | ||
| 2098 | C-g quits; if `inhibit-quit' was non-nil around this function, | ||
| 2099 | then it returns nil if the user types C-g, but `quit-flag' remains set. | ||
| 2100 | |||
| 2101 | Once the caller uses the password, it can erase the password | 2099 | Once the caller uses the password, it can erase the password |
| 2102 | by doing (clear-string STRING)." | 2100 | by doing (clear-string STRING)." |
| 2103 | (with-local-quit | 2101 | (if confirm |
| 2104 | (if confirm | 2102 | (let (success) |
| 2105 | (let (success) | 2103 | (while (not success) |
| 2106 | (while (not success) | 2104 | (let ((first (read-passwd prompt nil default)) |
| 2107 | (let ((first (read-passwd prompt nil default)) | 2105 | (second (read-passwd "Confirm password: " nil default))) |
| 2108 | (second (read-passwd "Confirm password: " nil default))) | 2106 | (if (equal first second) |
| 2109 | (if (equal first second) | 2107 | (progn |
| 2110 | (progn | 2108 | (and (arrayp second) (clear-string second)) |
| 2111 | (and (arrayp second) (clear-string second)) | 2109 | (setq success first)) |
| 2112 | (setq success first)) | 2110 | (and (arrayp first) (clear-string first)) |
| 2113 | (and (arrayp first) (clear-string first)) | 2111 | (and (arrayp second) (clear-string second)) |
| 2114 | (and (arrayp second) (clear-string second)) | 2112 | (message "Password not repeated accurately; please start over") |
| 2115 | (message "Password not repeated accurately; please start over") | 2113 | (sit-for 1)))) |
| 2116 | (sit-for 1)))) | 2114 | success) |
| 2117 | success) | 2115 | (let (minibuf) |
| 2118 | (let ((pass nil) | 2116 | (minibuffer-with-setup-hook |
| 2119 | ;; Copy it so that add-text-properties won't modify | 2117 | (lambda () |
| 2120 | ;; the object that was passed in by the caller. | 2118 | (setq minibuf (current-buffer)) |
| 2121 | (prompt (copy-sequence prompt)) | 2119 | ;; Turn off electricity. |
| 2122 | (c 0) | 2120 | (set (make-local-variable 'post-self-insert-hook) nil) |
| 2123 | (echo-keystrokes 0) | 2121 | (add-hook 'after-change-functions |
| 2124 | (cursor-in-echo-area t) | 2122 | (lambda (beg end _len) |
| 2125 | (message-log-max nil) | 2123 | (clear-this-command-keys) |
| 2126 | (stop-keys (list 'return ?\r ?\n ?\e)) | 2124 | (setq beg (min end (max (minibuffer-prompt-end) |
| 2127 | (rubout-keys (list 'backspace ?\b ?\177))) | 2125 | beg))) |
| 2128 | (add-text-properties 0 (length prompt) | 2126 | (dotimes (i (- end beg)) |
| 2129 | minibuffer-prompt-properties prompt) | 2127 | (put-text-property (+ i beg) (+ 1 i beg) |
| 2130 | (while (progn (message "%s%s" | 2128 | 'display (string ?.)))) |
| 2131 | prompt | 2129 | nil t)) |
| 2132 | (make-string (length pass) ?.)) | 2130 | (unwind-protect |
| 2133 | (setq c (read-key)) | 2131 | (read-string prompt nil |
| 2134 | (not (memq c stop-keys))) | 2132 | (let ((sym (make-symbol "forget-history"))) |
| 2135 | (clear-this-command-keys) | 2133 | (set sym nil) |
| 2136 | (cond ((memq c rubout-keys) ; rubout | 2134 | sym) |
| 2137 | (when (> (length pass) 0) | 2135 | default) |
| 2138 | (let ((new-pass (substring pass 0 -1))) | 2136 | (when (buffer-live-p minibuf) |
| 2139 | (and (arrayp pass) (clear-string pass)) | 2137 | (with-current-buffer minibuf (erase-buffer)))))))) |
| 2140 | (setq pass new-pass)))) | ||
| 2141 | ((eq c ?\C-g) (keyboard-quit)) | ||
| 2142 | ((not (numberp c))) | ||
| 2143 | ((= c ?\C-u) ; kill line | ||
| 2144 | (and (arrayp pass) (clear-string pass)) | ||
| 2145 | (setq pass "")) | ||
| 2146 | ((= c ?\C-y) ; yank | ||
| 2147 | (let* ((str (condition-case nil | ||
| 2148 | (current-kill 0) | ||
| 2149 | (error nil))) | ||
| 2150 | new-pass) | ||
| 2151 | (when str | ||
| 2152 | (setq new-pass | ||
| 2153 | (concat pass | ||
| 2154 | (substring-no-properties str))) | ||
| 2155 | (and (arrayp pass) (clear-string pass)) | ||
| 2156 | (setq c ?\0) | ||
| 2157 | (setq pass new-pass)))) | ||
| 2158 | ((characterp c) ; insert char | ||
| 2159 | (let* ((new-char (char-to-string c)) | ||
| 2160 | (new-pass (concat pass new-char))) | ||
| 2161 | (and (arrayp pass) (clear-string pass)) | ||
| 2162 | (clear-string new-char) | ||
| 2163 | (setq c ?\0) | ||
| 2164 | (setq pass new-pass))))) | ||
| 2165 | (message nil) | ||
| 2166 | (or pass default ""))))) | ||
| 2167 | 2138 | ||
| 2168 | ;; This should be used by `call-interactively' for `n' specs. | 2139 | ;; This should be used by `call-interactively' for `n' specs. |
| 2169 | (defun read-number (prompt &optional default) | 2140 | (defun read-number (prompt &optional default) |
| @@ -2336,6 +2307,8 @@ is nil and `use-dialog-box' is non-nil." | |||
| 2336 | (discard-input)))) | 2307 | (discard-input)))) |
| 2337 | (let ((ret (eq answer 'act))) | 2308 | (let ((ret (eq answer 'act))) |
| 2338 | (unless noninteractive | 2309 | (unless noninteractive |
| 2310 | ;; FIXME this prints one too many spaces, since prompt | ||
| 2311 | ;; already ends in a space. Eg "... (y or n) y". | ||
| 2339 | (message "%s %s" prompt (if ret "y" "n"))) | 2312 | (message "%s %s" prompt (if ret "y" "n"))) |
| 2340 | ret))) | 2313 | ret))) |
| 2341 | 2314 | ||
| @@ -3557,8 +3530,7 @@ of STRING. | |||
| 3557 | To replace only the first match (if any), make REGEXP match up to \\' | 3530 | To replace only the first match (if any), make REGEXP match up to \\' |
| 3558 | and replace a sub-expression, e.g. | 3531 | and replace a sub-expression, e.g. |
| 3559 | (replace-regexp-in-string \"\\\\(foo\\\\).*\\\\'\" \"bar\" \" foo foo\" nil nil 1) | 3532 | (replace-regexp-in-string \"\\\\(foo\\\\).*\\\\'\" \"bar\" \" foo foo\" nil nil 1) |
| 3560 | => \" bar foo\" | 3533 | => \" bar foo\"" |
| 3561 | " | ||
| 3562 | 3534 | ||
| 3563 | ;; To avoid excessive consing from multiple matches in long strings, | 3535 | ;; To avoid excessive consing from multiple matches in long strings, |
| 3564 | ;; don't just call `replace-match' continually. Walk down the | 3536 | ;; don't just call `replace-match' continually. Walk down the |
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el index 3eb2be15698..7c95f47e0fb 100644 --- a/lisp/tar-mode.el +++ b/lisp/tar-mode.el | |||
| @@ -549,6 +549,7 @@ MODE should be an integer which is a file mode value." | |||
| 549 | (define-key map "R" 'tar-rename-entry) | 549 | (define-key map "R" 'tar-rename-entry) |
| 550 | (define-key map "u" 'tar-unflag) | 550 | (define-key map "u" 'tar-unflag) |
| 551 | (define-key map "v" 'tar-view) | 551 | (define-key map "v" 'tar-view) |
| 552 | (define-key map "w" 'woman-tar-extract-file) | ||
| 552 | (define-key map "x" 'tar-expunge) | 553 | (define-key map "x" 'tar-expunge) |
| 553 | (define-key map "\177" 'tar-unflag-backwards) | 554 | (define-key map "\177" 'tar-unflag-backwards) |
| 554 | (define-key map "E" 'tar-extract-other-window) | 555 | (define-key map "E" 'tar-extract-other-window) |
| @@ -566,6 +567,8 @@ MODE should be an integer which is a file mode value." | |||
| 566 | (define-key map [menu-bar immediate] | 567 | (define-key map [menu-bar immediate] |
| 567 | (cons "Immediate" (make-sparse-keymap "Immediate"))) | 568 | (cons "Immediate" (make-sparse-keymap "Immediate"))) |
| 568 | 569 | ||
| 570 | (define-key map [menu-bar immediate woman] | ||
| 571 | '("Read Man Page (WoMan)" . woman-tar-extract-file)) | ||
| 569 | (define-key map [menu-bar immediate view] | 572 | (define-key map [menu-bar immediate view] |
| 570 | '("View This File" . tar-view)) | 573 | '("View This File" . tar-view)) |
| 571 | (define-key map [menu-bar immediate display] | 574 | (define-key map [menu-bar immediate display] |
| @@ -677,6 +680,8 @@ See also: variables `tar-update-datestamp' and `tar-anal-blocksize'. | |||
| 677 | (fundamental-mode) | 680 | (fundamental-mode) |
| 678 | (signal (car err) (cdr err))))) | 681 | (signal (car err) (cdr err))))) |
| 679 | 682 | ||
| 683 | (autoload 'woman-tar-extract-file "woman" | ||
| 684 | "In tar mode, run the WoMan man-page browser on this file." t) | ||
| 680 | 685 | ||
| 681 | (define-minor-mode tar-subfile-mode | 686 | (define-minor-mode tar-subfile-mode |
| 682 | "Minor mode for editing an element of a tar-file. | 687 | "Minor mode for editing an element of a tar-file. |
diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index dedbfcbf338..76d03dd164f 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el | |||
| @@ -1197,9 +1197,9 @@ PREV-OP-ARG are used when invoked recursively during the build-up." | |||
| 1197 | ;;; --------------------------------- | 1197 | ;;; --------------------------------- |
| 1198 | 1198 | ||
| 1199 | ;;;###autoload | 1199 | ;;;###autoload |
| 1200 | (defun artist-mode (&optional state) | 1200 | (define-minor-mode artist-mode |
| 1201 | "Toggle Artist mode. | 1201 | "Toggle Artist mode. |
| 1202 | With argument STATE, turn Artist mode on if STATE is positive. | 1202 | With argument ARG, turn Artist mode on if ARG is positive. |
| 1203 | Artist lets you draw lines, squares, rectangles and poly-lines, | 1203 | Artist lets you draw lines, squares, rectangles and poly-lines, |
| 1204 | ellipses and circles with your mouse and/or keyboard. | 1204 | ellipses and circles with your mouse and/or keyboard. |
| 1205 | 1205 | ||
| @@ -1388,36 +1388,24 @@ Variables | |||
| 1388 | 1388 | ||
| 1389 | Hooks | 1389 | Hooks |
| 1390 | 1390 | ||
| 1391 | When entering artist-mode, the hook `artist-mode-init-hook' is called. | 1391 | Turning the mode on or off runs `artist-mode-hook'. |
| 1392 | When quitting artist-mode, the hook `artist-mode-exit-hook' is called. | ||
| 1393 | 1392 | ||
| 1394 | 1393 | ||
| 1395 | Keymap summary | 1394 | Keymap summary |
| 1396 | 1395 | ||
| 1397 | \\{artist-mode-map}" | 1396 | \\{artist-mode-map}" |
| 1398 | (interactive) | 1397 | :init-value nil :group 'artist :lighter artist-mode-name |
| 1399 | (if (setq artist-mode | 1398 | :keymap artist-mode-map |
| 1400 | (if (null state) (not artist-mode) | 1399 | (cond ((null artist-mode) |
| 1401 | (> (prefix-numeric-value state) 0))) | 1400 | ;; Turn mode off |
| 1402 | (artist-mode-init) | 1401 | (artist-mode-exit)) |
| 1403 | (artist-mode-exit))) | 1402 | (t |
| 1404 | 1403 | ;; Turn mode on | |
| 1405 | ;; insert our minor mode string | 1404 | (artist-mode-init)))) |
| 1406 | (or (assq 'artist-mode minor-mode-alist) | ||
| 1407 | (setq minor-mode-alist | ||
| 1408 | (cons '(artist-mode artist-mode-name) | ||
| 1409 | minor-mode-alist))) | ||
| 1410 | |||
| 1411 | ;; insert our minor mode keymap | ||
| 1412 | (or (assq 'artist-mode minor-mode-map-alist) | ||
| 1413 | (setq minor-mode-map-alist | ||
| 1414 | (cons (cons 'artist-mode artist-mode-map) | ||
| 1415 | minor-mode-map-alist))) | ||
| 1416 | |||
| 1417 | 1405 | ||
| 1418 | ;; Init and exit | 1406 | ;; Init and exit |
| 1419 | (defun artist-mode-init () | 1407 | (defun artist-mode-init () |
| 1420 | "Init Artist mode. This will call the hook `artist-mode-init-hook'." | 1408 | "Init Artist mode. This will call the hook `artist-mode-hook'." |
| 1421 | ;; Set up a conversion table for mapping tabs and new-lines to spaces. | 1409 | ;; Set up a conversion table for mapping tabs and new-lines to spaces. |
| 1422 | ;; the last case, 0, is for the last position in buffer/region, where | 1410 | ;; the last case, 0, is for the last position in buffer/region, where |
| 1423 | ;; the `following-char' function returns 0. | 1411 | ;; the `following-char' function returns 0. |
| @@ -1459,15 +1447,13 @@ Keymap summary | |||
| 1459 | (progn | 1447 | (progn |
| 1460 | (picture-mode) | 1448 | (picture-mode) |
| 1461 | (message ""))) | 1449 | (message ""))) |
| 1462 | (run-hooks 'artist-mode-init-hook) | ||
| 1463 | (artist-mode-line-show-curr-operation artist-key-is-drawing)) | 1450 | (artist-mode-line-show-curr-operation artist-key-is-drawing)) |
| 1464 | 1451 | ||
| 1465 | (defun artist-mode-exit () | 1452 | (defun artist-mode-exit () |
| 1466 | "Exit Artist mode. This will call the hook `artist-mode-exit-hook'." | 1453 | "Exit Artist mode. This will call the hook `artist-mode-hook'." |
| 1467 | (if (and artist-picture-compatibility (eq major-mode 'picture-mode)) | 1454 | (if (and artist-picture-compatibility (eq major-mode 'picture-mode)) |
| 1468 | (picture-mode-exit)) | 1455 | (picture-mode-exit)) |
| 1469 | (kill-local-variable 'next-line-add-newlines) | 1456 | (kill-local-variable 'next-line-add-newlines)) |
| 1470 | (run-hooks 'artist-mode-exit-hook)) | ||
| 1471 | 1457 | ||
| 1472 | (defun artist-mode-off () | 1458 | (defun artist-mode-off () |
| 1473 | "Turn Artist mode off." | 1459 | "Turn Artist mode off." |
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 08254c6f5f7..d0e90c99516 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el | |||
| @@ -1011,7 +1011,8 @@ space does not end a sentence, so don't break a line there." | |||
| 1011 | (if current-prefix-arg 'full)))) | 1011 | (if current-prefix-arg 'full)))) |
| 1012 | (unless (memq justify '(t nil none full center left right)) | 1012 | (unless (memq justify '(t nil none full center left right)) |
| 1013 | (setq justify 'full)) | 1013 | (setq justify 'full)) |
| 1014 | (let (max beg fill-pfx) | 1014 | (let ((start-point (point-marker)) |
| 1015 | max beg fill-pfx) | ||
| 1015 | (goto-char (max from to)) | 1016 | (goto-char (max from to)) |
| 1016 | (when to-eop | 1017 | (when to-eop |
| 1017 | (skip-chars-backward "\n") | 1018 | (skip-chars-backward "\n") |
| @@ -1042,6 +1043,8 @@ space does not end a sentence, so don't break a line there." | |||
| 1042 | (setq fill-pfx | 1043 | (setq fill-pfx |
| 1043 | (fill-region-as-paragraph (point) end justify nosqueeze)) | 1044 | (fill-region-as-paragraph (point) end justify nosqueeze)) |
| 1044 | (goto-char end)))) | 1045 | (goto-char end)))) |
| 1046 | (goto-char start-point) | ||
| 1047 | (set-marker start-point nil) | ||
| 1045 | fill-pfx)) | 1048 | fill-pfx)) |
| 1046 | 1049 | ||
| 1047 | 1050 | ||
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 24967ded154..72a3eb474f8 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el | |||
| @@ -1576,10 +1576,11 @@ The buffer to mark them in is `flyspell-large-region-buffer'." | |||
| 1576 | (if ispell-encoding8-command | 1576 | (if ispell-encoding8-command |
| 1577 | (setq args | 1577 | (setq args |
| 1578 | (append args | 1578 | (append args |
| 1579 | (list | 1579 | (if ispell-really-hunspell |
| 1580 | (concat ispell-encoding8-command | 1580 | (list ispell-encoding8-command |
| 1581 | (symbol-name | 1581 | (upcase (symbol-name encoding))) |
| 1582 | encoding)))))) | 1582 | (list (concat ispell-encoding8-command |
| 1583 | (symbol-name encoding))))))) | ||
| 1583 | 1584 | ||
| 1584 | (let ((process-coding-system-alist (list (cons "\\.*" encoding)))) | 1585 | (let ((process-coding-system-alist (list (cons "\\.*" encoding)))) |
| 1585 | (setq c (apply 'ispell-call-process-region beg | 1586 | (setq c (apply 'ispell-call-process-region beg |
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 74c32817734..53822694698 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -574,12 +574,12 @@ re-start Emacs." | |||
| 574 | 574 | ||
| 575 | 575 | ||
| 576 | (defvar ispell-dictionary-base-alist | 576 | (defvar ispell-dictionary-base-alist |
| 577 | '((nil | 577 | '((nil ; default |
| 578 | ;; The default dictionary. It may be English.aff, or any other | 578 | ;; The default dictionary. It may be English.aff, or any other |
| 579 | ;; dictionary depending on locale and such things. We should probably | 579 | ;; dictionary depending on locale and such things. We should probably |
| 580 | ;; ask ispell what dictionary it's using, but until we do that, let's | 580 | ;; ask ispell what dictionary it's using, but until we do that, let's |
| 581 | ;; just use an approximate regexp. | 581 | ;; just use a minimal regexp. [:alpha:] will later be set if possible. |
| 582 | "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-B") nil iso-8859-1) | 582 | "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1) |
| 583 | ("american" ; Yankee English | 583 | ("american" ; Yankee English |
| 584 | "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1) | 584 | "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1) |
| 585 | ("brasileiro" ; Brazilian mode | 585 | ("brasileiro" ; Brazilian mode |
| @@ -684,7 +684,8 @@ re-start Emacs." | |||
| 684 | ("svenska" ; Swedish mode | 684 | ("svenska" ; Swedish mode |
| 685 | "[A-Za-z\345\344\366\351\340\374\350\346\370\347\305\304\326\311\300\334\310\306\330\307]" | 685 | "[A-Za-z\345\344\366\351\340\374\350\346\370\347\305\304\326\311\300\334\310\306\330\307]" |
| 686 | "[^A-Za-z\345\344\366\351\340\374\350\346\370\347\305\304\326\311\300\334\310\306\330\307]" | 686 | "[^A-Za-z\345\344\366\351\340\374\350\346\370\347\305\304\326\311\300\334\310\306\330\307]" |
| 687 | "[']" nil ("-C") "~list" iso-8859-1)) | 687 | "[']" nil ("-C") "~list" iso-8859-1) |
| 688 | ("hebrew" "[\340\341\342\343\344\345\346\347\350\351\353\352\354\356\355\360\357\361\362\364\363\367\366\365\370\371\372]" "[^\340\341\342\343\344\345\346\347\350\351\353\352\354\356\355\360\357\361\362\364\363\367\366\365\370\371\372]" "" nil ("-B") nil cp1255)) | ||
| 688 | "Base value for `ispell-dictionary-alist'.") | 689 | "Base value for `ispell-dictionary-alist'.") |
| 689 | 690 | ||
| 690 | (defvar ispell-dictionary-alist nil | 691 | (defvar ispell-dictionary-alist nil |
| @@ -766,6 +767,12 @@ here just for backwards compatibility.") | |||
| 766 | (make-obsolete-variable 'ispell-aspell-supports-utf8 | 767 | (make-obsolete-variable 'ispell-aspell-supports-utf8 |
| 767 | 'ispell-encoding8-command "23.1") | 768 | 'ispell-encoding8-command "23.1") |
| 768 | 769 | ||
| 770 | (defvar ispell-emacs-alpha-regexp | ||
| 771 | (if (string-match "^[[:alpha:]]+$" "abcde") | ||
| 772 | "[[:alpha:]]" | ||
| 773 | nil) | ||
| 774 | "[[:alpha:]] if Emacs supports [:alpha:] regexp, nil | ||
| 775 | otherwise (current XEmacs does not support it).") | ||
| 769 | 776 | ||
| 770 | ;;; ********************************************************************** | 777 | ;;; ********************************************************************** |
| 771 | ;;; The following are used by ispell, and should not be changed. | 778 | ;;; The following are used by ispell, and should not be changed. |
| @@ -1091,8 +1098,7 @@ aspell is used along with Emacs).") | |||
| 1091 | (error nil)) | 1098 | (error nil)) |
| 1092 | ispell-really-aspell | 1099 | ispell-really-aspell |
| 1093 | ispell-encoding8-command | 1100 | ispell-encoding8-command |
| 1094 | ;; XEmacs does not like [:alpha:] regexps. | 1101 | ispell-emacs-alpha-regexp) |
| 1095 | (string-match "^[[:alpha:]]+$" "abcde")) | ||
| 1096 | (unless ispell-aspell-dictionary-alist | 1102 | (unless ispell-aspell-dictionary-alist |
| 1097 | (ispell-find-aspell-dictionaries))) | 1103 | (ispell-find-aspell-dictionaries))) |
| 1098 | 1104 | ||
| @@ -1116,8 +1122,27 @@ aspell is used along with Emacs).") | |||
| 1116 | ispell-dictionary-base-alist)) | 1122 | ispell-dictionary-base-alist)) |
| 1117 | (unless (assoc (car dict) all-dicts-alist) | 1123 | (unless (assoc (car dict) all-dicts-alist) |
| 1118 | (add-to-list 'all-dicts-alist dict))) | 1124 | (add-to-list 'all-dicts-alist dict))) |
| 1119 | (setq ispell-dictionary-alist all-dicts-alist)))) | 1125 | (setq ispell-dictionary-alist all-dicts-alist)) |
| 1120 | 1126 | ||
| 1127 | ;; If Emacs flavor supports [:alpha:] use it for global dicts. If | ||
| 1128 | ;; spellchecker also supports UTF-8 via command-line option use it | ||
| 1129 | ;; in communication. This does not affect definitions in ~/.emacs. | ||
| 1130 | (if ispell-emacs-alpha-regexp | ||
| 1131 | (let (tmp-dicts-alist) | ||
| 1132 | (dolist (adict ispell-dictionary-alist) | ||
| 1133 | (add-to-list 'tmp-dicts-alist | ||
| 1134 | (list | ||
| 1135 | (nth 0 adict) ; dict name | ||
| 1136 | "[[:alpha:]]" ; casechars | ||
| 1137 | "[^[:alpha:]]" ; not-casechars | ||
| 1138 | (nth 3 adict) ; otherchars | ||
| 1139 | (nth 4 adict) ; many-otherchars-p | ||
| 1140 | (nth 5 adict) ; ispell-args | ||
| 1141 | (nth 6 adict) ; extended-character-mode | ||
| 1142 | (if ispell-encoding8-command | ||
| 1143 | 'utf-8 | ||
| 1144 | (nth 7 adict))))) | ||
| 1145 | (setq ispell-dictionary-alist tmp-dicts-alist))))) | ||
| 1121 | 1146 | ||
| 1122 | (defun ispell-valid-dictionary-list () | 1147 | (defun ispell-valid-dictionary-list () |
| 1123 | "Return a list of valid dictionaries. | 1148 | "Return a list of valid dictionaries. |
diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el index 9e8cbb216d1..191e9f3672b 100644 --- a/lisp/textmodes/picture.el +++ b/lisp/textmodes/picture.el | |||
| @@ -63,15 +63,17 @@ | |||
| 63 | 63 | ||
| 64 | ;; Picture Movement Commands | 64 | ;; Picture Movement Commands |
| 65 | 65 | ||
| 66 | ;; When a cursor is on a wide-column character (e.g. Chinese, | 66 | (defvar picture-desired-column 0 |
| 67 | ;; Japanese, Korean), this variable tells the desired current column | 67 | "Desired current column for Picture mode. |
| 68 | ;; which may be different from (current-column). | 68 | When a cursor is on a wide-column character (e.g. Chinese, |
| 69 | (defvar picture-desired-column 0) | 69 | Japanese, Korean), this may may be different from `current-column'.") |
| 70 | 70 | ||
| 71 | ;; If the value of picture-desired-column is far from the current | 71 | |
| 72 | ;; column, or if the arg ADJUST-TO-CURRENT is non-nil, set it to the | ||
| 73 | ;; current column. Return the current column. | ||
| 74 | (defun picture-update-desired-column (adjust-to-current) | 72 | (defun picture-update-desired-column (adjust-to-current) |
| 73 | "Maybe update `picture-desired-column'. | ||
| 74 | If the value of `picture-desired-column' is more than one column | ||
| 75 | from `current-column', or if the argument ADJUST-TO-CURRENT is | ||
| 76 | non-nil, set it to the current column. Return `current-column'." | ||
| 75 | (let ((current-column (current-column))) | 77 | (let ((current-column (current-column))) |
| 76 | (if (or adjust-to-current | 78 | (if (or adjust-to-current |
| 77 | (< picture-desired-column (1- current-column)) | 79 | (< picture-desired-column (1- current-column)) |
| @@ -240,8 +242,7 @@ Use \"\\[command-apropos] picture-movement\" to see commands which control motio | |||
| 240 | (spacing (when (display-graphic-p frame) | 242 | (spacing (when (display-graphic-p frame) |
| 241 | (or (with-current-buffer (window-buffer window) | 243 | (or (with-current-buffer (window-buffer window) |
| 242 | line-spacing) | 244 | line-spacing) |
| 243 | (frame-parameter frame 'line-spacing)))) | 245 | (frame-parameter frame 'line-spacing))))) |
| 244 | rows cols) | ||
| 245 | (cond ((floatp spacing) | 246 | (cond ((floatp spacing) |
| 246 | (setq spacing (truncate (* spacing char-ht)))) | 247 | (setq spacing (truncate (* spacing char-ht)))) |
| 247 | ((null spacing) | 248 | ((null spacing) |
| @@ -606,64 +607,61 @@ Leaves the region surrounding the rectangle." | |||
| 606 | 607 | ||
| 607 | (defalias 'picture-delete-char 'delete-char) | 608 | (defalias 'picture-delete-char 'delete-char) |
| 608 | 609 | ||
| 609 | (defvar picture-mode-map nil) | 610 | (defvar picture-mode-map |
| 610 | 611 | (let ((map (make-keymap))) | |
| 611 | (defun picture-substitute (oldfun newfun) | 612 | (define-key map [remap self-insert-command] 'picture-self-insert) |
| 612 | (define-key picture-mode-map (vector 'remap oldfun) newfun)) | 613 | (define-key map [remap self-insert-command] 'picture-self-insert) |
| 613 | 614 | (define-key map [remap completion-separator-self-insert-command] | |
| 614 | (if (not picture-mode-map) | 615 | 'picture-self-insert) |
| 615 | (progn | 616 | (define-key map [remap completion-separator-self-insert-autofilling] |
| 616 | (setq picture-mode-map (make-keymap)) | 617 | 'picture-self-insert) |
| 617 | (picture-substitute 'self-insert-command 'picture-self-insert) | 618 | (define-key map [remap forward-char] 'picture-forward-column) |
| 618 | (picture-substitute 'completion-separator-self-insert-command | 619 | (define-key map [remap backward-char] 'picture-backward-column) |
| 619 | 'picture-self-insert) | 620 | (define-key map [remap delete-char] 'picture-clear-column) |
| 620 | (picture-substitute 'completion-separator-self-insert-autofilling | 621 | ;; There are two possibilities for what is normally on DEL. |
| 621 | 'picture-self-insert) | 622 | (define-key map [remap backward-delete-char-untabify] |
| 622 | (picture-substitute 'forward-char 'picture-forward-column) | 623 | 'picture-backward-clear-column) |
| 623 | (picture-substitute 'backward-char 'picture-backward-column) | 624 | (define-key map [remap delete-backward-char] 'picture-backward-clear-column) |
| 624 | (picture-substitute 'delete-char 'picture-clear-column) | 625 | (define-key map [remap kill-line] 'picture-clear-line) |
| 625 | ;; There are two possibilities for what is normally on DEL. | 626 | (define-key map [remap open-line] 'picture-open-line) |
| 626 | (picture-substitute 'backward-delete-char-untabify 'picture-backward-clear-column) | 627 | (define-key map [remap newline] 'picture-newline) |
| 627 | (picture-substitute 'delete-backward-char 'picture-backward-clear-column) | 628 | (define-key map [remap newline-and-indent] 'picture-duplicate-line) |
| 628 | (picture-substitute 'kill-line 'picture-clear-line) | 629 | (define-key map [remap next-line] 'picture-move-down) |
| 629 | (picture-substitute 'open-line 'picture-open-line) | 630 | (define-key map [remap previous-line] 'picture-move-up) |
| 630 | (picture-substitute 'newline 'picture-newline) | 631 | (define-key map [remap move-beginning-of-line] 'picture-beginning-of-line) |
| 631 | (picture-substitute 'newline-and-indent 'picture-duplicate-line) | 632 | (define-key map [remap move-end-of-line] 'picture-end-of-line) |
| 632 | (picture-substitute 'next-line 'picture-move-down) | 633 | (define-key map [remap mouse-set-point] 'picture-mouse-set-point) |
| 633 | (picture-substitute 'previous-line 'picture-move-up) | 634 | (define-key map "\C-c\C-d" 'picture-delete-char) |
| 634 | (picture-substitute 'move-beginning-of-line 'picture-beginning-of-line) | 635 | (define-key map "\e\t" 'picture-toggle-tab-state) |
| 635 | (picture-substitute 'move-end-of-line 'picture-end-of-line) | 636 | (define-key map "\t" 'picture-tab) |
| 636 | (picture-substitute 'mouse-set-point 'picture-mouse-set-point) | 637 | (define-key map "\e\t" 'picture-tab-search) |
| 637 | 638 | (define-key map "\C-c\t" 'picture-set-tab-stops) | |
| 638 | (define-key picture-mode-map "\C-c\C-d" 'picture-delete-char) | 639 | (define-key map "\C-c\C-k" 'picture-clear-rectangle) |
| 639 | (define-key picture-mode-map "\e\t" 'picture-toggle-tab-state) | 640 | (define-key map "\C-c\C-w" 'picture-clear-rectangle-to-register) |
| 640 | (define-key picture-mode-map "\t" 'picture-tab) | 641 | (define-key map "\C-c\C-y" 'picture-yank-rectangle) |
| 641 | (define-key picture-mode-map "\e\t" 'picture-tab-search) | 642 | (define-key map "\C-c\C-x" 'picture-yank-rectangle-from-register) |
| 642 | (define-key picture-mode-map "\C-c\t" 'picture-set-tab-stops) | 643 | (define-key map "\C-c\C-r" 'picture-draw-rectangle) |
| 643 | (define-key picture-mode-map "\C-c\C-k" 'picture-clear-rectangle) | 644 | (define-key map "\C-c\C-c" 'picture-mode-exit) |
| 644 | (define-key picture-mode-map "\C-c\C-w" 'picture-clear-rectangle-to-register) | 645 | (define-key map "\C-c\C-f" 'picture-motion) |
| 645 | (define-key picture-mode-map "\C-c\C-y" 'picture-yank-rectangle) | 646 | (define-key map "\C-c\C-b" 'picture-motion-reverse) |
| 646 | (define-key picture-mode-map "\C-c\C-x" 'picture-yank-rectangle-from-register) | 647 | (define-key map "\C-c<" 'picture-movement-left) |
| 647 | (define-key picture-mode-map "\C-c\C-r" 'picture-draw-rectangle) | 648 | (define-key map "\C-c>" 'picture-movement-right) |
| 648 | (define-key picture-mode-map "\C-c\C-c" 'picture-mode-exit) | 649 | (define-key map "\C-c^" 'picture-movement-up) |
| 649 | (define-key picture-mode-map "\C-c\C-f" 'picture-motion) | 650 | (define-key map "\C-c." 'picture-movement-down) |
| 650 | (define-key picture-mode-map "\C-c\C-b" 'picture-motion-reverse) | 651 | (define-key map "\C-c`" 'picture-movement-nw) |
| 651 | (define-key picture-mode-map "\C-c<" 'picture-movement-left) | 652 | (define-key map "\C-c'" 'picture-movement-ne) |
| 652 | (define-key picture-mode-map "\C-c>" 'picture-movement-right) | 653 | (define-key map "\C-c/" 'picture-movement-sw) |
| 653 | (define-key picture-mode-map "\C-c^" 'picture-movement-up) | 654 | (define-key map "\C-c\\" 'picture-movement-se) |
| 654 | (define-key picture-mode-map "\C-c." 'picture-movement-down) | 655 | (define-key map [(control ?c) left] 'picture-movement-left) |
| 655 | (define-key picture-mode-map "\C-c`" 'picture-movement-nw) | 656 | (define-key map [(control ?c) right] 'picture-movement-right) |
| 656 | (define-key picture-mode-map "\C-c'" 'picture-movement-ne) | 657 | (define-key map [(control ?c) up] 'picture-movement-up) |
| 657 | (define-key picture-mode-map "\C-c/" 'picture-movement-sw) | 658 | (define-key map [(control ?c) down] 'picture-movement-down) |
| 658 | (define-key picture-mode-map "\C-c\\" 'picture-movement-se) | 659 | (define-key map [(control ?c) home] 'picture-movement-nw) |
| 659 | (define-key picture-mode-map [(control ?c) left] 'picture-movement-left) | 660 | (define-key map [(control ?c) prior] 'picture-movement-ne) |
| 660 | (define-key picture-mode-map [(control ?c) right] 'picture-movement-right) | 661 | (define-key map [(control ?c) end] 'picture-movement-sw) |
| 661 | (define-key picture-mode-map [(control ?c) up] 'picture-movement-up) | 662 | (define-key map [(control ?c) next] 'picture-movement-se) |
| 662 | (define-key picture-mode-map [(control ?c) down] 'picture-movement-down) | 663 | map) |
| 663 | (define-key picture-mode-map [(control ?c) home] 'picture-movement-nw) | 664 | "Keymap used in `picture-mode'.") |
| 664 | (define-key picture-mode-map [(control ?c) prior] 'picture-movement-ne) | ||
| 665 | (define-key picture-mode-map [(control ?c) end] 'picture-movement-sw) | ||
| 666 | (define-key picture-mode-map [(control ?c) next] 'picture-movement-se))) | ||
| 667 | 665 | ||
| 668 | (defcustom picture-mode-hook nil | 666 | (defcustom picture-mode-hook nil |
| 669 | "If non-nil, its value is called on entry to Picture mode. | 667 | "If non-nil, its value is called on entry to Picture mode. |
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 9472d7df879..af00531137a 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el | |||
| @@ -1492,8 +1492,8 @@ Puts point on a blank line between them." | |||
| 1492 | 1492 | ||
| 1493 | (defvar latex-complete-bibtex-cache nil) | 1493 | (defvar latex-complete-bibtex-cache nil) |
| 1494 | 1494 | ||
| 1495 | (defun latex-string-prefix-p (str1 str2) | 1495 | (define-obsolete-function-alias 'latex-string-prefix-p |
| 1496 | (eq t (compare-strings str1 nil nil str2 0 (length str1)))) | 1496 | 'string-prefix-p "24.2") |
| 1497 | 1497 | ||
| 1498 | (defvar bibtex-reference-key) | 1498 | (defvar bibtex-reference-key) |
| 1499 | (declare-function reftex-get-bibfile-list "reftex-cite.el" ()) | 1499 | (declare-function reftex-get-bibfile-list "reftex-cite.el" ()) |
| @@ -1507,7 +1507,7 @@ Puts point on a blank line between them." | |||
| 1507 | keys) | 1507 | keys) |
| 1508 | (if (and (eq (car latex-complete-bibtex-cache) | 1508 | (if (and (eq (car latex-complete-bibtex-cache) |
| 1509 | (reftex-get-bibfile-list)) | 1509 | (reftex-get-bibfile-list)) |
| 1510 | (latex-string-prefix-p (nth 1 latex-complete-bibtex-cache) | 1510 | (string-prefix-p (nth 1 latex-complete-bibtex-cache) |
| 1511 | key)) | 1511 | key)) |
| 1512 | ;; Use the cache. | 1512 | ;; Use the cache. |
| 1513 | (setq keys (nth 2 latex-complete-bibtex-cache)) | 1513 | (setq keys (nth 2 latex-complete-bibtex-cache)) |
| @@ -2051,10 +2051,7 @@ IN can be either a string (with the same % escapes in it) indicating | |||
| 2051 | OUT describes the output file and is either a %-escaped string | 2051 | OUT describes the output file and is either a %-escaped string |
| 2052 | or nil to indicate that there is no output file.") | 2052 | or nil to indicate that there is no output file.") |
| 2053 | 2053 | ||
| 2054 | ;; defsubst* gives better byte-code than defsubst. | 2054 | (define-obsolete-function-alias 'tex-string-prefix-p 'string-prefix-p "24.2") |
| 2055 | (defsubst* tex-string-prefix-p (str1 str2) | ||
| 2056 | "Return non-nil if STR1 is a prefix of STR2" | ||
| 2057 | (eq t (compare-strings str2 nil (length str1) str1 nil nil))) | ||
| 2058 | 2055 | ||
| 2059 | (defun tex-guess-main-file (&optional all) | 2056 | (defun tex-guess-main-file (&optional all) |
| 2060 | "Find a likely `tex-main-file'. | 2057 | "Find a likely `tex-main-file'. |
| @@ -2069,7 +2066,7 @@ of the current buffer." | |||
| 2069 | (with-current-buffer buf | 2066 | (with-current-buffer buf |
| 2070 | (when (and (cond | 2067 | (when (and (cond |
| 2071 | ((null all) (equal dir default-directory)) | 2068 | ((null all) (equal dir default-directory)) |
| 2072 | ((eq all 'sub) (tex-string-prefix-p default-directory dir)) | 2069 | ((eq all 'sub) (string-prefix-p default-directory dir)) |
| 2073 | (t)) | 2070 | (t)) |
| 2074 | (stringp tex-main-file)) | 2071 | (stringp tex-main-file)) |
| 2075 | (throw 'found (expand-file-name tex-main-file))))) | 2072 | (throw 'found (expand-file-name tex-main-file))))) |
| @@ -2078,7 +2075,7 @@ of the current buffer." | |||
| 2078 | (with-current-buffer buf | 2075 | (with-current-buffer buf |
| 2079 | (when (and (cond | 2076 | (when (and (cond |
| 2080 | ((null all) (equal dir default-directory)) | 2077 | ((null all) (equal dir default-directory)) |
| 2081 | ((eq all 'sub) (tex-string-prefix-p default-directory dir)) | 2078 | ((eq all 'sub) (string-prefix-p default-directory dir)) |
| 2082 | (t)) | 2079 | (t)) |
| 2083 | buffer-file-name | 2080 | buffer-file-name |
| 2084 | ;; (or (easy-mmode-derived-mode-p 'latex-mode) | 2081 | ;; (or (easy-mmode-derived-mode-p 'latex-mode) |
diff --git a/lisp/textmodes/two-column.el b/lisp/textmodes/two-column.el index 40cbbc59292..8a4fe4f87fd 100644 --- a/lisp/textmodes/two-column.el +++ b/lisp/textmodes/two-column.el | |||
| @@ -124,15 +124,51 @@ | |||
| 124 | 124 | ||
| 125 | 125 | ||
| 126 | ;;; Code: | 126 | ;;; Code: |
| 127 | 127 | (defgroup two-column nil | |
| 128 | "Minor mode for editing of two-column text." | ||
| 129 | :prefix "2C-" | ||
| 130 | :group 'frames) | ||
| 131 | |||
| 132 | (defcustom 2C-mode-line-format | ||
| 133 | '("-%*- %15b --" (-3 . "%p") "--%[(" mode-name | ||
| 134 | minor-mode-alist "%n" mode-line-process ")%]%-") | ||
| 135 | "Value of `mode-line-format' for a buffer in two-column minor mode." | ||
| 136 | :type 'sexp | ||
| 137 | :group 'two-column) | ||
| 138 | |||
| 139 | (defcustom 2C-other-buffer-hook 'text-mode | ||
| 140 | "Hook run in new buffer when it is associated with current one." | ||
| 141 | :type 'function | ||
| 142 | :group 'two-column) | ||
| 128 | 143 | ||
| 129 | ;; Lucid patch | 144 | (defcustom 2C-separator "" |
| 130 | (or (fboundp 'frame-width) | 145 | "A string inserted between the two columns when merging. |
| 131 | (fset 'frame-width 'screen-width)) | 146 | This gets set locally by \\[2C-split]." |
| 147 | :type 'string | ||
| 148 | :group 'two-column) | ||
| 149 | (put '2C-separator 'permanent-local t) | ||
| 150 | |||
| 151 | (defcustom 2C-window-width 40 | ||
| 152 | "The width of the first column. (Must be at least `window-min-width'.) | ||
| 153 | This value is local for every buffer that sets it." | ||
| 154 | :type 'integer | ||
| 155 | :group 'two-column) | ||
| 156 | (make-variable-buffer-local '2C-window-width) | ||
| 157 | (put '2C-window-width 'permanent-local t) | ||
| 132 | 158 | ||
| 159 | (defcustom 2C-beyond-fill-column 4 | ||
| 160 | "Base for calculating `fill-column' for a buffer in two-column minor mode. | ||
| 161 | The value of `fill-column' becomes `2C-window-width' for this buffer | ||
| 162 | minus this value." | ||
| 163 | :type 'integer | ||
| 164 | :group 'two-column) | ||
| 133 | 165 | ||
| 134 | ;;;;; Set up keymap ;;;;; | 166 | (defcustom 2C-autoscroll t |
| 167 | "If non-nil, Emacs attempts to keep the two column's buffers aligned." | ||
| 168 | :type 'boolean | ||
| 169 | :group 'two-column) | ||
| 135 | 170 | ||
| 171 | |||
| 136 | (defvar 2C-mode-map | 172 | (defvar 2C-mode-map |
| 137 | (let ((map (make-sparse-keymap))) | 173 | (let ((map (make-sparse-keymap))) |
| 138 | (define-key map "2" '2C-two-columns) | 174 | (define-key map "2" '2C-two-columns) |
| @@ -142,8 +178,6 @@ | |||
| 142 | map) | 178 | map) |
| 143 | "Keymap for commands for setting up two-column mode.") | 179 | "Keymap for commands for setting up two-column mode.") |
| 144 | 180 | ||
| 145 | |||
| 146 | |||
| 147 | ;;;###autoload (autoload '2C-command "two-column" () t 'keymap) | 181 | ;;;###autoload (autoload '2C-command "two-column" () t 'keymap) |
| 148 | (fset '2C-command 2C-mode-map) | 182 | (fset '2C-command 2C-mode-map) |
| 149 | 183 | ||
| @@ -154,7 +188,6 @@ | |||
| 154 | 188 | ||
| 155 | ;;;###autoload (global-set-key [f2] '2C-command) | 189 | ;;;###autoload (global-set-key [f2] '2C-command) |
| 156 | 190 | ||
| 157 | |||
| 158 | (defvar 2C-minor-mode-map | 191 | (defvar 2C-minor-mode-map |
| 159 | (let ((map (make-sparse-keymap))) | 192 | (let ((map (make-sparse-keymap))) |
| 160 | (define-key map "1" '2C-merge) | 193 | (define-key map "1" '2C-merge) |
| @@ -167,7 +200,6 @@ | |||
| 167 | map) | 200 | map) |
| 168 | "Keymap for commands for use in two-column mode.") | 201 | "Keymap for commands for use in two-column mode.") |
| 169 | 202 | ||
| 170 | |||
| 171 | (setq minor-mode-map-alist | 203 | (setq minor-mode-map-alist |
| 172 | (cons (cons '2C-mode | 204 | (cons (cons '2C-mode |
| 173 | (let ((map (make-sparse-keymap))) | 205 | (let ((map (make-sparse-keymap))) |
| @@ -181,15 +213,8 @@ | |||
| 181 | map (current-global-map)) | 213 | map (current-global-map)) |
| 182 | map)) | 214 | map)) |
| 183 | minor-mode-map-alist)) | 215 | minor-mode-map-alist)) |
| 184 | |||
| 185 | ;;;;; variable declarations ;;;;; | ||
| 186 | |||
| 187 | (defgroup two-column nil | ||
| 188 | "Minor mode for editing of two-column text." | ||
| 189 | :prefix "2C-" | ||
| 190 | :group 'frames) | ||
| 191 | |||
| 192 | 216 | ||
| 217 | |||
| 193 | ;; Markers seem to be the only buffer-id not affected by renaming a buffer. | 218 | ;; Markers seem to be the only buffer-id not affected by renaming a buffer. |
| 194 | ;; This nevertheless loses when a buffer is killed. The variable-name is | 219 | ;; This nevertheless loses when a buffer is killed. The variable-name is |
| 195 | ;; required by `describe-mode'. | 220 | ;; required by `describe-mode'. |
| @@ -198,62 +223,8 @@ | |||
| 198 | (make-variable-buffer-local '2C-mode) | 223 | (make-variable-buffer-local '2C-mode) |
| 199 | (put '2C-mode 'permanent-local t) | 224 | (put '2C-mode 'permanent-local t) |
| 200 | 225 | ||
| 201 | |||
| 202 | |||
| 203 | (setq minor-mode-alist (cons '(2C-mode " 2C") minor-mode-alist)) | 226 | (setq minor-mode-alist (cons '(2C-mode " 2C") minor-mode-alist)) |
| 204 | 227 | ||
| 205 | |||
| 206 | |||
| 207 | ;; rearranged, so that the pertinent info will show in 40 columns | ||
| 208 | (defcustom 2C-mode-line-format | ||
| 209 | '("-%*- %15b --" (-3 . "%p") "--%[(" mode-name | ||
| 210 | minor-mode-alist "%n" mode-line-process ")%]%-") | ||
| 211 | "Value of `mode-line-format' for a buffer in two-column minor mode." | ||
| 212 | :type 'sexp | ||
| 213 | :group 'two-column) | ||
| 214 | |||
| 215 | |||
| 216 | (defcustom 2C-other-buffer-hook 'text-mode | ||
| 217 | "Hook run in new buffer when it is associated with current one." | ||
| 218 | :type 'function | ||
| 219 | :group 'two-column) | ||
| 220 | |||
| 221 | |||
| 222 | (defcustom 2C-separator "" | ||
| 223 | "A string inserted between the two columns when merging. | ||
| 224 | This gets set locally by \\[2C-split]." | ||
| 225 | :type 'string | ||
| 226 | :group 'two-column) | ||
| 227 | (put '2C-separator 'permanent-local t) | ||
| 228 | |||
| 229 | |||
| 230 | |||
| 231 | (defcustom 2C-window-width 40 | ||
| 232 | "The width of the first column. (Must be at least `window-min-width') | ||
| 233 | This value is local for every buffer that sets it." | ||
| 234 | :type 'integer | ||
| 235 | :group 'two-column) | ||
| 236 | (make-variable-buffer-local '2C-window-width) | ||
| 237 | (put '2C-window-width 'permanent-local t) | ||
| 238 | |||
| 239 | |||
| 240 | |||
| 241 | (defcustom 2C-beyond-fill-column 4 | ||
| 242 | "Base for calculating `fill-column' for a buffer in two-column minor mode. | ||
| 243 | The value of `fill-column' becomes `2C-window-width' for this buffer | ||
| 244 | minus this value." | ||
| 245 | :type 'integer | ||
| 246 | :group 'two-column) | ||
| 247 | |||
| 248 | |||
| 249 | |||
| 250 | (defcustom 2C-autoscroll t | ||
| 251 | "If non-nil, Emacs attempts to keep the two column's buffers aligned." | ||
| 252 | :type 'boolean | ||
| 253 | :group 'two-column) | ||
| 254 | |||
| 255 | |||
| 256 | |||
| 257 | (defvar 2C-autoscroll-start nil) | 228 | (defvar 2C-autoscroll-start nil) |
| 258 | (make-variable-buffer-local '2C-autoscroll-start) | 229 | (make-variable-buffer-local '2C-autoscroll-start) |
| 259 | 230 | ||
| @@ -276,7 +247,6 @@ minus this value." | |||
| 276 | (if req (error "You must first set two-column minor mode")))) | 247 | (if req (error "You must first set two-column minor mode")))) |
| 277 | 248 | ||
| 278 | 249 | ||
| 279 | |||
| 280 | ;; function for setting up two-column minor mode in a buffer associated | 250 | ;; function for setting up two-column minor mode in a buffer associated |
| 281 | ;; with the buffer pointed to by the marker other. | 251 | ;; with the buffer pointed to by the marker other. |
| 282 | (defun 2C-mode (other) | 252 | (defun 2C-mode (other) |
| @@ -320,7 +290,6 @@ The appearance of the screen can be customized by the variables | |||
| 320 | (run-hooks '2C-mode-hook)) | 290 | (run-hooks '2C-mode-hook)) |
| 321 | 291 | ||
| 322 | 292 | ||
| 323 | |||
| 324 | ;;;###autoload | 293 | ;;;###autoload |
| 325 | (defun 2C-two-columns (&optional buffer) | 294 | (defun 2C-two-columns (&optional buffer) |
| 326 | "Split current window vertically for two-column editing. | 295 | "Split current window vertically for two-column editing. |
| @@ -356,7 +325,6 @@ first and the associated buffer to its right." | |||
| 356 | (other-window -1))))) | 325 | (other-window -1))))) |
| 357 | 326 | ||
| 358 | 327 | ||
| 359 | |||
| 360 | ;;;###autoload | 328 | ;;;###autoload |
| 361 | (defun 2C-associate-buffer () | 329 | (defun 2C-associate-buffer () |
| 362 | "Associate another buffer with this one in two-column minor mode. | 330 | "Associate another buffer with this one in two-column minor mode. |
| @@ -368,9 +336,8 @@ accepting the proposed default buffer. | |||
| 368 | (let ((b1 (current-buffer)) | 336 | (let ((b1 (current-buffer)) |
| 369 | (b2 (or (2C-other) | 337 | (b2 (or (2C-other) |
| 370 | (read-buffer "Associate buffer: " (other-buffer))))) | 338 | (read-buffer "Associate buffer: " (other-buffer))))) |
| 371 | (save-excursion | 339 | (setq 2C-mode nil) |
| 372 | (setq 2C-mode nil) | 340 | (with-current-buffer b2 |
| 373 | (set-buffer b2) | ||
| 374 | (and (2C-other) | 341 | (and (2C-other) |
| 375 | (not (eq b1 (2C-other))) | 342 | (not (eq b1 (2C-other))) |
| 376 | (error "Buffer already associated with buffer `%s'" | 343 | (error "Buffer already associated with buffer `%s'" |
| @@ -382,7 +349,6 @@ accepting the proposed default buffer. | |||
| 382 | (2C-two-columns b2))) | 349 | (2C-two-columns b2))) |
| 383 | 350 | ||
| 384 | 351 | ||
| 385 | |||
| 386 | ;;;###autoload | 352 | ;;;###autoload |
| 387 | (defun 2C-split (arg) | 353 | (defun 2C-split (arg) |
| 388 | "Split a two-column text at point, into two buffers in two-column minor mode. | 354 | "Split a two-column text at point, into two buffers in two-column minor mode. |
| @@ -454,32 +420,28 @@ First column's text sSs Second column's text | |||
| 454 | (move-to-column column))))) | 420 | (move-to-column column))))) |
| 455 | 421 | ||
| 456 | 422 | ||
| 457 | |||
| 458 | |||
| 459 | (defun 2C-dissociate () | 423 | (defun 2C-dissociate () |
| 460 | "Turn off two-column minor mode in current and associated buffer. | 424 | "Turn off two-column minor mode in current and associated buffer. |
| 461 | If the associated buffer is unmodified and empty, it is killed." | 425 | If the associated buffer is unmodified and empty, it is killed." |
| 462 | (interactive) | 426 | (interactive) |
| 463 | (let ((buffer (current-buffer))) | 427 | (let ((buffer (current-buffer)) |
| 464 | (save-excursion | 428 | (other (2C-other))) |
| 465 | (and (2C-other) | 429 | (if other |
| 466 | (set-buffer (2C-other)) | 430 | (with-current-buffer other |
| 467 | (or (not (2C-other)) | 431 | (when (or (not (2C-other)) (eq buffer (2C-other))) |
| 468 | (eq buffer (2C-other))) | 432 | (if (and (not (buffer-modified-p)) (zerop (buffer-size))) |
| 469 | (if (and (not (buffer-modified-p)) | 433 | (kill-buffer) |
| 470 | (eobp) (bobp)) | 434 | (kill-local-variable '2C-mode) |
| 471 | (kill-buffer nil) | 435 | (kill-local-variable '2C-window-width) |
| 472 | (kill-local-variable '2C-mode) | 436 | (kill-local-variable '2C-separator) |
| 473 | (kill-local-variable '2C-window-width) | 437 | (kill-local-variable 'mode-line-format) |
| 474 | (kill-local-variable '2C-separator) | 438 | (kill-local-variable 'fill-column)))))) |
| 475 | (kill-local-variable 'mode-line-format) | 439 | (kill-local-variable '2C-mode) |
| 476 | (kill-local-variable 'fill-column)))) | 440 | (kill-local-variable '2C-window-width) |
| 477 | (kill-local-variable '2C-mode) | 441 | (kill-local-variable '2C-separator) |
| 478 | (kill-local-variable '2C-window-width) | 442 | (kill-local-variable 'mode-line-format) |
| 479 | (kill-local-variable '2C-separator) | 443 | (kill-local-variable 'fill-column) |
| 480 | (kill-local-variable 'mode-line-format) | 444 | (force-mode-line-update)) |
| 481 | (kill-local-variable 'fill-column))) | ||
| 482 | |||
| 483 | 445 | ||
| 484 | 446 | ||
| 485 | ;; this doesn't use yank-rectangle, so that the first column can | 447 | ;; this doesn't use yank-rectangle, so that the first column can |
| @@ -578,7 +540,6 @@ on, this also realigns the two buffers." | |||
| 578 | (message "Autoscrolling is off."))) | 540 | (message "Autoscrolling is off."))) |
| 579 | 541 | ||
| 580 | 542 | ||
| 581 | |||
| 582 | (defun 2C-autoscroll () | 543 | (defun 2C-autoscroll () |
| 583 | (if 2C-autoscroll | 544 | (if 2C-autoscroll |
| 584 | ;; catch a mouse scroll on non-selected scrollbar | 545 | ;; catch a mouse scroll on non-selected scrollbar |
| @@ -590,27 +551,25 @@ on, this also realigns the two buffers." | |||
| 590 | (select-window (car (car (cdr last-command-event))))) | 551 | (select-window (car (car (cdr last-command-event))))) |
| 591 | ;; In some cases scrolling causes an error, but post-command-hook | 552 | ;; In some cases scrolling causes an error, but post-command-hook |
| 592 | ;; shouldn't, and should always stay in the original window | 553 | ;; shouldn't, and should always stay in the original window |
| 593 | (condition-case () | 554 | (ignore-errors |
| 594 | (and (or 2C-autoscroll-start (2C-toggle-autoscroll t) nil) | 555 | (and (or 2C-autoscroll-start (2C-toggle-autoscroll t) nil) |
| 595 | (/= (window-start) 2C-autoscroll-start) | 556 | (/= (window-start) 2C-autoscroll-start) |
| 596 | (2C-other) | 557 | (2C-other) |
| 597 | (get-buffer-window (2C-other)) | 558 | (get-buffer-window (2C-other)) |
| 598 | (let ((lines (count-lines (window-start) | 559 | (let ((lines (count-lines (window-start) |
| 599 | 2C-autoscroll-start))) | 560 | 2C-autoscroll-start))) |
| 600 | (if (< (window-start) 2C-autoscroll-start) | 561 | (if (< (window-start) 2C-autoscroll-start) |
| 601 | (setq lines (- lines))) | 562 | (setq lines (- lines))) |
| 602 | (setq 2C-autoscroll-start (window-start)) | 563 | (setq 2C-autoscroll-start (window-start)) |
| 603 | (select-window (get-buffer-window (2C-other))) | 564 | (select-window (get-buffer-window (2C-other))) |
| 604 | ;; make sure that other buffer has enough lines | 565 | ;; make sure that other buffer has enough lines |
| 605 | (save-excursion | 566 | (save-excursion |
| 606 | (insert-char | 567 | (insert-char |
| 607 | ?\n (- lines (count-lines (window-start) | 568 | ?\n (- lines (count-lines (window-start) |
| 608 | (goto-char (point-max))) | 569 | (goto-char (point-max))) |
| 609 | -1))) | 570 | -1))) |
| 610 | (scroll-up lines) | 571 | (scroll-up lines) |
| 611 | (setq 2C-autoscroll-start (window-start)))) | 572 | (setq 2C-autoscroll-start (window-start))))))))) |
| 612 | (error)))))) | ||
| 613 | |||
| 614 | 573 | ||
| 615 | 574 | ||
| 616 | (defun 2C-enlarge-window-horizontally (arg) | 575 | (defun 2C-enlarge-window-horizontally (arg) |
| @@ -628,7 +587,6 @@ on, this also realigns the two buffers." | |||
| 628 | (2C-enlarge-window-horizontally (- arg))) | 587 | (2C-enlarge-window-horizontally (- arg))) |
| 629 | 588 | ||
| 630 | 589 | ||
| 631 | |||
| 632 | (provide 'two-column) | 590 | (provide 'two-column) |
| 633 | 591 | ||
| 634 | ;;; two-column.el ends here | 592 | ;;; two-column.el ends here |
diff --git a/lisp/tmm.el b/lisp/tmm.el index 2a0d1d3d7de..776e4335376 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el | |||
| @@ -165,14 +165,13 @@ Its value should be an event that has a binding in MENU." | |||
| 165 | ;; tmm-km-list is an alist of (STRING . MEANING). | 165 | ;; tmm-km-list is an alist of (STRING . MEANING). |
| 166 | ;; It has no other elements. | 166 | ;; It has no other elements. |
| 167 | ;; The order of elements in tmm-km-list is the order of the menu bar. | 167 | ;; The order of elements in tmm-km-list is the order of the menu bar. |
| 168 | (mapc (lambda (elt) | 168 | (dolist (elt menu) |
| 169 | (cond | 169 | (cond |
| 170 | ((stringp elt) (setq gl-str elt)) | 170 | ((stringp elt) (setq gl-str elt)) |
| 171 | ((listp elt) (tmm-get-keymap elt not-menu)) | 171 | ((listp elt) (tmm-get-keymap elt not-menu)) |
| 172 | ((vectorp elt) | 172 | ((vectorp elt) |
| 173 | (dotimes (i (length elt)) | 173 | (dotimes (i (length elt)) |
| 174 | (tmm-get-keymap (cons i (aref elt i)) not-menu))))) | 174 | (tmm-get-keymap (cons i (aref elt i)) not-menu))))) |
| 175 | menu) | ||
| 176 | ;; Choose an element of tmm-km-list; put it in choice. | 175 | ;; Choose an element of tmm-km-list; put it in choice. |
| 177 | (if (and not-menu (= 1 (length tmm-km-list))) | 176 | (if (and not-menu (= 1 (length tmm-km-list))) |
| 178 | ;; If this is the top-level of an x-popup-menu menu, | 177 | ;; If this is the top-level of an x-popup-menu menu, |
| @@ -313,15 +312,13 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'." | |||
| 313 | (defun tmm-define-keys (minibuffer) | 312 | (defun tmm-define-keys (minibuffer) |
| 314 | (let ((map (make-sparse-keymap))) | 313 | (let ((map (make-sparse-keymap))) |
| 315 | (suppress-keymap map t) | 314 | (suppress-keymap map t) |
| 316 | (mapc | 315 | (dolist (c tmm-short-cuts) |
| 317 | (lambda (c) | 316 | (if (listp tmm-shortcut-style) |
| 318 | (if (listp tmm-shortcut-style) | 317 | (define-key map (char-to-string c) 'tmm-shortcut) |
| 319 | (define-key map (char-to-string c) 'tmm-shortcut) | 318 | ;; only one kind of letters are shortcuts, so map both upcase and |
| 320 | ;; only one kind of letters are shortcuts, so map both upcase and | 319 | ;; downcase input to the same |
| 321 | ;; downcase input to the same | 320 | (define-key map (char-to-string (downcase c)) 'tmm-shortcut) |
| 322 | (define-key map (char-to-string (downcase c)) 'tmm-shortcut) | 321 | (define-key map (char-to-string (upcase c)) 'tmm-shortcut))) |
| 323 | (define-key map (char-to-string (upcase c)) 'tmm-shortcut))) | ||
| 324 | tmm-short-cuts) | ||
| 325 | (if minibuffer | 322 | (if minibuffer |
| 326 | (progn | 323 | (progn |
| 327 | (define-key map [pageup] 'tmm-goto-completions) | 324 | (define-key map [pageup] 'tmm-goto-completions) |
| @@ -401,14 +398,13 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'." | |||
| 401 | (choose-completion)) | 398 | (choose-completion)) |
| 402 | ;; In minibuffer | 399 | ;; In minibuffer |
| 403 | (delete-region (minibuffer-prompt-end) (point-max)) | 400 | (delete-region (minibuffer-prompt-end) (point-max)) |
| 404 | (mapc (lambda (elt) | 401 | (dolist (elt tmm-km-list) |
| 405 | (if (string= | 402 | (if (string= |
| 406 | (substring (car elt) 0 | 403 | (substring (car elt) 0 |
| 407 | (min (1+ (length tmm-mid-prompt)) | 404 | (min (1+ (length tmm-mid-prompt)) |
| 408 | (length (car elt)))) | 405 | (length (car elt)))) |
| 409 | (concat (char-to-string c) tmm-mid-prompt)) | 406 | (concat (char-to-string c) tmm-mid-prompt)) |
| 410 | (setq s (car elt)))) | 407 | (setq s (car elt)))) |
| 411 | tmm-km-list) | ||
| 412 | (insert s) | 408 | (insert s) |
| 413 | (exit-minibuffer))))) | 409 | (exit-minibuffer))))) |
| 414 | 410 | ||
| @@ -540,20 +536,16 @@ of `menu-bar-final-items'." | |||
| 540 | (setq allbind (cons globalbind (cons localbind minorbind))) | 536 | (setq allbind (cons globalbind (cons localbind minorbind))) |
| 541 | 537 | ||
| 542 | ;; Merge all the elements of ALLBIND into one keymap. | 538 | ;; Merge all the elements of ALLBIND into one keymap. |
| 543 | (mapc (lambda (in) | 539 | (dolist (in allbind) |
| 544 | (if (and (symbolp in) (keymapp in)) | 540 | (if (and (symbolp in) (keymapp in)) |
| 545 | (setq in (symbol-function in))) | 541 | (setq in (symbol-function in))) |
| 546 | (and in (keymapp in) | 542 | (and in (keymapp in) |
| 547 | (if (keymapp bind) | 543 | (setq bind (if (keymapp bind) |
| 548 | (setq bind (nconc bind (copy-sequence (cdr in)))) | 544 | (nconc bind (copy-sequence (cdr in))) |
| 549 | (setq bind (copy-sequence in))))) | 545 | (copy-sequence in))))) |
| 550 | allbind) | ||
| 551 | ;; Return that keymap. | 546 | ;; Return that keymap. |
| 552 | bind)))) | 547 | bind)))) |
| 553 | 548 | ||
| 554 | ;; Huh? What's that about? --Stef | ||
| 555 | (add-hook 'calendar-load-hook (lambda () (require 'cal-menu))) | ||
| 556 | |||
| 557 | (provide 'tmm) | 549 | (provide 'tmm) |
| 558 | 550 | ||
| 559 | ;;; tmm.el ends here | 551 | ;;; tmm.el ends here |
diff --git a/lisp/tutorial.el b/lisp/tutorial.el index b512700f5b9..e0e2a82fab9 100644 --- a/lisp/tutorial.el +++ b/lisp/tutorial.el | |||
| @@ -585,7 +585,6 @@ with some explanatory links." | |||
| 585 | (not (get-text-property (match-beginning 1) 'tutorial-remark)) | 585 | (not (get-text-property (match-beginning 1) 'tutorial-remark)) |
| 586 | (let* ((desc (car changed-key)) | 586 | (let* ((desc (car changed-key)) |
| 587 | (ck (cdr changed-key)) | 587 | (ck (cdr changed-key)) |
| 588 | (key (nth 0 ck)) | ||
| 589 | (def-fun (nth 1 ck)) | 588 | (def-fun (nth 1 ck)) |
| 590 | (where (nth 3 ck)) | 589 | (where (nth 3 ck)) |
| 591 | s1 s2 help-string) | 590 | s1 s2 help-string) |
| @@ -724,7 +723,7 @@ See `tutorial--save-tutorial' for more information." | |||
| 724 | saved-file | 723 | saved-file |
| 725 | (error-message-string err)))) | 724 | (error-message-string err)))) |
| 726 | ;; An error is raised here?? Is this a bug? | 725 | ;; An error is raised here?? Is this a bug? |
| 727 | (condition-case err | 726 | (condition-case nil |
| 728 | (undo-only) | 727 | (undo-only) |
| 729 | (error nil)) | 728 | (error nil)) |
| 730 | ;; Restore point | 729 | ;; Restore point |
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index d6e25188c69..3c9313e3e7d 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog | |||
| @@ -1,3 +1,21 @@ | |||
| 1 | 2012-04-10 William Xu <william.xwl@gmail.com> (tiny change) | ||
| 2 | |||
| 3 | * url.el (url-retrieve-internal): Hexify multibye URL string first | ||
| 4 | when necessary (bug#7017). | ||
| 5 | |||
| 6 | 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 7 | |||
| 8 | * url.el (url-retrieve-internal): Mention utf-8 encoding. | ||
| 9 | (url-retrieve): Ditto. | ||
| 10 | |||
| 11 | 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 12 | |||
| 13 | * url-domsurf.el: New file (bug#1401). | ||
| 14 | |||
| 15 | * url-cookie.el (url-cookie-two-dot-domains): Remove. | ||
| 16 | (url-cookie-host-can-set-p): Use `url-domsuf-cookie-allowed-p' | ||
| 17 | instead of the variable above. | ||
| 18 | |||
| 1 | 2012-03-25 Lars Magne Ingebrigtsen <larsi@gnus.org> | 19 | 2012-03-25 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 20 | ||
| 3 | * url-queue.el (url-queue-kill-job): Check whether the buffer has | 21 | * url-queue.el (url-queue-kill-job): Check whether the buffer has |
diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el index e6ff9bf7dea..aefe8fffd0a 100644 --- a/lisp/url/url-cookie.el +++ b/lisp/url/url-cookie.el | |||
| @@ -25,6 +25,7 @@ | |||
| 25 | 25 | ||
| 26 | (require 'url-util) | 26 | (require 'url-util) |
| 27 | (require 'url-parse) | 27 | (require 'url-parse) |
| 28 | (require 'url-domsuf) | ||
| 28 | 29 | ||
| 29 | (eval-when-compile (require 'cl)) ; defstruct | 30 | (eval-when-compile (require 'cl)) ; defstruct |
| 30 | 31 | ||
| @@ -211,14 +212,6 @@ telling Microsoft that." | |||
| 211 | (concat retval "\r\n") | 212 | (concat retval "\r\n") |
| 212 | ""))) | 213 | ""))) |
| 213 | 214 | ||
| 214 | (defvar url-cookie-two-dot-domains | ||
| 215 | (concat "\\.\\(" | ||
| 216 | (mapconcat 'identity (list "com" "edu" "net" "org" "gov" "mil" "int") | ||
| 217 | "\\|") | ||
| 218 | "\\)$") | ||
| 219 | "A regexp of top level domains that only require two matching | ||
| 220 | '.'s in the domain name in order to set a cookie.") | ||
| 221 | |||
| 222 | (defcustom url-cookie-trusted-urls nil | 215 | (defcustom url-cookie-trusted-urls nil |
| 223 | "A list of regular expressions matching URLs to always accept cookies from." | 216 | "A list of regular expressions matching URLs to always accept cookies from." |
| 224 | :type '(repeat regexp) | 217 | :type '(repeat regexp) |
| @@ -230,30 +223,18 @@ telling Microsoft that." | |||
| 230 | :group 'url-cookie) | 223 | :group 'url-cookie) |
| 231 | 224 | ||
| 232 | (defun url-cookie-host-can-set-p (host domain) | 225 | (defun url-cookie-host-can-set-p (host domain) |
| 233 | (let ((numdots 0) | 226 | (let ((last nil) |
| 234 | (last nil) | 227 | (case-fold-search t)) |
| 235 | (case-fold-search t) | 228 | (if (string= host domain) ; Apparently netscape lets you do this |
| 236 | (mindots 3)) | 229 | t |
| 237 | (while (setq last (string-match "\\." domain last)) | 230 | ;; Remove the dot from wildcard domains before matching. |
| 238 | (setq numdots (1+ numdots) | 231 | (when (eq ?. (aref domain 0)) |
| 239 | last (1+ last))) | 232 | (setq domain (substring domain 1))) |
| 240 | (if (string-match url-cookie-two-dot-domains domain) | 233 | (and (url-domsuf-cookie-allowed-p domain) |
| 241 | (setq mindots 2)) | 234 | ;; Need to check and make sure the host is actually _in_ the |
| 242 | (cond | 235 | ;; domain it wants to set a cookie for though. |
| 243 | ((string= host domain) ; Apparently netscape lets you do this | 236 | (string-match (concat (regexp-quote domain) |
| 244 | t) | 237 | "$") host))))) |
| 245 | ((>= numdots mindots) ; We have enough dots in domain name | ||
| 246 | ;; Need to check and make sure the host is actually _in_ the | ||
| 247 | ;; domain it wants to set a cookie for though. | ||
| 248 | (string-match (concat (regexp-quote | ||
| 249 | ;; Remove the dot from wildcard domains | ||
| 250 | ;; before matching. | ||
| 251 | (if (eq ?. (aref domain 0)) | ||
| 252 | (substring domain 1) | ||
| 253 | domain)) | ||
| 254 | "$") host)) | ||
| 255 | (t | ||
| 256 | nil)))) | ||
| 257 | 238 | ||
| 258 | (defun url-cookie-handle-set-cookie (str) | 239 | (defun url-cookie-handle-set-cookie (str) |
| 259 | (setq url-cookies-changed-since-last-save t) | 240 | (setq url-cookies-changed-since-last-save t) |
diff --git a/lisp/url/url-domsuf.el b/lisp/url/url-domsuf.el new file mode 100644 index 00000000000..29fc166e30b --- /dev/null +++ b/lisp/url/url-domsuf.el | |||
| @@ -0,0 +1,98 @@ | |||
| 1 | ;;; url-domsuf.el --- Say what domain names can have cookies set. | ||
| 2 | |||
| 3 | ;; Copyright (C) 2012 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 6 | |||
| 7 | ;; Keywords: comm, data, processes, hypermedia | ||
| 8 | |||
| 9 | ;; This file is part of GNU Emacs. | ||
| 10 | ;; | ||
| 11 | ;; GNU Emacs is free software: you can redistribute it and/or modify | ||
| 12 | ;; it under the terms of the GNU General Public License as published by | ||
| 13 | ;; the Free Software Foundation, either version 3 of the License, or | ||
| 14 | ;; (at your option) any later version. | ||
| 15 | |||
| 16 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 17 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 18 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 19 | ;; GNU General Public License for more details. | ||
| 20 | |||
| 21 | ;; You should have received a copy of the GNU General Public License | ||
| 22 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 23 | |||
| 24 | ;;; Commentary: | ||
| 25 | |||
| 26 | ;; The rules for what domains can have cookies set is defined here: | ||
| 27 | ;; http://publicsuffix.org/list/ | ||
| 28 | |||
| 29 | ;;; Code: | ||
| 30 | |||
| 31 | (defvar url-domsuf-domains nil) | ||
| 32 | |||
| 33 | (defun url-domsuf-parse-file () | ||
| 34 | (with-temp-buffer | ||
| 35 | (insert-file-contents | ||
| 36 | (expand-file-name "publicsuffix.txt" data-directory)) | ||
| 37 | (let ((domains nil) | ||
| 38 | domain exception) | ||
| 39 | (while (not (eobp)) | ||
| 40 | (when (not (looking-at "[/\n\t ]")) | ||
| 41 | ;; !pref.aichi.jp means that it's allowed. | ||
| 42 | (if (not (eq (following-char) ?!)) | ||
| 43 | (setq exception nil) | ||
| 44 | (setq exception t) | ||
| 45 | (forward-char 1)) | ||
| 46 | (setq domain (buffer-substring (point) (line-end-position))) | ||
| 47 | (cond | ||
| 48 | ((string-match "\\`\\*\\." domain) | ||
| 49 | (setq domain (substring domain 2)) | ||
| 50 | (push (cons domain (1+ (length (split-string domain "[.]")))) | ||
| 51 | domains)) | ||
| 52 | (exception | ||
| 53 | (push (cons domain t) domains)) | ||
| 54 | (t | ||
| 55 | (push (cons domain nil) domains)))) | ||
| 56 | (forward-line 1)) | ||
| 57 | (setq url-domsuf-domains (nreverse domains))))) | ||
| 58 | |||
| 59 | (defun url-domsuf-cookie-allowed-p (domain) | ||
| 60 | (unless url-domsuf-domains | ||
| 61 | (url-domsuf-parse-file)) | ||
| 62 | (let* ((allowedp t) | ||
| 63 | (domain-bits (split-string domain "[.]")) | ||
| 64 | (length (length domain-bits)) | ||
| 65 | (upper-domain (mapconcat 'identity (cdr domain-bits) ".")) | ||
| 66 | entry modifier) | ||
| 67 | (dolist (elem url-domsuf-domains) | ||
| 68 | (setq entry (car elem) | ||
| 69 | modifier (cdr elem)) | ||
| 70 | (cond | ||
| 71 | ;; "com" | ||
| 72 | ((and (null modifier) | ||
| 73 | (string= domain entry)) | ||
| 74 | (setq allowedp nil)) | ||
| 75 | ;; "!pref.hokkaido.jp" | ||
| 76 | ((and (eq modifier t) | ||
| 77 | (string= domain entry)) | ||
| 78 | (setq allowedp t)) | ||
| 79 | ;; "*.ar" | ||
| 80 | ((and (numberp modifier) | ||
| 81 | (= length modifier) | ||
| 82 | (string= entry upper-domain)) | ||
| 83 | (setq allowedp nil)))) | ||
| 84 | allowedp)) | ||
| 85 | |||
| 86 | ;; Tests: | ||
| 87 | |||
| 88 | ;; (url-domsuf-cookie-allowed-p "com") => nil | ||
| 89 | ;; (url-domsuf-cookie-allowed-p "foo.bar.ar") => t | ||
| 90 | ;; (url-domsuf-cookie-allowed-p "bar.ar") => nil | ||
| 91 | ;; (url-domsuf-cookie-allowed-p "co.uk") => nil | ||
| 92 | ;; (url-domsuf-cookie-allowed-p "foo.bar.hokkaido.jo") => t | ||
| 93 | ;; (url-domsuf-cookie-allowed-p "bar.hokkaido.jp") => nil | ||
| 94 | ;; (url-domsuf-cookie-allowed-p "pref.hokkaido.jp") => t | ||
| 95 | |||
| 96 | (provide 'url-domsuf) | ||
| 97 | |||
| 98 | ;;; url-domsuf.el ends here | ||
diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el index 848eb66e54b..d12bd5447fa 100644 --- a/lisp/url/url-util.el +++ b/lisp/url/url-util.el | |||
| @@ -330,8 +330,7 @@ forbidden in URL encoding." | |||
| 330 | " ") | 330 | " ") |
| 331 | (t (byte-to-string code)))) | 331 | (t (byte-to-string code)))) |
| 332 | str (substring str (match-end 0))))) | 332 | str (substring str (match-end 0))))) |
| 333 | (setq tmp (concat tmp str)) | 333 | (concat tmp str))) |
| 334 | tmp)) | ||
| 335 | 334 | ||
| 336 | (defconst url-unreserved-chars | 335 | (defconst url-unreserved-chars |
| 337 | '( | 336 | '( |
diff --git a/lisp/url/url.el b/lisp/url/url.el index 5ced789e4e4..f3ef553bbce 100644 --- a/lisp/url/url.el +++ b/lisp/url/url.el | |||
| @@ -149,7 +149,9 @@ take effect. | |||
| 149 | 149 | ||
| 150 | If SILENT, then don't message progress reports and the like. | 150 | If SILENT, then don't message progress reports and the like. |
| 151 | If INHIBIT-COOKIES, cookies will neither be stored nor sent to | 151 | If INHIBIT-COOKIES, cookies will neither be stored nor sent to |
| 152 | the server." | 152 | the server. |
| 153 | If URL is a multibyte string, it will be encoded as utf-8 and | ||
| 154 | URL-encoded before it's used." | ||
| 153 | ;;; XXX: There is code in Emacs that does dynamic binding | 155 | ;;; XXX: There is code in Emacs that does dynamic binding |
| 154 | ;;; of the following variables around url-retrieve: | 156 | ;;; of the following variables around url-retrieve: |
| 155 | ;;; url-standalone-mode, url-gateway-unplugged, w3-honor-stylesheets, | 157 | ;;; url-standalone-mode, url-gateway-unplugged, w3-honor-stylesheets, |
| @@ -171,11 +173,16 @@ the list of events, as described in the docstring of `url-retrieve'. | |||
| 171 | 173 | ||
| 172 | If SILENT, don't message progress reports and the like. | 174 | If SILENT, don't message progress reports and the like. |
| 173 | If INHIBIT-COOKIES, cookies will neither be stored nor sent to | 175 | If INHIBIT-COOKIES, cookies will neither be stored nor sent to |
| 174 | the server." | 176 | the server. |
| 177 | If URL is a multibyte string, it will be encoded as utf-8 and | ||
| 178 | URL-encoded before it's used." | ||
| 175 | (url-do-setup) | 179 | (url-do-setup) |
| 176 | (url-gc-dead-buffers) | 180 | (url-gc-dead-buffers) |
| 177 | (if (stringp url) | 181 | (if (stringp url) |
| 178 | (set-text-properties 0 (length url) nil url)) | 182 | (set-text-properties 0 (length url) nil url)) |
| 183 | (when (multibyte-string-p url) | ||
| 184 | (let ((url-unreserved-chars (append '(?: ?/) url-unreserved-chars))) | ||
| 185 | (setq url (url-hexify-string url)))) | ||
| 179 | (if (not (vectorp url)) | 186 | (if (not (vectorp url)) |
| 180 | (setq url (url-generic-parse-url url))) | 187 | (setq url (url-generic-parse-url url))) |
| 181 | (if (not (functionp callback)) | 188 | (if (not (functionp callback)) |
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 16e33889c31..8b6b85dd22e 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el | |||
| @@ -545,7 +545,7 @@ but in the file header instead, in which case move forward to the first hunk." | |||
| 545 | (condition-case-unless-debug nil (diff-refine-hunk) (error nil)))) | 545 | (condition-case-unless-debug nil (diff-refine-hunk) (error nil)))) |
| 546 | 546 | ||
| 547 | (easy-mmode-define-navigation | 547 | (easy-mmode-define-navigation |
| 548 | diff-file diff-file-header-re "file" diff-end-of-hunk) | 548 | diff-file diff-file-header-re "file" diff-end-of-file) |
| 549 | 549 | ||
| 550 | (defun diff-restrict-view (&optional arg) | 550 | (defun diff-restrict-view (&optional arg) |
| 551 | "Restrict the view to the current hunk. | 551 | "Restrict the view to the current hunk. |
diff --git a/lisp/vc/pcvs-util.el b/lisp/vc/pcvs-util.el index b300247e552..a3c525cb896 100644 --- a/lisp/vc/pcvs-util.el +++ b/lisp/vc/pcvs-util.el | |||
| @@ -182,9 +182,7 @@ arguments. If ARGS is not a list, no argument will be passed." | |||
| 182 | (if oneline (line-end-position) (point-max)))) | 182 | (if oneline (line-end-position) (point-max)))) |
| 183 | (file-error nil))) | 183 | (file-error nil))) |
| 184 | 184 | ||
| 185 | (defun cvs-string-prefix-p (str1 str2) | 185 | (define-obsolete-function-alias 'cvs-string-prefix-p 'string-prefix-p "24.2") |
| 186 | "Tell whether STR1 is a prefix of STR2." | ||
| 187 | (eq t (compare-strings str2 nil (length str1) str1 nil nil))) | ||
| 188 | 186 | ||
| 189 | ;;;; | 187 | ;;;; |
| 190 | ;;;; file names | 188 | ;;;; file names |
diff --git a/lisp/vc/pcvs.el b/lisp/vc/pcvs.el index 9ba65cda143..6aec24755b5 100644 --- a/lisp/vc/pcvs.el +++ b/lisp/vc/pcvs.el | |||
| @@ -432,8 +432,8 @@ If non-nil, NEW means to create a new buffer no matter what." | |||
| 432 | (case cvs-reuse-cvs-buffer | 432 | (case cvs-reuse-cvs-buffer |
| 433 | (always t) | 433 | (always t) |
| 434 | (subdir | 434 | (subdir |
| 435 | (or (cvs-string-prefix-p default-directory dir) | 435 | (or (string-prefix-p default-directory dir) |
| 436 | (cvs-string-prefix-p dir default-directory))) | 436 | (string-prefix-p dir default-directory))) |
| 437 | (samedir (string= default-directory dir))) | 437 | (samedir (string= default-directory dir))) |
| 438 | (return buffer))))) | 438 | (return buffer))))) |
| 439 | ;; we really have to create a new buffer: | 439 | ;; we really have to create a new buffer: |
| @@ -887,7 +887,7 @@ RM-MSGS if non-nil means remove messages." | |||
| 887 | (eq (cvs-fileinfo->type last-fi) 'DIRCHANGE) | 887 | (eq (cvs-fileinfo->type last-fi) 'DIRCHANGE) |
| 888 | (not (when first-dir (setq first-dir nil) t)) | 888 | (not (when first-dir (setq first-dir nil) t)) |
| 889 | (or (eq rm-dirs 'all) | 889 | (or (eq rm-dirs 'all) |
| 890 | (not (cvs-string-prefix-p | 890 | (not (string-prefix-p |
| 891 | (cvs-fileinfo->dir last-fi) | 891 | (cvs-fileinfo->dir last-fi) |
| 892 | (cvs-fileinfo->dir fi))) | 892 | (cvs-fileinfo->dir fi))) |
| 893 | (and (eq type 'DIRCHANGE) (eq rm-dirs 'empty)) | 893 | (and (eq type 'DIRCHANGE) (eq rm-dirs 'empty)) |
| @@ -1839,7 +1839,7 @@ Signal an error if there is no backup file." | |||
| 1839 | (setq buffer-file-name (expand-file-name buffer-file-name)) | 1839 | (setq buffer-file-name (expand-file-name buffer-file-name)) |
| 1840 | (let (ret) | 1840 | (let (ret) |
| 1841 | (dolist (fi (or fis (list (cvs-create-fileinfo 'DIRCHANGE "" "." "")))) | 1841 | (dolist (fi (or fis (list (cvs-create-fileinfo 'DIRCHANGE "" "." "")))) |
| 1842 | (when (cvs-string-prefix-p | 1842 | (when (string-prefix-p |
| 1843 | (expand-file-name (cvs-fileinfo->full-name fi) dir) | 1843 | (expand-file-name (cvs-fileinfo->full-name fi) dir) |
| 1844 | buffer-file-name) | 1844 | buffer-file-name) |
| 1845 | (setq ret t))) | 1845 | (setq ret t))) |
| @@ -2261,7 +2261,7 @@ With prefix argument, prompt for cvs flags." | |||
| 2261 | (defun cvs-dir-member-p (fileinfo dir) | 2261 | (defun cvs-dir-member-p (fileinfo dir) |
| 2262 | "Return true if FILEINFO represents a file in directory DIR." | 2262 | "Return true if FILEINFO represents a file in directory DIR." |
| 2263 | (and (not (eq (cvs-fileinfo->type fileinfo) 'DIRCHANGE)) | 2263 | (and (not (eq (cvs-fileinfo->type fileinfo) 'DIRCHANGE)) |
| 2264 | (cvs-string-prefix-p dir (cvs-fileinfo->dir fileinfo)))) | 2264 | (string-prefix-p dir (cvs-fileinfo->dir fileinfo)))) |
| 2265 | 2265 | ||
| 2266 | (defun cvs-execute-single-file (fi extractor program constant-args) | 2266 | (defun cvs-execute-single-file (fi extractor program constant-args) |
| 2267 | "Internal function for `cvs-execute-single-file-list'." | 2267 | "Internal function for `cvs-execute-single-file-list'." |
| @@ -2392,7 +2392,7 @@ The exact behavior is determined also by `cvs-dired-use-hook'." | |||
| 2392 | (set-buffer cvs-buf) | 2392 | (set-buffer cvs-buf) |
| 2393 | ;; look for a corresponding pcl-cvs buffer | 2393 | ;; look for a corresponding pcl-cvs buffer |
| 2394 | (when (and (eq major-mode 'cvs-mode) | 2394 | (when (and (eq major-mode 'cvs-mode) |
| 2395 | (cvs-string-prefix-p default-directory dir)) | 2395 | (string-prefix-p default-directory dir)) |
| 2396 | (let ((subdir (substring dir (length default-directory)))) | 2396 | (let ((subdir (substring dir (length default-directory)))) |
| 2397 | (set-buffer buffer) | 2397 | (set-buffer buffer) |
| 2398 | (set (make-local-variable 'cvs-buffer) cvs-buf) | 2398 | (set (make-local-variable 'cvs-buffer) cvs-buf) |
| @@ -2423,7 +2423,7 @@ The exact behavior is determined also by `cvs-dired-use-hook'." | |||
| 2423 | (set-buffer cvs-buf) | 2423 | (set-buffer cvs-buf) |
| 2424 | ;; look for a corresponding pcl-cvs buffer | 2424 | ;; look for a corresponding pcl-cvs buffer |
| 2425 | (when (and (eq major-mode 'cvs-mode) | 2425 | (when (and (eq major-mode 'cvs-mode) |
| 2426 | (cvs-string-prefix-p default-directory file)) | 2426 | (string-prefix-p default-directory file)) |
| 2427 | (let* ((file (substring file (length default-directory))) | 2427 | (let* ((file (substring file (length default-directory))) |
| 2428 | (fi (cvs-create-fileinfo | 2428 | (fi (cvs-create-fileinfo |
| 2429 | (if (string= "0" version) | 2429 | (if (string= "0" version) |
diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el index a1dd807d828..f4964ef85cc 100644 --- a/lisp/vc/vc-annotate.el +++ b/lisp/vc/vc-annotate.el | |||
| @@ -522,12 +522,12 @@ the file in question, search for the log entry required and move point." | |||
| 522 | (car rev-at-line) t 1))))))) | 522 | (car rev-at-line) t 1))))))) |
| 523 | 523 | ||
| 524 | (defun vc-annotate-show-diff-revision-at-line-internal (filediff) | 524 | (defun vc-annotate-show-diff-revision-at-line-internal (filediff) |
| 525 | (if (not (equal major-mode 'vc-annotate-mode)) | 525 | (if (not (derived-mode-p 'vc-annotate-mode)) |
| 526 | (message "Cannot be invoked outside of a vc annotate buffer") | 526 | (message "Cannot be invoked outside of a vc annotate buffer") |
| 527 | (let* ((rev-at-line (vc-annotate-extract-revision-at-line)) | 527 | (let* ((rev-at-line (vc-annotate-extract-revision-at-line)) |
| 528 | (prev-rev nil) | 528 | (prev-rev nil) |
| 529 | (rev (car rev-at-line)) | 529 | (rev (car rev-at-line)) |
| 530 | (fname (cdr rev-at-line))) | 530 | (fname (cdr rev-at-line))) |
| 531 | (if (not rev-at-line) | 531 | (if (not rev-at-line) |
| 532 | (message "Cannot extract revision number from the current line") | 532 | (message "Cannot extract revision number from the current line") |
| 533 | (setq prev-rev | 533 | (setq prev-rev |
| @@ -535,17 +535,15 @@ the file in question, search for the log entry required and move point." | |||
| 535 | (if filediff fname nil) rev)) | 535 | (if filediff fname nil) rev)) |
| 536 | (if (not prev-rev) | 536 | (if (not prev-rev) |
| 537 | (message "Cannot diff from any revision prior to %s" rev) | 537 | (message "Cannot diff from any revision prior to %s" rev) |
| 538 | (save-window-excursion | 538 | (vc-diff-internal |
| 539 | (vc-diff-internal | 539 | t |
| 540 | nil | 540 | ;; The value passed here should follow what |
| 541 | ;; The value passed here should follow what | 541 | ;; `vc-deduce-fileset' returns. |
| 542 | ;; `vc-deduce-fileset' returns. | 542 | (list vc-annotate-backend |
| 543 | (list vc-annotate-backend | 543 | (if filediff |
| 544 | (if filediff | 544 | (list fname) |
| 545 | (list fname) | 545 | nil)) |
| 546 | nil)) | 546 | prev-rev rev)))))) |
| 547 | prev-rev rev)) | ||
| 548 | (switch-to-buffer "*vc-diff*")))))) | ||
| 549 | 547 | ||
| 550 | (defun vc-annotate-show-diff-revision-at-line () | 548 | (defun vc-annotate-show-diff-revision-at-line () |
| 551 | "Visit the diff of the revision at line from its previous revision." | 549 | "Visit the diff of the revision at line from its previous revision." |
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index 798131236d5..505e40f46ba 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el | |||
| @@ -37,7 +37,6 @@ | |||
| 37 | ;; are bzr-versioned, `vc-bzr` presently runs `bzr status` on the | 37 | ;; are bzr-versioned, `vc-bzr` presently runs `bzr status` on the |
| 38 | ;; symlink, thereby not detecting whether the actual contents | 38 | ;; symlink, thereby not detecting whether the actual contents |
| 39 | ;; (that is, the target contents) are changed. | 39 | ;; (that is, the target contents) are changed. |
| 40 | ;; See https://bugs.launchpad.net/vc-bzr/+bug/116607 | ||
| 41 | 40 | ||
| 42 | ;;; Properties of the backend | 41 | ;;; Properties of the backend |
| 43 | 42 | ||
| @@ -65,14 +64,6 @@ | |||
| 65 | :group 'vc-bzr | 64 | :group 'vc-bzr |
| 66 | :type 'string) | 65 | :type 'string) |
| 67 | 66 | ||
| 68 | (defcustom vc-bzr-sha1-program '("sha1sum") | ||
| 69 | "Name of program to compute SHA1. | ||
| 70 | It must be a string \(program name\) or list of strings \(name and its args\)." | ||
| 71 | :type '(repeat string) | ||
| 72 | :group 'vc-bzr) | ||
| 73 | |||
| 74 | (define-obsolete-variable-alias 'sha1-program 'vc-bzr-sha1-program "24.1") | ||
| 75 | |||
| 76 | (defcustom vc-bzr-diff-switches nil | 67 | (defcustom vc-bzr-diff-switches nil |
| 77 | "String or list of strings specifying switches for bzr diff under VC. | 68 | "String or list of strings specifying switches for bzr diff under VC. |
| 78 | If nil, use the value of `vc-diff-switches'. If t, use no switches." | 69 | If nil, use the value of `vc-diff-switches'. If t, use no switches." |
| @@ -190,20 +181,15 @@ in the repository root directory of FILE." | |||
| 190 | (defun vc-bzr-sha1 (file) | 181 | (defun vc-bzr-sha1 (file) |
| 191 | (with-temp-buffer | 182 | (with-temp-buffer |
| 192 | (set-buffer-multibyte nil) | 183 | (set-buffer-multibyte nil) |
| 193 | (let ((prog vc-bzr-sha1-program) | 184 | (insert-file-contents-literally file) |
| 194 | (args nil) | 185 | (sha1 (current-buffer)))) |
| 195 | process-file-side-effects) | ||
| 196 | (when (consp prog) | ||
| 197 | (setq args (cdr prog)) | ||
| 198 | (setq prog (car prog))) | ||
| 199 | (apply 'process-file prog (file-relative-name file) t nil args) | ||
| 200 | (buffer-substring (point-min) (+ (point-min) 40))))) | ||
| 201 | 186 | ||
| 202 | (defun vc-bzr-state-heuristic (file) | 187 | (defun vc-bzr-state-heuristic (file) |
| 203 | "Like `vc-bzr-state' but hopefully without running Bzr." | 188 | "Like `vc-bzr-state' but hopefully without running Bzr." |
| 204 | ;; `bzr status' was excruciatingly slow with large histories and | 189 | ;; `bzr status' could be slow with large histories and pending merges, |
| 205 | ;; pending merges, so try to avoid using it until they fix their | 190 | ;; so this tries to avoid calling it if possible. bzr status is |
| 206 | ;; performance problems. | 191 | ;; faster now, so this is not as important as it was. |
| 192 | ;; | ||
| 207 | ;; This function tries first to parse Bzr internal file | 193 | ;; This function tries first to parse Bzr internal file |
| 208 | ;; `checkout/dirstate', but it may fail if Bzr internal file format | 194 | ;; `checkout/dirstate', but it may fail if Bzr internal file format |
| 209 | ;; has changed. As a safeguard, the `checkout/dirstate' file is | 195 | ;; has changed. As a safeguard, the `checkout/dirstate' file is |
| @@ -299,10 +285,7 @@ in the repository root directory of FILE." | |||
| 299 | 'up-to-date) | 285 | 'up-to-date) |
| 300 | (t 'edited)) | 286 | (t 'edited)) |
| 301 | 'unregistered)))) | 287 | 'unregistered)))) |
| 302 | ;; Either the dirstate file can't be read, or the sha1 | 288 | ;; The dirstate file can't be read, or some other problem. |
| 303 | ;; executable is missing, or ... | ||
| 304 | ;; In either case, recent versions of Bzr aren't that slow | ||
| 305 | ;; any more. | ||
| 306 | (error (vc-bzr-state file))))))) | 289 | (error (vc-bzr-state file))))))) |
| 307 | 290 | ||
| 308 | 291 | ||
| @@ -417,49 +400,56 @@ string or nil, and STATUS is one of the symbols: `added', | |||
| 417 | `ignored', `kindchanged', `modified', `removed', `renamed', `unknown', | 400 | `ignored', `kindchanged', `modified', `removed', `renamed', `unknown', |
| 418 | which directly correspond to `bzr status' output, or 'unchanged | 401 | which directly correspond to `bzr status' output, or 'unchanged |
| 419 | for files whose copy in the working tree is identical to the one | 402 | for files whose copy in the working tree is identical to the one |
| 420 | in the branch repository, or nil for files that are not | 403 | in the branch repository (or whose status not be determined)." |
| 421 | registered with Bzr. | 404 | ;; Doc used to also say the following, but AFAICS, it has never been true. |
| 422 | 405 | ;; | |
| 423 | If any error occurred in running `bzr status', then return nil." | 406 | ;; ", or nil for files that are not registered with Bzr. |
| 407 | ;; If any error occurred in running `bzr status', then return nil." | ||
| 408 | ;; | ||
| 409 | ;; Rather than returning nil in case of an error, it returns | ||
| 410 | ;; (unchanged . WARNING). FIXME unchanged is not the best status to | ||
| 411 | ;; return in case of error. | ||
| 424 | (with-temp-buffer | 412 | (with-temp-buffer |
| 425 | (let ((ret (condition-case nil | 413 | ;; This is with-demoted-errors without the condition-case-unless-debug |
| 426 | (vc-bzr-command "status" t 0 file) | 414 | ;; annoyance, which makes it fail during ert testing. |
| 427 | (file-error nil))) ; vc-bzr-program not found. | 415 | (let (err) |
| 428 | (status 'unchanged)) | 416 | (condition-case err (vc-bzr-command "status" t 0 file) |
| 429 | ;; the only secure status indication in `bzr status' output | 417 | (error (message "Error: %S" err) nil))) |
| 430 | ;; is a couple of lines following the pattern:: | 418 | (let ((status 'unchanged)) |
| 431 | ;; | <status>: | 419 | ;; the only secure status indication in `bzr status' output |
| 432 | ;; | <file name> | 420 | ;; is a couple of lines following the pattern:: |
| 433 | ;; if the file is up-to-date, we get no status report from `bzr', | 421 | ;; | <status>: |
| 434 | ;; so if the regexp search for the above pattern fails, we consider | 422 | ;; | <file name> |
| 435 | ;; the file to be up-to-date. | 423 | ;; if the file is up-to-date, we get no status report from `bzr', |
| 436 | (goto-char (point-min)) | 424 | ;; so if the regexp search for the above pattern fails, we consider |
| 437 | (when (re-search-forward | 425 | ;; the file to be up-to-date. |
| 438 | ;; bzr prints paths relative to the repository root. | 426 | (goto-char (point-min)) |
| 439 | (concat "^\\(" vc-bzr-state-words "\\):[ \t\n]+" | 427 | (when (re-search-forward |
| 440 | (regexp-quote (vc-bzr-file-name-relative file)) | 428 | ;; bzr prints paths relative to the repository root. |
| 441 | ;; Bzr appends a '/' to directory names and | 429 | (concat "^\\(" vc-bzr-state-words "\\):[ \t\n]+" |
| 442 | ;; '*' to executable files | 430 | (regexp-quote (vc-bzr-file-name-relative file)) |
| 443 | (if (file-directory-p file) "/?" "\\*?") | 431 | ;; Bzr appends a '/' to directory names and |
| 444 | "[ \t\n]*$") | 432 | ;; '*' to executable files |
| 445 | nil t) | 433 | (if (file-directory-p file) "/?" "\\*?") |
| 446 | (lexical-let ((statusword (match-string 1))) | 434 | "[ \t\n]*$") |
| 447 | ;; Erase the status text that matched. | 435 | nil t) |
| 448 | (delete-region (match-beginning 0) (match-end 0)) | 436 | (lexical-let ((statusword (match-string 1))) |
| 449 | (setq status | 437 | ;; Erase the status text that matched. |
| 450 | (intern (replace-regexp-in-string " " "" statusword))))) | 438 | (delete-region (match-beginning 0) (match-end 0)) |
| 451 | (when status | 439 | (setq status |
| 452 | (goto-char (point-min)) | 440 | (intern (replace-regexp-in-string " " "" statusword))))) |
| 453 | (skip-chars-forward " \n\t") ;Throw away spaces. | 441 | (when status |
| 454 | (cons status | 442 | (goto-char (point-min)) |
| 455 | ;; "bzr" will output warnings and informational messages to | 443 | (skip-chars-forward " \n\t") ;Throw away spaces. |
| 456 | ;; stderr; due to Emacs's `vc-do-command' (and, it seems, | 444 | (cons status |
| 457 | ;; `start-process' itself) limitations, we cannot catch stderr | 445 | ;; "bzr" will output warnings and informational messages to |
| 458 | ;; and stdout into different buffers. So, if there's anything | 446 | ;; stderr; due to Emacs's `vc-do-command' (and, it seems, |
| 459 | ;; left in the buffer after removing the above status | 447 | ;; `start-process' itself) limitations, we cannot catch stderr |
| 460 | ;; keywords, let us just presume that any other message from | 448 | ;; and stdout into different buffers. So, if there's anything |
| 461 | ;; "bzr" is a user warning, and display it. | 449 | ;; left in the buffer after removing the above status |
| 462 | (unless (eobp) (buffer-substring (point) (point-max)))))))) | 450 | ;; keywords, let us just presume that any other message from |
| 451 | ;; "bzr" is a user warning, and display it. | ||
| 452 | (unless (eobp) (buffer-substring (point) (point-max)))))))) | ||
| 463 | 453 | ||
| 464 | (defun vc-bzr-state (file) | 454 | (defun vc-bzr-state (file) |
| 465 | (lexical-let ((result (vc-bzr-status file))) | 455 | (lexical-let ((result (vc-bzr-status file))) |
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index 33611b4eafd..4c32eea2f72 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; vc-dir.el --- Directory status display under VC | 1 | ;;; vc-dir.el --- Directory status display under VC |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2007-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2007-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Dan Nicolaescu <dann@ics.uci.edu> | 5 | ;; Author: Dan Nicolaescu <dann@ics.uci.edu> |
| 6 | ;; Keywords: vc tools | 6 | ;; Keywords: vc tools |
| @@ -556,7 +556,7 @@ If a prefix argument is given, move by that many lines." | |||
| 556 | (let ((data (ewoc-data crt)) | 556 | (let ((data (ewoc-data crt)) |
| 557 | (dir (vc-dir-node-directory crt))) | 557 | (dir (vc-dir-node-directory crt))) |
| 558 | (and (vc-dir-fileinfo->directory data) | 558 | (and (vc-dir-fileinfo->directory data) |
| 559 | (vc-string-prefix-p dir argdir) | 559 | (string-prefix-p dir argdir) |
| 560 | (vc-dir-fileinfo->marked data) | 560 | (vc-dir-fileinfo->marked data) |
| 561 | (setq found data)))) | 561 | (setq found data)))) |
| 562 | found)) | 562 | found)) |
| @@ -818,7 +818,7 @@ child files." | |||
| 818 | data) | 818 | data) |
| 819 | (while | 819 | (while |
| 820 | (and (setq crt (ewoc-next vc-ewoc crt)) | 820 | (and (setq crt (ewoc-next vc-ewoc crt)) |
| 821 | (vc-string-prefix-p dir | 821 | (string-prefix-p dir |
| 822 | (progn | 822 | (progn |
| 823 | (setq data (ewoc-data crt)) | 823 | (setq data (ewoc-data crt)) |
| 824 | (vc-dir-node-directory crt)))) | 824 | (vc-dir-node-directory crt)))) |
| @@ -846,7 +846,7 @@ If it is a file, return the corresponding cons for the file itself." | |||
| 846 | data) | 846 | data) |
| 847 | (while | 847 | (while |
| 848 | (and (setq crt (ewoc-next vc-ewoc crt)) | 848 | (and (setq crt (ewoc-next vc-ewoc crt)) |
| 849 | (vc-string-prefix-p dir (progn | 849 | (string-prefix-p dir (progn |
| 850 | (setq data (ewoc-data crt)) | 850 | (setq data (ewoc-data crt)) |
| 851 | (vc-dir-node-directory crt)))) | 851 | (vc-dir-node-directory crt)))) |
| 852 | (unless (vc-dir-fileinfo->directory data) | 852 | (unless (vc-dir-fileinfo->directory data) |
| @@ -878,10 +878,10 @@ If it is a file, return the corresponding cons for the file itself." | |||
| 878 | children | 878 | children |
| 879 | dname) | 879 | dname) |
| 880 | ;; Find DIR | 880 | ;; Find DIR |
| 881 | (while (and crt (not (vc-string-prefix-p | 881 | (while (and crt (not (string-prefix-p |
| 882 | dirname (vc-dir-node-directory crt)))) | 882 | dirname (vc-dir-node-directory crt)))) |
| 883 | (setq crt (ewoc-next vc-ewoc crt))) | 883 | (setq crt (ewoc-next vc-ewoc crt))) |
| 884 | (while (and crt (vc-string-prefix-p | 884 | (while (and crt (string-prefix-p |
| 885 | dirname | 885 | dirname |
| 886 | (setq dname (vc-dir-node-directory crt)))) | 886 | (setq dname (vc-dir-node-directory crt)))) |
| 887 | (let ((data (ewoc-data crt))) | 887 | (let ((data (ewoc-data crt))) |
| @@ -915,7 +915,7 @@ If it is a file, return the corresponding cons for the file itself." | |||
| 915 | (if (not (derived-mode-p 'vc-dir-mode)) | 915 | (if (not (derived-mode-p 'vc-dir-mode)) |
| 916 | (push status-buf drop) | 916 | (push status-buf drop) |
| 917 | (let ((ddir default-directory)) | 917 | (let ((ddir default-directory)) |
| 918 | (when (vc-string-prefix-p ddir file) | 918 | (when (string-prefix-p ddir file) |
| 919 | (if (file-directory-p file) | 919 | (if (file-directory-p file) |
| 920 | (progn | 920 | (progn |
| 921 | (vc-dir-resync-directory-files file) | 921 | (vc-dir-resync-directory-files file) |
diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el index ec1b127dd19..95c15030953 100644 --- a/lisp/vc/vc-dispatcher.el +++ b/lisp/vc/vc-dispatcher.el | |||
| @@ -537,13 +537,12 @@ editing!" | |||
| 537 | (kill-buffer (current-buffer))))) | 537 | (kill-buffer (current-buffer))))) |
| 538 | 538 | ||
| 539 | (declare-function vc-dir-resynch-file "vc-dir" (&optional fname)) | 539 | (declare-function vc-dir-resynch-file "vc-dir" (&optional fname)) |
| 540 | (declare-function vc-string-prefix-p "vc" (prefix string)) | ||
| 541 | 540 | ||
| 542 | (defun vc-resynch-buffers-in-directory (directory &optional keep noquery reset-vc-info) | 541 | (defun vc-resynch-buffers-in-directory (directory &optional keep noquery reset-vc-info) |
| 543 | "Resync all buffers that visit files in DIRECTORY." | 542 | "Resync all buffers that visit files in DIRECTORY." |
| 544 | (dolist (buffer (buffer-list)) | 543 | (dolist (buffer (buffer-list)) |
| 545 | (let ((fname (buffer-file-name buffer))) | 544 | (let ((fname (buffer-file-name buffer))) |
| 546 | (when (and fname (vc-string-prefix-p directory fname)) | 545 | (when (and fname (string-prefix-p directory fname)) |
| 547 | (with-current-buffer buffer | 546 | (with-current-buffer buffer |
| 548 | (vc-resynch-buffer fname keep noquery reset-vc-info)))))) | 547 | (vc-resynch-buffer fname keep noquery reset-vc-info)))))) |
| 549 | 548 | ||
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 52e8051342d..a2728268816 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | ;; Copyright (C) 2006-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2006-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Ivan Kanis | 5 | ;; Author: Ivan Kanis |
| 6 | ;; Maintainer: FSF | ||
| 6 | ;; Keywords: vc tools | 7 | ;; Keywords: vc tools |
| 7 | ;; Package: vc | 8 | ;; Package: vc |
| 8 | 9 | ||
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 4cbbf47c2d6..ab7e587eb79 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; vc.el --- drive a version-control system from within Emacs | 1 | ;;; vc.el --- drive a version-control system from within Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1992-1998, 2000-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1992-1998, 2000-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: FSF (see below for full credits) | 5 | ;; Author: FSF (see below for full credits) |
| 6 | ;; Maintainer: Andre Spiegel <spiegel@gnu.org> | 6 | ;; Maintainer: Andre Spiegel <spiegel@gnu.org> |
| @@ -847,7 +847,7 @@ been updated to their corresponding values." | |||
| 847 | (if (file-directory-p file) | 847 | (if (file-directory-p file) |
| 848 | (dolist (buffer (buffer-list)) | 848 | (dolist (buffer (buffer-list)) |
| 849 | (let ((fname (buffer-file-name buffer))) | 849 | (let ((fname (buffer-file-name buffer))) |
| 850 | (when (and fname (vc-string-prefix-p file fname)) | 850 | (when (and fname (string-prefix-p file fname)) |
| 851 | (push fname flist)))) | 851 | (push fname flist)))) |
| 852 | (push file flist))) | 852 | (push file flist))) |
| 853 | ,form | 853 | ,form |
| @@ -900,7 +900,7 @@ use." | |||
| 900 | (lambda (arg) | 900 | (lambda (arg) |
| 901 | (message "arg %s" arg) | 901 | (message "arg %s" arg) |
| 902 | (and (file-directory-p arg) | 902 | (and (file-directory-p arg) |
| 903 | (vc-string-prefix-p (expand-file-name arg) def-dir))))))) | 903 | (string-prefix-p (expand-file-name arg) def-dir))))))) |
| 904 | (let ((default-directory repo-dir)) | 904 | (let ((default-directory repo-dir)) |
| 905 | (vc-call-backend bk 'create-repo)) | 905 | (vc-call-backend bk 'create-repo)) |
| 906 | (throw 'found bk)))) | 906 | (throw 'found bk)))) |
| @@ -2809,11 +2809,7 @@ to provide the `find-revision' operation instead." | |||
| 2809 | 2809 | ||
| 2810 | 2810 | ||
| 2811 | ;; These things should probably be generally available | 2811 | ;; These things should probably be generally available |
| 2812 | 2812 | (define-obsolete-function-alias 'vc-string-prefix-p 'string-prefix-p "24.2") | |
| 2813 | (defun vc-string-prefix-p (prefix string) | ||
| 2814 | (let ((lpref (length prefix))) | ||
| 2815 | (and (>= (length string) lpref) | ||
| 2816 | (eq t (compare-strings prefix nil nil string nil lpref))))) | ||
| 2817 | 2813 | ||
| 2818 | (defun vc-file-tree-walk (dirname func &rest args) | 2814 | (defun vc-file-tree-walk (dirname func &rest args) |
| 2819 | "Walk recursively through DIRNAME. | 2815 | "Walk recursively through DIRNAME. |
diff --git a/lisp/vcursor.el b/lisp/vcursor.el index 95928ebe87a..19cb7a9df8d 100644 --- a/lisp/vcursor.el +++ b/lisp/vcursor.el | |||
| @@ -656,12 +656,13 @@ another window. With LEAVE-W, use the current `vcursor-window'." | |||
| 656 | (or window-system | 656 | (or window-system |
| 657 | (display-color-p) | 657 | (display-color-p) |
| 658 | (overlay-put vcursor-overlay 'before-string vcursor-string)) | 658 | (overlay-put vcursor-overlay 'before-string vcursor-string)) |
| 659 | (overlay-put vcursor-overlay 'face 'vcursor)) | 659 | (overlay-put vcursor-overlay 'face 'vcursor) |
| 660 | ;; 200 is purely an arbitrary "high" number. See bug#9663. | ||
| 661 | (overlay-put vcursor-overlay 'priority 200)) | ||
| 660 | (or leave-w (vcursor-find-window nil t)) | 662 | (or leave-w (vcursor-find-window nil t)) |
| 661 | ;; vcursor-window now contains the right buffer | 663 | ;; vcursor-window now contains the right buffer |
| 662 | (or (pos-visible-in-window-p pt vcursor-window) | 664 | (or (pos-visible-in-window-p pt vcursor-window) |
| 663 | (set-window-point vcursor-window pt))) | 665 | (set-window-point vcursor-window pt)))) |
| 664 | ) | ||
| 665 | 666 | ||
| 666 | (defun vcursor-insert (text) | 667 | (defun vcursor-insert (text) |
| 667 | "Insert TEXT, respecting `vcursor-interpret-input'." | 668 | "Insert TEXT, respecting `vcursor-interpret-input'." |
diff --git a/lisp/version.el b/lisp/version.el index a4bc4fd54a6..d7fb05ea465 100644 --- a/lisp/version.el +++ b/lisp/version.el | |||
| @@ -81,28 +81,45 @@ to the system configuration; look at `system-configuration' instead." | |||
| 81 | 81 | ||
| 82 | ;; Set during dumping, this is a defvar so that it can be setq'd. | 82 | ;; Set during dumping, this is a defvar so that it can be setq'd. |
| 83 | (defvar emacs-bzr-version nil "\ | 83 | (defvar emacs-bzr-version nil "\ |
| 84 | String giving the bzr revision number from which this Emacs was built. | 84 | String giving the bzr revision from which this Emacs was built. |
| 85 | This is nil if Emacs was not built from a bzr checkout, or if we could | 85 | Value is the bzr revision number and a revision ID separated by a blank. |
| 86 | Value is nil if Emacs was not built from a bzr checkout, or if we could | ||
| 86 | not determine the revision.") | 87 | not determine the revision.") |
| 87 | 88 | ||
| 88 | (defun emacs-bzr-get-version () "\ | 89 | (defun emacs-bzr-get-version (&optional dir) "\ |
| 89 | Try to return as a string the bzr revision number of the Emacs sources. | 90 | Try to return as a string the bzr revision number of the Emacs sources. |
| 90 | Returns nil if the sources do not seem to be under bzr, or if we could | 91 | Value is the bzr revision number and a revision ID separated by a blank. |
| 92 | Value is nil if the sources do not seem to be under bzr, or if we could | ||
| 91 | not determine the revision. Note that this reports on the current state | 93 | not determine the revision. Note that this reports on the current state |
| 92 | of the sources, which may not correspond to the running Emacs." | 94 | of the sources, which may not correspond to the running Emacs. |
| 93 | (let ((file (expand-file-name ".bzr/branch/last-revision" source-directory))) | 95 | |
| 94 | (if (file-readable-p file) | 96 | Optional argument DIR is a directory to use instead of `source-directory'." |
| 95 | (with-temp-buffer | 97 | (or dir (setq dir source-directory)) |
| 96 | (insert-file-contents file) | 98 | (when (file-directory-p (setq dir (expand-file-name ".bzr/branch" dir))) |
| 97 | (goto-char (point-max)) | 99 | (let (file loc) |
| 98 | (if (looking-back "\n") | 100 | (cond ((file-readable-p |
| 99 | (delete-char -1)) | 101 | (setq file (expand-file-name "last-revision" dir))) |
| 100 | (buffer-string))))) | 102 | (with-temp-buffer |
| 103 | (insert-file-contents file) | ||
| 104 | (goto-char (point-max)) | ||
| 105 | (if (looking-back "\n") | ||
| 106 | (delete-char -1)) | ||
| 107 | (buffer-string))) | ||
| 108 | ;; OK, no last-revision. Is it a lightweight checkout? | ||
| 109 | ((file-readable-p | ||
| 110 | (setq file (expand-file-name "location" dir))) | ||
| 111 | ;; If the parent branch is local, try looking there for the revid. | ||
| 112 | (if (setq loc (with-temp-buffer | ||
| 113 | (insert-file-contents file) | ||
| 114 | (if (looking-at "file://\\(.*\\)") | ||
| 115 | (match-string 1)))) | ||
| 116 | (emacs-bzr-get-version loc))) | ||
| 117 | ;; Could fall back to eg `bzr testament' at this point. | ||
| 118 | )))) | ||
| 101 | 119 | ||
| 102 | ;; We put version info into the executable in the form that `ident' uses. | 120 | ;; We put version info into the executable in the form that `ident' uses. |
| 103 | (or (eq system-type 'windows-nt) | 121 | (purecopy (concat "\n$Id: " (subst-char-in-string ?\n ?\s (emacs-version)) |
| 104 | (purecopy (concat "\n$Id: " (subst-char-in-string ?\n ?\s (emacs-version)) | 122 | " $\n")) |
| 105 | " $\n"))) | ||
| 106 | 123 | ||
| 107 | ;; Local Variables: | 124 | ;; Local Variables: |
| 108 | ;; version-control: never | 125 | ;; version-control: never |
diff --git a/lisp/window.el b/lisp/window.el index c9e2469b0d2..c148f5ee01f 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -514,17 +514,19 @@ window).") | |||
| 514 | (if (window-valid-p ignore) (eq window ignore) ignore)) | 514 | (if (window-valid-p ignore) (eq window ignore) ignore)) |
| 515 | 515 | ||
| 516 | (defun window-min-size (&optional window horizontal ignore) | 516 | (defun window-min-size (&optional window horizontal ignore) |
| 517 | "Return the minimum number of lines of WINDOW. | 517 | "Return the minimum size of WINDOW. |
| 518 | WINDOW can be an arbitrary window and defaults to the selected | 518 | WINDOW can be an arbitrary window and defaults to the selected |
| 519 | one. Optional argument HORIZONTAL non-nil means return the | 519 | one. Optional argument HORIZONTAL non-nil means return the |
| 520 | minimum number of columns of WINDOW. | 520 | minimum number of columns of WINDOW; otherwise return the minimum |
| 521 | number of WINDOW's lines. | ||
| 521 | 522 | ||
| 522 | Optional argument IGNORE non-nil means ignore any restrictions | 523 | Optional argument IGNORE, if non-nil, means ignore restrictions |
| 523 | imposed by fixed size windows, `window-min-height' or | 524 | imposed by fixed size windows, `window-min-height' or |
| 524 | `window-min-width' settings. IGNORE equal `safe' means live | 525 | `window-min-width' settings. If IGNORE equals `safe', live |
| 525 | windows may get as small as `window-safe-min-height' lines and | 526 | windows may get as small as `window-safe-min-height' lines and |
| 526 | `window-safe-min-width' columns. IGNORE a window means ignore | 527 | `window-safe-min-width' columns. If IGNORE is a window, ignore |
| 527 | restrictions for that window only." | 528 | restrictions for that window only. Any other non-nil value |
| 529 | means ignore all of the above restrictions for all windows." | ||
| 528 | (window--min-size-1 | 530 | (window--min-size-1 |
| 529 | (window-normalize-window window) horizontal ignore)) | 531 | (window-normalize-window window) horizontal ignore)) |
| 530 | 532 | ||
| @@ -614,12 +616,13 @@ columns. If WINDOW cannot be shrunk by -DELTA lines or columns, | |||
| 614 | return the minimum value in the range DELTA..0 by which WINDOW | 616 | return the minimum value in the range DELTA..0 by which WINDOW |
| 615 | can be shrunk. | 617 | can be shrunk. |
| 616 | 618 | ||
| 617 | Optional argument IGNORE non-nil means ignore any restrictions | 619 | Optional argument IGNORE non-nil means ignore restrictions |
| 618 | imposed by fixed size windows, `window-min-height' or | 620 | imposed by fixed size windows, `window-min-height' or |
| 619 | `window-min-width' settings. IGNORE equal `safe' means live | 621 | `window-min-width' settings. If IGNORE equals `safe', live |
| 620 | windows may get as small as `window-safe-min-height' lines and | 622 | windows may get as small as `window-safe-min-height' lines and |
| 621 | `window-safe-min-width' columns. IGNORE any window means ignore | 623 | `window-safe-min-width' columns. If IGNORE is a window, ignore |
| 622 | restrictions for that window only." | 624 | restrictions for that window only. Any other non-nil value means |
| 625 | ignore all of the above restrictions for all windows." | ||
| 623 | (setq window (window-normalize-window window)) | 626 | (setq window (window-normalize-window window)) |
| 624 | (cond | 627 | (cond |
| 625 | ((< delta 0) | 628 | ((< delta 0) |
| @@ -734,20 +737,21 @@ window. Return zero if WINDOW cannot be shrunk. | |||
| 734 | Optional argument HORIZONTAL non-nil means return number of | 737 | Optional argument HORIZONTAL non-nil means return number of |
| 735 | columns by which WINDOW can be shrunk. | 738 | columns by which WINDOW can be shrunk. |
| 736 | 739 | ||
| 737 | Optional argument IGNORE non-nil means ignore any restrictions | 740 | Optional argument IGNORE non-nil means ignore restrictions |
| 738 | imposed by fixed size windows, `window-min-height' or | 741 | imposed by fixed size windows, `window-min-height' or |
| 739 | `window-min-width' settings. IGNORE a window means ignore | 742 | `window-min-width' settings. If IGNORE is a window, ignore |
| 740 | restrictions for that window only. IGNORE equal `safe' means | 743 | restrictions for that window only. If IGNORE equals `safe', |
| 741 | live windows may get as small as `window-safe-min-height' lines | 744 | live windows may get as small as `window-safe-min-height' lines |
| 742 | and `window-safe-min-width' columns. | 745 | and `window-safe-min-width' columns. Any other non-nil value |
| 746 | means ignore all of the above restrictions for all windows. | ||
| 743 | 747 | ||
| 744 | Optional argument TRAIL `before' means only windows to the left | 748 | Optional argument TRAIL restricts the windows that can be enlarged. |
| 745 | of or above WINDOW can be enlarged. Optional argument TRAIL | 749 | If its value is `before', only windows to the left of or above WINDOW |
| 746 | `after' means only windows to the right of or below WINDOW can be | 750 | can be enlarged. If it is `after', only windows to the right of or |
| 747 | enlarged. | 751 | below WINDOW can be enlarged. |
| 748 | 752 | ||
| 749 | Optional argument NOUP non-nil means don't go up in the window | 753 | Optional argument NOUP non-nil means don't go up in the window |
| 750 | tree but try to enlarge windows within WINDOW's combination only. | 754 | tree, but try to enlarge windows within WINDOW's combination only. |
| 751 | 755 | ||
| 752 | Optional argument NODOWN non-nil means don't check whether WINDOW | 756 | Optional argument NODOWN non-nil means don't check whether WINDOW |
| 753 | itself (and its child windows) can be shrunk; check only whether | 757 | itself (and its child windows) can be shrunk; check only whether |
| @@ -808,24 +812,25 @@ at least one other window can be enlarged appropriately." | |||
| 808 | (window--max-delta-1 parent delta horizontal ignore trail)))))) | 812 | (window--max-delta-1 parent delta horizontal ignore trail)))))) |
| 809 | 813 | ||
| 810 | (defun window-max-delta (&optional window horizontal ignore trail noup nodown) | 814 | (defun window-max-delta (&optional window horizontal ignore trail noup nodown) |
| 811 | "Return maximum number of lines WINDOW by which WINDOW can be enlarged. | 815 | "Return maximum number of lines by which WINDOW can be enlarged. |
| 812 | WINDOW can be an arbitrary window and defaults to the selected | 816 | WINDOW can be an arbitrary window and defaults to the selected |
| 813 | window. The return value is zero if WINDOW cannot be enlarged. | 817 | window. The return value is zero if WINDOW cannot be enlarged. |
| 814 | 818 | ||
| 815 | Optional argument HORIZONTAL non-nil means return maximum number | 819 | Optional argument HORIZONTAL non-nil means return maximum number |
| 816 | of columns by which WINDOW can be enlarged. | 820 | of columns by which WINDOW can be enlarged. |
| 817 | 821 | ||
| 818 | Optional argument IGNORE non-nil means ignore any restrictions | 822 | Optional argument IGNORE non-nil means ignore restrictions |
| 819 | imposed by fixed size windows, `window-min-height' or | 823 | imposed by fixed size windows, `window-min-height' or |
| 820 | `window-min-width' settings. IGNORE a window means ignore | 824 | `window-min-width' settings. If IGNORE is a window, ignore |
| 821 | restrictions for that window only. IGNORE equal `safe' means | 825 | restrictions for that window only. If IGNORE equals `safe', |
| 822 | live windows may get as small as `window-safe-min-height' lines | 826 | live windows may get as small as `window-safe-min-height' lines |
| 823 | and `window-safe-min-width' columns. | 827 | and `window-safe-min-width' columns. Any other non-nil value means |
| 828 | ignore all of the above restrictions for all windows. | ||
| 824 | 829 | ||
| 825 | Optional argument TRAIL `before' means only windows to the left | 830 | Optional argument TRAIL restricts the windows that can be enlarged. |
| 826 | of or below WINDOW can be shrunk. Optional argument TRAIL | 831 | If its value is `before', only windows to the left of or above WINDOW |
| 827 | `after' means only windows to the right of or above WINDOW can be | 832 | can be enlarged. If it is `after', only windows to the right of or |
| 828 | shrunk. | 833 | below WINDOW can be enlarged. |
| 829 | 834 | ||
| 830 | Optional argument NOUP non-nil means don't go up in the window | 835 | Optional argument NOUP non-nil means don't go up in the window |
| 831 | tree but try to obtain the entire space from windows within | 836 | tree but try to obtain the entire space from windows within |
| @@ -860,12 +865,13 @@ columns. If WINDOW cannot be shrunk by -DELTA lines or columns, | |||
| 860 | return the minimum value in the range DELTA..0 that can be used | 865 | return the minimum value in the range DELTA..0 that can be used |
| 861 | for shrinking WINDOW. | 866 | for shrinking WINDOW. |
| 862 | 867 | ||
| 863 | Optional argument IGNORE non-nil means ignore any restrictions | 868 | Optional argument IGNORE non-nil means ignore restrictions |
| 864 | imposed by fixed size windows, `window-min-height' or | 869 | imposed by fixed size windows, `window-min-height' or |
| 865 | `window-min-width' settings. IGNORE a window means ignore | 870 | `window-min-width' settings. If IGNORE is a window, ignore |
| 866 | restrictions for that window only. IGNORE equal `safe' means | 871 | restrictions for that window only. If IGNORE equals `safe', |
| 867 | live windows may get as small as `window-safe-min-height' lines | 872 | live windows may get as small as `window-safe-min-height' lines |
| 868 | and `window-safe-min-width' columns. | 873 | and `window-safe-min-width' columns. Any other non-nil value |
| 874 | means ignore all of the above restrictions for all windows. | ||
| 869 | 875 | ||
| 870 | Optional argument TRAIL `before' means only windows to the left | 876 | Optional argument TRAIL `before' means only windows to the left |
| 871 | of or below WINDOW can be shrunk. Optional argument TRAIL | 877 | of or below WINDOW can be shrunk. Optional argument TRAIL |
| @@ -916,17 +922,18 @@ columns. If WINDOW cannot be shrunk by -DELTA lines or columns, | |||
| 916 | return the minimum value in the range DELTA..0 that can be used | 922 | return the minimum value in the range DELTA..0 that can be used |
| 917 | for shrinking WINDOW. | 923 | for shrinking WINDOW. |
| 918 | 924 | ||
| 919 | Optional argument IGNORE non-nil means ignore any restrictions | 925 | Optional argument IGNORE non-nil means ignore restrictions |
| 920 | imposed by fixed size windows, `window-min-height' or | 926 | imposed by fixed size windows, `window-min-height' or |
| 921 | `window-min-width' settings. IGNORE a window means ignore | 927 | `window-min-width' settings. If IGNORE is a window, ignore |
| 922 | restrictions for that window only. IGNORE equal `safe' means | 928 | restrictions for that window only. If IGNORE equals `safe', |
| 923 | live windows may get as small as `window-safe-min-height' lines | 929 | live windows may get as small as `window-safe-min-height' lines |
| 924 | and `window-safe-min-width' columns." | 930 | and `window-safe-min-width' columns. Any other non-nil value |
| 931 | means ignore all of the above restrictions for all windows." | ||
| 925 | (setq window (window-normalize-window window)) | 932 | (setq window (window-normalize-window window)) |
| 926 | (window--resizable window delta horizontal ignore)) | 933 | (window--resizable window delta horizontal ignore)) |
| 927 | 934 | ||
| 928 | (defun window-total-size (&optional window horizontal) | 935 | (defun window-total-size (&optional window horizontal) |
| 929 | "Return the total height or width of window WINDOW. | 936 | "Return the total height or width of WINDOW. |
| 930 | If WINDOW is omitted or nil, it defaults to the selected window. | 937 | If WINDOW is omitted or nil, it defaults to the selected window. |
| 931 | 938 | ||
| 932 | If HORIZONTAL is omitted or nil, return the total height of | 939 | If HORIZONTAL is omitted or nil, return the total height of |
| @@ -941,7 +948,7 @@ the total width, in columns, like `window-total-width'." | |||
| 941 | 948 | ||
| 942 | ;; See discussion in bug#4543. | 949 | ;; See discussion in bug#4543. |
| 943 | (defun window-full-height-p (&optional window) | 950 | (defun window-full-height-p (&optional window) |
| 944 | "Return t if WINDOW is as high as the containing frame. | 951 | "Return t if WINDOW is as high as its containing frame. |
| 945 | More precisely, return t if and only if the total height of | 952 | More precisely, return t if and only if the total height of |
| 946 | WINDOW equals the total height of the root window of WINDOW's | 953 | WINDOW equals the total height of the root window of WINDOW's |
| 947 | frame. WINDOW can be any window and defaults to the selected | 954 | frame. WINDOW can be any window and defaults to the selected |
| @@ -951,7 +958,7 @@ one." | |||
| 951 | (window-total-size (frame-root-window window)))) | 958 | (window-total-size (frame-root-window window)))) |
| 952 | 959 | ||
| 953 | (defun window-full-width-p (&optional window) | 960 | (defun window-full-width-p (&optional window) |
| 954 | "Return t if WINDOW is as wide as the containing frame. | 961 | "Return t if WINDOW is as wide as its containing frame. |
| 955 | More precisely, return t if and only if the total width of WINDOW | 962 | More precisely, return t if and only if the total width of WINDOW |
| 956 | equals the total width of the root window of WINDOW's frame. | 963 | equals the total width of the root window of WINDOW's frame. |
| 957 | WINDOW can be any window and defaults to the selected one." | 964 | WINDOW can be any window and defaults to the selected one." |
| @@ -1115,7 +1122,7 @@ SIDE can be any of the symbols `left', `top', `right' or | |||
| 1115 | "Return window in DIRECTION as seen from WINDOW. | 1122 | "Return window in DIRECTION as seen from WINDOW. |
| 1116 | DIRECTION must be one of `above', `below', `left' or `right'. | 1123 | DIRECTION must be one of `above', `below', `left' or `right'. |
| 1117 | WINDOW must be a live window and defaults to the selected one. | 1124 | WINDOW must be a live window and defaults to the selected one. |
| 1118 | IGNORE, when non-nil means a window can be returned even if its | 1125 | IGNORE non-nil means a window can be returned even if its |
| 1119 | `no-other-window' parameter is non-nil." | 1126 | `no-other-window' parameter is non-nil." |
| 1120 | (setq window (window-normalize-window window t)) | 1127 | (setq window (window-normalize-window window t)) |
| 1121 | (unless (memq direction '(above below left right)) | 1128 | (unless (memq direction '(above below left right)) |
| @@ -1420,7 +1427,7 @@ windows." | |||
| 1420 | (defun window--resize-mini-window (window delta) | 1427 | (defun window--resize-mini-window (window delta) |
| 1421 | "Resize minibuffer window WINDOW by DELTA lines. | 1428 | "Resize minibuffer window WINDOW by DELTA lines. |
| 1422 | If WINDOW cannot be resized by DELTA lines make it as large (or | 1429 | If WINDOW cannot be resized by DELTA lines make it as large (or |
| 1423 | as small) as possible but don't signal an error." | 1430 | as small) as possible, but don't signal an error." |
| 1424 | (when (window-minibuffer-p window) | 1431 | (when (window-minibuffer-p window) |
| 1425 | (let* ((frame (window-frame window)) | 1432 | (let* ((frame (window-frame window)) |
| 1426 | (root (frame-root-window frame)) | 1433 | (root (frame-root-window frame)) |
| @@ -1461,12 +1468,13 @@ horizontally by DELTA columns. In this case a positive DELTA | |||
| 1461 | means enlarge WINDOW by DELTA columns. DELTA negative means | 1468 | means enlarge WINDOW by DELTA columns. DELTA negative means |
| 1462 | WINDOW shall be shrunk by -DELTA columns. | 1469 | WINDOW shall be shrunk by -DELTA columns. |
| 1463 | 1470 | ||
| 1464 | Optional argument IGNORE non-nil means ignore any restrictions | 1471 | Optional argument IGNORE non-nil means ignore restrictions |
| 1465 | imposed by fixed size windows, `window-min-height' or | 1472 | imposed by fixed size windows, `window-min-height' or |
| 1466 | `window-min-width' settings. IGNORE any window means ignore | 1473 | `window-min-width' settings. If IGNORE is a window, ignore |
| 1467 | restrictions for that window only. IGNORE equal `safe' means | 1474 | restrictions for that window only. If IGNORE equals `safe', |
| 1468 | live windows may get as small as `window-safe-min-height' lines | 1475 | live windows may get as small as `window-safe-min-height' lines |
| 1469 | and `window-safe-min-width' columns. | 1476 | and `window-safe-min-width' columns. Any other non-nil value |
| 1477 | means ignore all of the above restrictions for all windows. | ||
| 1470 | 1478 | ||
| 1471 | This function resizes other windows proportionally and never | 1479 | This function resizes other windows proportionally and never |
| 1472 | deletes any windows. If you want to move only the low (right) | 1480 | deletes any windows. If you want to move only the low (right) |
| @@ -1516,9 +1524,9 @@ HORIZONTAL non-nil means set the new normal width of these | |||
| 1516 | windows. WINDOW specifies a child window of PARENT that has been | 1524 | windows. WINDOW specifies a child window of PARENT that has been |
| 1517 | resized by THIS-DELTA lines (columns). | 1525 | resized by THIS-DELTA lines (columns). |
| 1518 | 1526 | ||
| 1519 | Optional argument TRAIL either 'before or 'after means set values | 1527 | Optional argument TRAIL either `before' or `after' means set values |
| 1520 | for windows before or after WINDOW only. Optional argument | 1528 | only for windows before or after WINDOW. Optional argument |
| 1521 | OTHER-DELTA a number specifies that this many lines (columns) | 1529 | OTHER-DELTA, a number, specifies that this many lines (columns) |
| 1522 | have been obtained from (or returned to) an ancestor window of | 1530 | have been obtained from (or returned to) an ancestor window of |
| 1523 | PARENT in order to resize WINDOW." | 1531 | PARENT in order to resize WINDOW." |
| 1524 | (let* ((delta-normal | 1532 | (let* ((delta-normal |
| @@ -1618,12 +1626,13 @@ be a horizontally combined internal window. | |||
| 1618 | WINDOW, if specified, must denote a child window of PARENT that | 1626 | WINDOW, if specified, must denote a child window of PARENT that |
| 1619 | is resized by DELTA lines. | 1627 | is resized by DELTA lines. |
| 1620 | 1628 | ||
| 1621 | Optional argument IGNORE non-nil means ignore any restrictions | 1629 | Optional argument IGNORE non-nil means ignore restrictions |
| 1622 | imposed by fixed size windows, `window-min-height' or | 1630 | imposed by fixed size windows, `window-min-height' or |
| 1623 | `window-min-width' settings. IGNORE equal `safe' means live | 1631 | `window-min-width' settings. If IGNORE equals `safe', live |
| 1624 | windows may get as small as `window-safe-min-height' lines and | 1632 | windows may get as small as `window-safe-min-height' lines and |
| 1625 | `window-safe-min-width' columns. IGNORE any window means ignore | 1633 | `window-safe-min-width' columns. If IGNORE is a window, ignore |
| 1626 | restrictions for that window only. | 1634 | restrictions for that window only. Any other non-nil value means |
| 1635 | ignore all of the above restrictions for all windows. | ||
| 1627 | 1636 | ||
| 1628 | Optional arguments TRAIL and EDGE, when non-nil, restrict the set | 1637 | Optional arguments TRAIL and EDGE, when non-nil, restrict the set |
| 1629 | of windows that shall be resized. If TRAIL equals `before', | 1638 | of windows that shall be resized. If TRAIL equals `before', |
| @@ -1790,12 +1799,13 @@ Optional argument HORIZONTAL non-nil means resize other windows | |||
| 1790 | when WINDOW is resized horizontally by DELTA columns. WINDOW | 1799 | when WINDOW is resized horizontally by DELTA columns. WINDOW |
| 1791 | itself is not resized by this function. | 1800 | itself is not resized by this function. |
| 1792 | 1801 | ||
| 1793 | Optional argument IGNORE non-nil means ignore any restrictions | 1802 | Optional argument IGNORE non-nil means ignore restrictions |
| 1794 | imposed by fixed size windows, `window-min-height' or | 1803 | imposed by fixed size windows, `window-min-height' or |
| 1795 | `window-min-width' settings. IGNORE equal `safe' means live | 1804 | `window-min-width' settings. If IGNORE equals `safe', live |
| 1796 | windows may get as small as `window-safe-min-height' lines and | 1805 | windows may get as small as `window-safe-min-height' lines and |
| 1797 | `window-safe-min-width' columns. IGNORE any window means ignore | 1806 | `window-safe-min-width' columns. If IGNORE is a window, ignore |
| 1798 | restrictions for that window only. | 1807 | restrictions for that window only. Any other non-nil value means |
| 1808 | ignore all of the above restrictions for all windows. | ||
| 1799 | 1809 | ||
| 1800 | Optional arguments TRAIL and EDGE, when non-nil, refine the set | 1810 | Optional arguments TRAIL and EDGE, when non-nil, refine the set |
| 1801 | of windows that shall be resized. If TRAIL equals `before', | 1811 | of windows that shall be resized. If TRAIL equals `before', |
| @@ -1891,12 +1901,13 @@ preferably only resize windows adjacent to EDGE." | |||
| 1891 | Optional argument HORIZONTAL non-nil means resize WINDOW | 1901 | Optional argument HORIZONTAL non-nil means resize WINDOW |
| 1892 | horizontally by DELTA columns. | 1902 | horizontally by DELTA columns. |
| 1893 | 1903 | ||
| 1894 | Optional argument IGNORE non-nil means ignore any restrictions | 1904 | Optional argument IGNORE non-nil means ignore restrictions |
| 1895 | imposed by fixed size windows, `window-min-height' or | 1905 | imposed by fixed size windows, `window-min-height' or |
| 1896 | `window-min-width' settings. IGNORE equal `safe' means live | 1906 | `window-min-width' settings. If IGNORE equals `safe', live |
| 1897 | windows may get as small as `window-safe-min-height' lines and | 1907 | windows may get as small as `window-safe-min-height' lines and |
| 1898 | `window-safe-min-width' columns. IGNORE any window means ignore | 1908 | `window-safe-min-width' columns. If IGNORE is a window, ignore |
| 1899 | restrictions for that window only. | 1909 | restrictions for that window only. Any other non-nil value |
| 1910 | means ignore all of the above restrictions for all windows. | ||
| 1900 | 1911 | ||
| 1901 | Optional argument ADD non-nil means add DELTA to the new total | 1912 | Optional argument ADD non-nil means add DELTA to the new total |
| 1902 | size of WINDOW. | 1913 | size of WINDOW. |
| @@ -1986,7 +1997,7 @@ any windows." | |||
| 1986 | Optional argument HORIZONTAL non-nil means move WINDOW's right | 1997 | Optional argument HORIZONTAL non-nil means move WINDOW's right |
| 1987 | edge by DELTA columns. WINDOW defaults to the selected window. | 1998 | edge by DELTA columns. WINDOW defaults to the selected window. |
| 1988 | 1999 | ||
| 1989 | If DELTA is greater zero, then move the edge downwards or to the | 2000 | If DELTA is greater than zero, move the edge downwards or to the |
| 1990 | right. If DELTA is less than zero, move the edge upwards or to | 2001 | right. If DELTA is less than zero, move the edge upwards or to |
| 1991 | the left. If the edge can't be moved by DELTA lines or columns, | 2002 | the left. If the edge can't be moved by DELTA lines or columns, |
| 1992 | move it as far as possible in the desired direction." | 2003 | move it as far as possible in the desired direction." |
| @@ -2091,7 +2102,7 @@ move it as far as possible in the desired direction." | |||
| 2091 | (error "Failed adjusting window %s" window))))))) | 2102 | (error "Failed adjusting window %s" window))))))) |
| 2092 | 2103 | ||
| 2093 | (defun enlarge-window (delta &optional horizontal) | 2104 | (defun enlarge-window (delta &optional horizontal) |
| 2094 | "Make selected window DELTA lines taller. | 2105 | "Make the selected window DELTA lines taller. |
| 2095 | Interactively, if no argument is given, make the selected window | 2106 | Interactively, if no argument is given, make the selected window |
| 2096 | one line taller. If optional argument HORIZONTAL is non-nil, | 2107 | one line taller. If optional argument HORIZONTAL is non-nil, |
| 2097 | make selected window wider by DELTA columns. If DELTA is | 2108 | make selected window wider by DELTA columns. If DELTA is |
| @@ -2112,7 +2123,7 @@ Return nil." | |||
| 2112 | horizontal)))) | 2123 | horizontal)))) |
| 2113 | 2124 | ||
| 2114 | (defun shrink-window (delta &optional horizontal) | 2125 | (defun shrink-window (delta &optional horizontal) |
| 2115 | "Make selected window DELTA lines smaller. | 2126 | "Make the selected window DELTA lines smaller. |
| 2116 | Interactively, if no argument is given, make the selected window | 2127 | Interactively, if no argument is given, make the selected window |
| 2117 | one line smaller. If optional argument HORIZONTAL is non-nil, | 2128 | one line smaller. If optional argument HORIZONTAL is non-nil, |
| 2118 | make selected window narrower by DELTA columns. If DELTA is | 2129 | make selected window narrower by DELTA columns. If DELTA is |
| @@ -3643,7 +3654,11 @@ specific buffers." | |||
| 3643 | (scroll-bars . ,(window-scroll-bars window)) | 3654 | (scroll-bars . ,(window-scroll-bars window)) |
| 3644 | (vscroll . ,(window-vscroll window)) | 3655 | (vscroll . ,(window-vscroll window)) |
| 3645 | (dedicated . ,(window-dedicated-p window)) | 3656 | (dedicated . ,(window-dedicated-p window)) |
| 3646 | (point . ,(if writable point (copy-marker point))) | 3657 | (point . ,(if writable point |
| 3658 | (copy-marker point | ||
| 3659 | (buffer-local-value | ||
| 3660 | 'window-point-insertion-type | ||
| 3661 | buffer)))) | ||
| 3647 | (start . ,(if writable start (copy-marker start))))))))) | 3662 | (start . ,(if writable start (copy-marker start))))))))) |
| 3648 | (tail | 3663 | (tail |
| 3649 | (when (memq type '(vc hc)) | 3664 | (when (memq type '(vc hc)) |
| @@ -5439,7 +5454,7 @@ A value of t means point moves to the beginning or the end of the buffer | |||
| 5439 | \(depending on scrolling direction) when no more scrolling possible. | 5454 | \(depending on scrolling direction) when no more scrolling possible. |
| 5440 | When point is already on that position, then signal an error." | 5455 | When point is already on that position, then signal an error." |
| 5441 | :type 'boolean | 5456 | :type 'boolean |
| 5442 | :group 'scrolling | 5457 | :group 'windows |
| 5443 | :version "24.1") | 5458 | :version "24.1") |
| 5444 | 5459 | ||
| 5445 | (defun scroll-up-command (&optional arg) | 5460 | (defun scroll-up-command (&optional arg) |
diff --git a/lisp/woman.el b/lisp/woman.el index c76399a96e5..3ab06a5dd73 100644 --- a/lisp/woman.el +++ b/lisp/woman.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; woman.el --- browse UN*X manual pages `wo (without) man' | 1 | ;;; woman.el --- browse UN*X manual pages `wo (without) man' |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2000-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2000-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Francis J. Wright <F.J.Wright@qmul.ac.uk> | 5 | ;; Author: Francis J. Wright <F.J.Wright@qmul.ac.uk> |
| 6 | ;; Maintainer: FSF | 6 | ;; Maintainer: FSF |
| @@ -1595,14 +1595,6 @@ Also make each path-info component into a list. | |||
| 1595 | (woman-process-buffer) | 1595 | (woman-process-buffer) |
| 1596 | (goto-char (point-min))))) | 1596 | (goto-char (point-min))))) |
| 1597 | 1597 | ||
| 1598 | ;; There is currently no `tar-mode-hook' so use ... | ||
| 1599 | (eval-after-load "tar-mode" | ||
| 1600 | '(progn | ||
| 1601 | (define-key tar-mode-map "w" 'woman-tar-extract-file) | ||
| 1602 | (define-key-after (lookup-key tar-mode-map [menu-bar immediate]) | ||
| 1603 | [woman] '("Read Man Page (WoMan)" . woman-tar-extract-file) 'view))) | ||
| 1604 | |||
| 1605 | |||
| 1606 | (defvar woman-last-file-name nil | 1598 | (defvar woman-last-file-name nil |
| 1607 | "The full pathname of the last file formatted by WoMan.") | 1599 | "The full pathname of the last file formatted by WoMan.") |
| 1608 | 1600 | ||
| @@ -2141,7 +2133,7 @@ European characters." | |||
| 2141 | (copy-sequence standard-display-table) | 2133 | (copy-sequence standard-display-table) |
| 2142 | (make-display-table))) | 2134 | (make-display-table))) |
| 2143 | ;; Display the following internal chars correctly: | 2135 | ;; Display the following internal chars correctly: |
| 2144 | (aset buffer-display-table woman-unpadded-space-char [?\ ]) | 2136 | (aset buffer-display-table woman-unpadded-space-char [?\s]) |
| 2145 | (aset buffer-display-table woman-escaped-escape-char [?\\])) | 2137 | (aset buffer-display-table woman-escaped-escape-char [?\\])) |
| 2146 | 2138 | ||
| 2147 | 2139 | ||
| @@ -2401,10 +2393,12 @@ Currently set only from '\" t in the first line of the source file.") | |||
| 2401 | (progn | 2393 | (progn |
| 2402 | (goto-char from) | 2394 | (goto-char from) |
| 2403 | (while (search-forward woman-escaped-escape-string nil t) | 2395 | (while (search-forward woman-escaped-escape-string nil t) |
| 2404 | (delete-char -1) (insert ?\\)) | 2396 | (delete-char -1) |
| 2397 | (insert ?\\)) | ||
| 2405 | (goto-char from) | 2398 | (goto-char from) |
| 2406 | (while (search-forward woman-unpadded-space-string nil t) | 2399 | (while (search-forward woman-unpadded-space-string nil t) |
| 2407 | (delete-char -1) (insert ?\ )))) | 2400 | (delete-char -1) |
| 2401 | (insert ?\s)))) | ||
| 2408 | 2402 | ||
| 2409 | ;; Must return the new end of file if used in format-alist. | 2403 | ;; Must return the new end of file if used in format-alist. |
| 2410 | (point-max))) | 2404 | (point-max))) |
| @@ -2445,9 +2439,9 @@ Preserves location of `point'." | |||
| 2445 | ;; first backwards then forwards: | 2439 | ;; first backwards then forwards: |
| 2446 | (while (and | 2440 | (while (and |
| 2447 | (<= (setq N (1+ N)) 0) | 2441 | (<= (setq N (1+ N)) 0) |
| 2448 | (cond ((memq (preceding-char) '(?\ ?\t)) | 2442 | (cond ((memq (preceding-char) '(?\s ?\t)) |
| 2449 | (delete-char -1) t) | 2443 | (delete-char -1) t) |
| 2450 | ((memq (following-char) '(?\ ?\t)) | 2444 | ((memq (following-char) '(?\s ?\t)) |
| 2451 | (delete-char 1) t) | 2445 | (delete-char 1) t) |
| 2452 | (t nil)))) | 2446 | (t nil)))) |
| 2453 | (if (<= N 0) | 2447 | (if (<= N 0) |
| @@ -3384,7 +3378,7 @@ Ignore the default face and underline only word characters." | |||
| 3384 | ;; this used to be globally bound to nil, to avoid an error. Instead | 3378 | ;; this used to be globally bound to nil, to avoid an error. Instead |
| 3385 | ;; we can use bound-and-true-p in woman-translate. | 3379 | ;; we can use bound-and-true-p in woman-translate. |
| 3386 | (defvar woman-translations) | 3380 | (defvar woman-translations) |
| 3387 | ;; A list of the form (\"[ace]\" (a . b) (c . d) (e . ?\ )) or nil. | 3381 | ;; A list of the form (\"[ace]\" (a . b) (c . d) (e . ?\s)) or nil. |
| 3388 | 3382 | ||
| 3389 | (defun woman-get-next-char () | 3383 | (defun woman-get-next-char () |
| 3390 | "Return and delete next char in buffer, including special chars." | 3384 | "Return and delete next char in buffer, including special chars." |
| @@ -3719,7 +3713,9 @@ expression in parentheses. Leaves point after the value." | |||
| 3719 | (setq fn 'woman2-format-paragraphs)))) | 3713 | (setq fn 'woman2-format-paragraphs)))) |
| 3720 | () | 3714 | () |
| 3721 | ;; Find next control line: | 3715 | ;; Find next control line: |
| 3722 | (set-marker to (woman-find-next-control-line)) | 3716 | (if (equal woman-request "TS") |
| 3717 | (set-marker to (woman-find-next-control-line "TE")) | ||
| 3718 | (set-marker to (woman-find-next-control-line))) | ||
| 3723 | ;; Call the appropriate function: | 3719 | ;; Call the appropriate function: |
| 3724 | (funcall fn to))) | 3720 | (funcall fn to))) |
| 3725 | (if (not (eobp)) ; This should not happen, but ... | 3721 | (if (not (eobp)) ; This should not happen, but ... |
| @@ -3730,12 +3726,13 @@ expression in parentheses. Leaves point after the value." | |||
| 3730 | (fset 'insert-and-inherit insert-and-inherit) | 3726 | (fset 'insert-and-inherit insert-and-inherit) |
| 3731 | (set-marker to nil)))) | 3727 | (set-marker to nil)))) |
| 3732 | 3728 | ||
| 3733 | (defun woman-find-next-control-line () | 3729 | (defun woman-find-next-control-line (&optional pat) |
| 3734 | "Find and return start of next control line." | 3730 | "Find and return start of next control line. |
| 3735 | ; (let ((to (save-excursion | 3731 | PAT, if non-nil, specifies an additional component of the control |
| 3736 | ; (re-search-forward "^\\." nil t)))) | 3732 | line regexp to search for, which is appended to the default |
| 3737 | ; (if to (1- to) (point-max))) | 3733 | regexp, \"\\(\\\\c\\)?\\n[.']\"." |
| 3738 | (let (to) | 3734 | (let ((pattern (concat "\\(\\\\c\\)?\n[.']" pat)) |
| 3735 | to) | ||
| 3739 | (save-excursion | 3736 | (save-excursion |
| 3740 | ;; Must handle | 3737 | ;; Must handle |
| 3741 | ;; ...\c | 3738 | ;; ...\c |
| @@ -3744,12 +3741,14 @@ expression in parentheses. Leaves point after the value." | |||
| 3744 | ;; BEWARE THAT THIS CODE MAY BE UNRELIABLE!!!!! | 3741 | ;; BEWARE THAT THIS CODE MAY BE UNRELIABLE!!!!! |
| 3745 | (while | 3742 | (while |
| 3746 | (and | 3743 | (and |
| 3747 | (setq to (re-search-forward "\\(\\\\c\\)?\n[.']" nil t)) | 3744 | (setq to (re-search-forward pattern nil t)) |
| 3748 | (match-beginning 1) | 3745 | (match-beginning 1) |
| 3749 | (looking-at "br")) | 3746 | (looking-at "br")) |
| 3750 | (goto-char (match-beginning 0)) | 3747 | (goto-char (match-beginning 0)) |
| 3751 | (woman-delete-line 2))) | 3748 | (woman-delete-line 2))) |
| 3752 | (if to (1- to) (point-max)))) | 3749 | (if to |
| 3750 | (- to (+ 1 (length pat))) | ||
| 3751 | (point-max)))) | ||
| 3753 | 3752 | ||
| 3754 | (defun woman2-PD (to) | 3753 | (defun woman2-PD (to) |
| 3755 | ".PD d -- Set the interparagraph distance to d. | 3754 | ".PD d -- Set the interparagraph distance to d. |
| @@ -3893,18 +3892,18 @@ Leave 1 blank line. Format paragraphs upto TO." | |||
| 3893 | (insert (substring overlap i eol)) | 3892 | (insert (substring overlap i eol)) |
| 3894 | (setq i (or eol imax))) | 3893 | (setq i (or eol imax))) |
| 3895 | ) | 3894 | ) |
| 3896 | ((eq c ?\ ) ; skip | 3895 | ((eq c ?\s) ; skip |
| 3897 | (forward-char)) | 3896 | (forward-char)) |
| 3898 | ((eq c ?\t) ; skip | 3897 | ((eq c ?\t) ; skip |
| 3899 | (if (eq (following-char) ?\t) | 3898 | (if (eq (following-char) ?\t) |
| 3900 | (forward-char) ; both tabs, just skip | 3899 | (forward-char) ; both tabs, just skip |
| 3901 | (dotimes (i woman-tab-width) | 3900 | (dotimes (i woman-tab-width) |
| 3902 | (if (eolp) | 3901 | (if (eolp) |
| 3903 | (insert ?\ ) ; extend line | 3902 | (insert ?\s) ; extend line |
| 3904 | (forward-char)) ; skip | 3903 | (forward-char)) ; skip |
| 3905 | ))) | 3904 | ))) |
| 3906 | (t | 3905 | (t |
| 3907 | (if (or (eq (following-char) ?\ ) ; overwrite OK | 3906 | (if (or (eq (following-char) ?\s) ; overwrite OK |
| 3908 | overwritten) ; warning only once per ".sp -" | 3907 | overwritten) ; warning only once per ".sp -" |
| 3909 | () | 3908 | () |
| 3910 | (setq overwritten t) | 3909 | (setq overwritten t) |
| @@ -4408,7 +4407,7 @@ tab stop columns or pairs (COLUMN . TYPE) where TYPE is R or C." | |||
| 4408 | tab (- tab (if (eq type ?C) (/ n 2) n))) ) | 4407 | tab (- tab (if (eq type ?C) (/ n 2) n))) ) |
| 4409 | (setq n (- tab (current-column))) | 4408 | (setq n (- tab (current-column))) |
| 4410 | (insert-char ?\s n)) | 4409 | (insert-char ?\s n)) |
| 4411 | (insert ?\ )))) | 4410 | (insert ?\s)))) |
| 4412 | 4411 | ||
| 4413 | (defun woman2-DT (to) | 4412 | (defun woman2-DT (to) |
| 4414 | ".DT -- Restore default tabs. Format paragraphs upto TO. | 4413 | ".DT -- Restore default tabs. Format paragraphs upto TO. |
| @@ -4426,7 +4425,7 @@ Needs doing properly!" | |||
| 4426 | (if (eolp) | 4425 | (if (eolp) |
| 4427 | (woman-delete-whole-line) ; ignore! | 4426 | (woman-delete-whole-line) ; ignore! |
| 4428 | (let ((delim (following-char)) | 4427 | (let ((delim (following-char)) |
| 4429 | (pad ?\ ) end) ; pad defaults to space | 4428 | (pad ?\s) end) ; pad defaults to space |
| 4430 | (forward-char) | 4429 | (forward-char) |
| 4431 | (skip-chars-forward " \t") | 4430 | (skip-chars-forward " \t") |
| 4432 | (or (eolp) (setq pad (following-char))) | 4431 | (or (eolp) (setq pad (following-char))) |
| @@ -4457,8 +4456,6 @@ Needs doing properly!" | |||
| 4457 | (defun woman2-TS (to) | 4456 | (defun woman2-TS (to) |
| 4458 | ".TS -- Start of table code for the tbl processor. | 4457 | ".TS -- Start of table code for the tbl processor. |
| 4459 | Format paragraphs upto TO." | 4458 | Format paragraphs upto TO." |
| 4460 | ;; This is a preliminary hack that seems to suffice for lilo.8. | ||
| 4461 | (woman-delete-line 1) ; ignore any arguments | ||
| 4462 | (when woman-emulate-tbl | 4459 | (when woman-emulate-tbl |
| 4463 | ;; Assumes column separator is \t and intercolumn spacing is 3. | 4460 | ;; Assumes column separator is \t and intercolumn spacing is 3. |
| 4464 | ;; The first line may optionally be a list of options terminated by | 4461 | ;; The first line may optionally be a list of options terminated by |
| @@ -4470,6 +4467,22 @@ Format paragraphs upto TO." | |||
| 4470 | (woman-delete-line 1) | 4467 | (woman-delete-line 1) |
| 4471 | ;; For each column, find its width and align it: | 4468 | ;; For each column, find its width and align it: |
| 4472 | (let ((start (point)) (col 1)) | 4469 | (let ((start (point)) (col 1)) |
| 4470 | (WoMan-log "%s" (buffer-substring start (+ start 40))) | ||
| 4471 | ;; change T{ T} to tabs | ||
| 4472 | (while (search-forward "T{\n" to t) | ||
| 4473 | (replace-match "") | ||
| 4474 | (catch 'end | ||
| 4475 | (while (search-forward "\n" to t) | ||
| 4476 | (replace-match " ") | ||
| 4477 | (if (looking-at "T}") | ||
| 4478 | (progn | ||
| 4479 | (delete-char 2) | ||
| 4480 | (throw 'end t)))))) | ||
| 4481 | (goto-char start) | ||
| 4482 | ;; strip space and headers | ||
| 4483 | (while (re-search-forward "^\\.TH\\|\\.sp" to t) | ||
| 4484 | (woman-delete-whole-line)) | ||
| 4485 | (goto-char start) | ||
| 4473 | (while (prog1 (search-forward "\t" to t) (goto-char start)) | 4486 | (while (prog1 (search-forward "\t" to t) (goto-char start)) |
| 4474 | ;; Find current column width: | 4487 | ;; Find current column width: |
| 4475 | (while (< (point) to) | 4488 | (while (< (point) to) |
| @@ -4483,8 +4496,25 @@ Format paragraphs upto TO." | |||
| 4483 | (while (< (point) to) | 4496 | (while (< (point) to) |
| 4484 | (when (search-forward "\t" to t) | 4497 | (when (search-forward "\t" to t) |
| 4485 | (delete-char -1) | 4498 | (delete-char -1) |
| 4486 | (insert-char ?\ (- col (current-column)))) | 4499 | (insert-char ?\s (- col (current-column)))) |
| 4487 | (forward-line)) | 4500 | (forward-line)) |
| 4501 | (goto-char start)) | ||
| 4502 | ;; find maximum width | ||
| 4503 | (let ((max-col 0)) | ||
| 4504 | (while (search-forward "\n" to t) | ||
| 4505 | (backward-char) | ||
| 4506 | (if (> (current-column) max-col) | ||
| 4507 | (setq max-col (current-column))) | ||
| 4508 | (forward-char)) | ||
| 4509 | (goto-char start) | ||
| 4510 | ;; break lines if they are too long | ||
| 4511 | (when (and (> max-col woman-fill-column) | ||
| 4512 | (> woman-fill-column col)) | ||
| 4513 | (setq max-col woman-fill-column) | ||
| 4514 | (woman-break-table col to start) | ||
| 4515 | (goto-char start)) | ||
| 4516 | (while (re-search-forward "^_$" to t) | ||
| 4517 | (replace-match (make-string max-col ?_))) | ||
| 4488 | (goto-char start)))) | 4518 | (goto-char start)))) |
| 4489 | ;; Format table with no filling or adjusting (cf. woman2-nf): | 4519 | ;; Format table with no filling or adjusting (cf. woman2-nf): |
| 4490 | (setq woman-nofill t) | 4520 | (setq woman-nofill t) |
| @@ -4494,6 +4524,17 @@ Format paragraphs upto TO." | |||
| 4494 | ;; ".TE -- End of table code for the tbl processor." | 4524 | ;; ".TE -- End of table code for the tbl processor." |
| 4495 | ;; Turn filling and adjusting back on. | 4525 | ;; Turn filling and adjusting back on. |
| 4496 | 4526 | ||
| 4527 | (defun woman-break-table (start-column to start) | ||
| 4528 | (while (< (point) to) | ||
| 4529 | (move-to-column woman-fill-column) | ||
| 4530 | (if (eolp) | ||
| 4531 | (forward-line) | ||
| 4532 | (if (and (search-backward " " start t) | ||
| 4533 | (> (current-column) start-column)) | ||
| 4534 | (progn | ||
| 4535 | (insert-char ?\n 1) | ||
| 4536 | (insert-char ?\s (- start-column 5))) | ||
| 4537 | (forward-line))))) | ||
| 4497 | 4538 | ||
| 4498 | ;;; WoMan message logging: | 4539 | ;;; WoMan message logging: |
| 4499 | 4540 | ||
| @@ -4531,7 +4572,7 @@ IGNORED is a string appended to the log message." | |||
| 4531 | (buffer-substring (point) | 4572 | (buffer-substring (point) |
| 4532 | (line-end-position)))) | 4573 | (line-end-position)))) |
| 4533 | (if (and (> (length tail) 0) | 4574 | (if (and (> (length tail) 0) |
| 4534 | (/= (string-to-char tail) ?\ )) | 4575 | (/= (string-to-char tail) ?\s)) |
| 4535 | (setq tail (concat " " tail))) | 4576 | (setq tail (concat " " tail))) |
| 4536 | (WoMan-log-1 | 4577 | (WoMan-log-1 |
| 4537 | (concat "** " request tail " request " ignored)))) | 4578 | (concat "** " request tail " request " ignored)))) |