Stefan Monnier
de0503df97
* lisp/subr.el (with-eval-after-load): New macro.
...
(eval-after-load): Allow form to be a function.
take advantage of lexical-binding.
(do-after-load-evaluation): Use dolist and adjust to new format.
* lisp/simple.el (bad-packages-alist): Use dolist and with-eval-after-load.
* doc/lispref/loading.texi (Hooks for Loading): Document with-eval-after-load
instead of eval-after-load. Don't document after-load-alist.
* src/lread.c (syms_of_lread):
* src/fns.c (Fprovide): Adjust to new format of after-load-alist.
2013-06-13 18:24:52 -04:00
Stefan Monnier
55577e7c02
* lisp/simple.el: Move all the prog-mode code to prog-mode.el.
...
* lisp/progmodes/prog-mode.el: New file.
* lisp/loadup.el:
* src/lisp.mk (lisp): Add prog-mode.el.
2013-06-05 14:10:27 -04:00
Ted Zlatanov
8fc57765e8
Introduce and use prog-prettify-install.
2013-06-05 13:48:50 -04:00
Ted Zlatanov
3ca0d0b437
Symbol prettify in prog-mode; added to perl-mode, cfengine3-mode, and emacs-lisp-mode.
2013-06-05 10:26:50 -04:00
Stefan Monnier
17e5c0cc8f
* lisp/simple.el (read--expression): New function, extracted from
...
eval-expression. Set completion-at-point-functions.
(eval-expression, eval-minibuffer): Use it.
* lisp/progmodes/flymake.el (flymake-nop): Don't return a string.
(flymake-set-at): Fix typo.
Fixes: debbugs:14465
2013-05-24 22:21:49 -04:00
Sam Steingold
b3531901c6
* simple.el (shell-command-on-region): Pass the `replace' argument
...
down to `call-process-region' to comply with he doc as reported on
<http://stackoverflow.com/questions/16720458/emacs-noninteractive-call-to-shell-command-on-region-always-deletes-region >
2013-05-23 17:01:47 -04:00
Leo Liu
9df4ec5e90
* simple.el (prog-indent-sexp): Indent enclosing defun.
2013-05-16 11:41:52 +08:00
Eli Zaretskii
060ca4088d
Avoid beginning/end of buffer errors when moving across display strings.
...
lisp/simple.el (line-move-visual): Signal beginning/end of buffer
only if vertical-motion moved less than it was requested. Avoids
silly incorrect error messages when there are display strings with
multiple newlines at EOL.
2013-05-08 21:05:40 +03:00
Kelly Dean
a1c700dec5
* lisp/simple.el (shell-command-on-region): Doc fix.
...
Fixes: debbugs:14279
2013-05-06 23:11:40 +03:00
Stefan Monnier
30c7e54299
* lisp/simple.el (read-expression-map): Use completion-at-point.
...
Move the declaration from C.
(read-minibuffer, eval-minibuffer): Move from C.
(completion-setup-function): Avoid minibuffer-completion-contents.
* src/minibuf.c (Fread_minibuffer, Feval_minibuffer): Move to Elisp.
(syms_of_minibuf): Adjust accodingly.
* src/lread.c (Fread):
* src/callint.c (Fcall_interactively): Adjust calls accordingly.
Fixes: debbugs:14255
2013-05-04 15:27:41 -04:00
Stefan Monnier
cdca825560
* lisp/winner.el (winner-active-region): Use region-active-p, activate-mark
...
and deactivate-mark.
* lisp/simple.el (deactivate-mark): Don't inline it.
Fixes: debbugs:14225
2013-04-18 09:15:08 -04:00
Stefan Monnier
d36ed1c8e7
* lisp/subr.el (with-wrapper-hook): Declare obsolete.
...
* lisp/simple.el (filter-buffer-substring-function): New hook.
(filter-buffer-substring): Use it.
(filter-buffer-substring-functions): Mark obsolete.
* lisp/minibuffer.el (completion-in-region-function): New hook.
(completion-in-region): Use it.
(completion-in-region-functions): Mark obsolete.
* lisp/mail/mailabbrev.el (mail-abbrevs-setup): Use abbrev-expand-function.
* lisp/abbrev.el (abbrev-expand-function): New hook.
(expand-abbrev): Use it.
(abbrev-expand-functions): Mark obsolete.
* lisp/emacs-lisp/nadvice.el (advice--where-alist): Add :filter-args
and :filter-return.
* lisp/org/org-agenda.el (org-agenda-mode):
* lisp/org/org-indent.el (org-indent-mode): Use the `local' arg of
add-hook/remove-hook.
2013-04-17 20:12:33 -04:00
Bastien Guerry
b39792eb9e
* simple.el (choose-completion-string): Fix docstring (bug#14163).
2013-04-09 11:36:25 +02:00
Leo Liu
69489f1dd6
* simple.el (eval-expression-minibuffer-setup-hook): New hook.
...
(eval-expression): Run it.
Extend eldoc to display info in the mode-line.
* emacs-lisp/eldoc.el (eldoc-post-insert-mode): New minor mode.
(eldoc-mode-line-string): New variable.
(eldoc-minibuffer-message): New function.
(eldoc-message-function): New variable.
(eldoc-message): Use it.
(eldoc-display-message-p)
(eldoc-display-message-no-interference-p): Support
eldoc-post-insert-mode.
Fixes: debbugs:13978
2013-03-17 23:00:37 +08:00
Stefan Monnier
b6c2bfff02
* lisp/simple.el (command-execute): Move from C. Add obsolete check.
...
(extended-command-history): Move from C.
* src/keyboard.c (Qcommand_execute): New var.
(command_loop_1, read_char): Use it.
(Fcommand_execute): Remove, replace by an Elisp implementation.
(syms_of_keyboard): Adjust accordingly.
2013-02-20 11:37:06 -05:00
Stefan Monnier
6c8f113e70
* lisp/simple.el (eval-expression): Let `exp' set the mark.
...
Fixes: debbugs:13724
2013-02-15 18:47:50 -05:00
Glenn Morris
958614cf80
Make S-SPC scroll in the opposite direction to SPC
...
* lisp/calc/calc-graph.el (calc-graph-show-dumb):
* lisp/calendar/calendar.el (calendar-mode-map):
* lisp/cus-edit.el (custom-mode-map):
* lisp/ehelp.el (electric-help-map):
* lisp/emulation/vip.el (vip-mode-map):
* lisp/epa.el (epa-key-list-mode-map):
* lisp/info.el (Info-mode-map):
* lisp/mail/rmail.el (rmail-mode-map):
* lisp/mail/rmailsum.el (rmail-summary-mode-map):
* lisp/man.el (Man-mode-map):
* lisp/net/newst-plainview.el (newsticker-mode-map):
* lisp/progmodes/cpp.el (cpp-edit-mode-map):
* lisp/progmodes/grep.el (grep-mode-map):
* lisp/progmodes/idlw-help.el (idlwave-help-mode-map):
* lisp/simple.el (special-mode-map):
* lisp/startup.el (splash-screen-keymap):
* lisp/view.el (view-mode-map):
Make S-SPC scroll in the opposite sense to SPC.
Fixes: debbugs:2145
2013-02-11 20:46:18 -08:00
Stefan Monnier
c9586acc97
* lisp/simple.el (end-of-buffer): Don't touch unrelated windows.
...
(fundamental-mode): Use run-mode-hooks.
Fixes: debbugs:13466
2013-02-08 10:53:49 -05:00
Paul Eggert
d9c287e589
Spelling fixes.
2013-02-01 22:04:06 -08:00
Sam Steingold
1e77b18e33
fix last patch
2013-01-31 17:37:54 -05:00
Michal Nazarewicz
ad4de702e1
* lisp/simple.el (cycle-spacing): New command.
...
(just-one-space): Use it.
2013-01-30 21:57:35 -05:00
Aaron S. Hawley
9fc9a531a5
Disambiguate function and variable references in docstrings.
...
* lisp/comint.el (comint-history-isearch-message): Fix ambiguous doc
string cross-reference(s).
* lisp/ffap.el (ffap-string-at-point-region, ffap-next)
(ffap-string-at-point, ffap-string-around)
(ffap-copy-string-as-kill, ffap-highlight-overlay)
(ffap-literally): Fix ambiguous doc string cross-reference(s).
* lisp/font-lock.el (font-lock-keywords-alist)
(font-lock-removed-keywords-alist): Fix ambiguous doc string
cross-reference(s).
* lisp/help-mode.el (help-xref-symbol-regexp): Add "call" as a hint for
a cross-reference to a function.
* lisp/info.el (Info-find-emacs-command-nodes): Fix ambiguous doc
string cross-reference(s).
* lisp/isearch.el (isearch-message-function, isearch-fail-pos): Fix
ambiguous doc string cross-reference(s).
* lisp/misearch.el (multi-isearch-next-buffer-function): Fix ambiguous
doc string cross-reference(s).
* lisp/newcomment.el (comment-box): Fix ambiguous doc string
cross-reference(s).
* lisp/printing.el (pr-txt-printer-alist, pr-ps-printer-alist)
(pr-setting-database): Fix ambiguous doc string
cross-reference(s).
* lisp/ps-print.el (ps-even-or-odd-pages, ps-spool-buffer-with-faces)
(ps-n-up-filling-database): Fix ambiguous doc string
cross-reference(s).
* lisp/server.el (server-buffer, server-log): Fix ambiguous doc string
cross-reference(s).
* lisp/simple.el (newline, delete-backward-char, delete-forward-char)
(minibuffer-history-isearch-message, kill-line, track-eol)
(temporary-goal-column): Fix ambiguous doc string
cross-reference(s).
* lisp/whitespace.el (whitespace-point)
(whitespace-font-lock-refontify, whitespace-bob-marker)
(whitespace-eob-marker): Fix ambiguous doc string
cross-reference(s).
* lisp/calc/calc.el (calc-highlight-selections-with-faces)
(calc-dispatch): Fix ambiguous doc string cross-reference(s).
* lisp/emacs-lisp/edebug.el (edebug-read, edebug-eval-defun): Fix
ambiguous doc string cross-reference(s).
* lisp/gnus/gnus-start.el (gnus-check-new-newsgroups): Fix ambiguous doc string
cross-reference(s).
* lisp/gnus/gnus-sum.el (gnus-summary-newsgroup-prefix): Fix ambiguous doc string
cross-reference(s).
* lisp/international/mule.el (add-to-coding-system-list): Fix ambiguous
doc string cross-reference(s).
* lisp/progmodes/cc-fonts.el (c-font-lock-keywords-3)
(c++-font-lock-keywords-3, objc-font-lock-keywords-3)
(java-font-lock-keywords-3, idl-font-lock-keywords-3)
(pike-font-lock-keywords-3): Fix ambiguous doc string
cross-reference(s).
* lisp/progmodes/compile.el (compile): Fix ambiguous doc string
cross-reference(s).
* lisp/progmodes/etags.el (tags-table-files)
(tags-table-files-function, tags-included-tables-function): Fix
ambiguous doc string cross-reference(s).
* lisp/progmodes/gdb-mi.el (gdb, gdb-setup-windows)
(gdb-restore-windows): Fix ambiguous doc string
cross-reference(s).
* lisp/textmodes/flyspell.el (flyspell-mark-duplications-flag)
(flyspell-default-deplacement-commands): Fix ambiguous doc string
cross-reference(s).
* lisp/textmodes/ispell.el (ispell-accept-output): Fix ambiguous doc
string cross-reference(s).
* lisp/textmodes/sgml-mode.el (html-tag-help): Fix ambiguous doc string
cross-reference(s).
* lisp/vc/compare-w.el (compare-ignore-whitespace)
(compare-ignore-case, compare-windows-dehighlight): Fix ambiguous
doc string cross-reference(s).
* lisp/vc/diff.el (diff): Fix ambiguous doc string cross-reference(s).
* src/insdel.c (Fcombine_after_change_execute, syms_of_insdel): Fix
ambiguous doc string cross-reference(s).
* src/keyboard.c (Fcommand_execute, syms_of_keyboard): Fix ambiguous
doc string cross-reference(s).
* src/window.c (Fwindow_point, syms_of_window): Fix ambiguous doc
string cross-reference(s).
Fixes: debbugs:12686
2013-01-11 18:08:55 -05:00
Stefan Monnier
3f9549e874
Merge from emacs-24
2013-01-09 22:43:02 -05:00
Glenn Morris
89c0dda852
execute-extended-command prompt fix (bug#13395)
...
* lisp/simple.el (execute-extended-command): Doc fix.
Bind prefix-arg around read-extended-command, for prompt.
2013-01-09 16:23:14 -05:00
Stefan Monnier
a464813702
* lisp/simple.el: Use lexical-binding.
...
(primitive-undo): Use pcase.
(minibuffer-history-isearch-push-state): Use a closure.
2013-01-08 15:15:15 -05:00
Aaron S. Hawley
3bace969f3
* lisp/simple.el (primitive-undo): Move from undo.c.
...
* src/undo.c (Fprimitive_undo): Move to simple.el.
(syms_of_undo): Remove declaration for Sprimitive_undo.
* test/automated/undo-tests.el: New file.
2013-01-08 14:13:31 -05:00
Paul Eggert
0877d0dc24
Merge from emacs-24; up to 2012-12-06T01:39:03Z!monnier@iro.umontreal.ca
2013-01-02 08:13:04 -08:00
Paul Eggert
ab422c4d68
Update copyright notices for 2013.
2013-01-01 09:11:05 +00:00
Michael Albinus
0e9c769371
* simple.el (process-file): Overwrite stderr file, if exists.
2012-12-21 09:10:26 +01:00
Chong Yidong
aa26f34509
* simple.el (transpose-subr-1): Preserve marker positions
...
by changing the insertion sequence.
Fixes: debbugs:13122
2012-12-21 13:42:59 +08:00
Kelly Dean
05c22d878f
* simple.el (kill-region): Deactivate mark even for empty regions. (tiny change)
...
Fixes: debbugs:13169
2012-12-21 11:49:28 +08:00
Glenn Morris
265c2fbf11
Merge from emacs-24; up to 2012-11-26T19:56:14Z!monnier@iro.umontreal.ca
2012-12-09 18:00:42 -08:00
Chong Yidong
2c066ad3ae
* simple.el (set-mark-default-inactive): Mark for removal after 24.3.
2012-12-09 11:44:59 +08:00
Chong Yidong
5dea55d2fa
* simple.el (set-mark-default-inactive): Delete accidentally-introduced option.
...
(set-mark-command, exchange-point-and-mark): Remove calls.
2012-12-09 11:40:09 +08:00
Dani Moncayo
6ce49f2459
* lisp/simple.el (just-one-space): Doc fix.
...
* doc/emacs/killing.texi (Deletion): Doc fix.
Fixes: debbugs:12748
2012-12-08 11:25:28 +08:00
Glenn Morris
c5bc2d1d05
Merge from emacs-24; up to 2012-11-23T06:23:28Z!cyd@gnu.org
2012-12-02 17:08:31 -08:00
Kelly Dean
31646597cd
* lisp/simple.el (activate-mark): Run activate-mark-hook.
...
Fixes: debbugs:13027
2012-11-29 15:09:37 -05:00
Chong Yidong
8ecba97da2
* simple.el (transient-mark-mode): Doc fix.
...
Fixes: debbugs:11523
2012-11-28 15:16:45 +08:00
Eli Zaretskii
7cf95797af
Fix bug #12927 with scrolling under hl-line-mode and scroll-conservatively.
...
lisp/simple.el (line-move): Don't call line-move-partial if
scroll-conservatively is in effect.
2012-11-20 19:44:04 +02:00
Daniel Colascione
36a305a723
Merge from trunk
2012-10-07 14:31:58 -08:00
Chong Yidong
a97dc38060
Minor code tweak for delete-trailing-whitespace.
...
* lisp/simple.el (delete-trailing-whitespace): Avoid an unnecessary
restriction change.
2012-09-30 16:41:37 +08:00
Chong Yidong
59f7af816e
Use declare forms, where possible, to mark obsolete functions.
...
* lisp/allout.el (allout-passphrase-hint-string): Likewise.
(allout-init): Use a declare form to mark obsolete.
* lisp/calendar/calendar.el (calendar-version):
* lisp/calendar/icalendar.el (icalendar-extract-ical-from-buffer)
(icalendar-convert-diary-to-ical):
* lisp/cus-edit.el (custom-mode):
* lisp/ansi-color.el (ansi-color-unfontify-region):
* lisp/international/latin1-disp.el (latin1-char-displayable-p):
* lisp/progmodes/cwarn.el (turn-on-cwarn-mode):
* lisp/progmodes/which-func.el (which-func-update-1): Use
define-obsolete-function-alias.
* lisp/bookmark.el (bookmark-jump-noselect): Use a declare form to mark
this function obsolete.
* lisp/calendar/cal-x.el (calendar-two-frame-setup)
(calendar-only-one-frame-setup, calendar-one-frame-setup):
* lisp/calendar/calendar.el (american-calendar, european-calendar)
(calendar-for-loop):
* lisp/comint.el (comint-dynamic-simple-complete)
(comint-dynamic-complete-as-filename, comint-unquote-filename):
* lisp/desktop.el (desktop-load-default):
* lisp/dired-x.el (dired-omit-here-always)
(dired-hack-local-variables, dired-default-directory):
* lisp/emacs-lisp/derived.el (derived-mode-class):
* lisp/emacs-lisp/timer.el (timer-set-time-with-usecs):
* lisp/emacs-lock.el (toggle-emacs-lock):
* lisp/epa.el (epa-display-verify-result):
* lisp/epg.el (epg-sign-keys, epg-start-sign-keys)
(epg-passphrase-callback-function):
* lisp/eshell/esh-util.el (eshell-for):
* lisp/eshell/eshell.el (eshell-remove-from-window-buffer-names)
(eshell-add-to-window-buffer-names):
* lisp/files.el (locate-file-completion):
* lisp/imenu.el (imenu-example--create-c-index)
(imenu-example--create-lisp-index)
(imenu-example--lisp-extract-index-name)
(imenu-example--name-and-position):
* lisp/international/mule-cmds.el (princ-list):
* lisp/international/mule-diag.el (decode-codepage-char):
* lisp/international/mule-util.el (detect-coding-with-priority):
* lisp/iswitchb.el (iswitchb-read-buffer):
* lisp/mail/mailalias.el (mail-complete):
* lisp/mail/sendmail.el (mail-sent-via):
* lisp/mouse.el (mouse-popup-menubar-stuff, mouse-popup-menubar)
(mouse-major-mode-menu):
* lisp/password-cache.el (password-read-and-add):
* lisp/pcomplete.el (pcomplete-parse-comint-arguments):
* lisp/progmodes/sh-script.el (sh-maybe-here-document):
* lisp/replace.el (query-replace-regexp-eval):
* lisp/savehist.el (savehist-load):
* lisp/simple.el (choose-completion-delete-max-match):
* lisp/term.el (term-dynamic-simple-complete):
* lisp/vc/ediff-init.el (ediff-check-version):
* lisp/vc/ediff-wind.el (ediff-choose-window-setup-function-automatically):
* lisp/vc/vc.el (vc-diff-switches-list):
* lisp/view.el (view-return-to-alist-update): Likewise.
* lisp/iswitchb.el (iswitchb-read-buffer): Move code of
iswitchb-define-mode-map here, and delete that obsolete function.
* lisp/subr.el (eval-next-after-load, makehash, insert-string)
(assoc-ignore-representation, assoc-ignore-case): Use declare to
mark obsolete.
(mode-line-inverse-video): Variable deleted.
* lisp/emacs-lisp/byte-run.el (make-obsolete): Doc fix; emphasize that
this applies to functions.
* lisp/erc/erc.el (erc-send-command): Use define-obsolete-function-alias.
* lisp/international/mule-util.el (string-to-sequence): Remove.
* lisp/net/newst-backend.el (newsticker-cache-filename):
* lisp/net/newst-treeview.el (newsticker-groups-filename): Fix
incorrect obsolescence declaration.
* lisp/net/snmp-mode.el (snmp-font-lock-keywords-3): Don't use obsolete
font-lock-reference-face.
* lisp/url/url-parse.el (url-recreate-url-attributes):
* lisp/url/url-util.el (url-generate-unique-filename): Use declare to mark
obsolete.
* src/xdisp.c (mode_line_inverse_video): Delete obsolete variable.
2012-09-25 12:13:02 +08:00
Chong Yidong
3171e30301
* simple.el (read-only-mode): Doc fix.
2012-09-22 23:46:57 +08:00
Chong Yidong
c88b867fec
Misc doc fixes.
...
* searching.texi (Replacing Match): Minor clarification.
* lisp/repeat.el (repeat): Doc fix.
* lisp/simple.el (shell-command-on-region): Doc fix.
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix.
* cmds.c (Fforward_char, Fbackward_char): Doc fix.
* editfns.c (Fline_beginning_position): Doc fix.
(Fline_end_position): Doc fix.
* minibuf.c (Finternal_complete_buffer): Doc fix.
* search.c (Freplace_match): Doc fix.
Fixes: debbugs:12325 debbugs:12391 debbugs:12416 debbugs:12414 debbugs:10909 debbugs:12348
2012-09-22 23:24:26 +08:00
Chong Yidong
82f8cd940f
Fix auto-save and locking for indirect buffers.
...
* lisp/simple.el (undo): Handle indirect buffers.
* buffer.c (Fset_buffer_modified_p): Handle indirect buffers.
Fixes: debbugs:8207
2012-09-22 11:07:39 +08:00
Daniel Colascione
2ab329f3b5
Merge from trunk
2012-09-17 04:07:36 -08:00
Daniel Colascione
0fda9b750e
Implement cygw32
...
Here, we use the generic window-system configuration system we just
implemented to support the w32 window-system in the mainline build
under Cygwin. (Previously, the w32 window system could only be
compiled as part of the NT-native Emacs build process.)
The changes in this patch need to be applied atomically in order to
avoid breaking Emacs. The changes include:
- Changes throughout the Lisp and C code to not assume that
NT Emacs and the w32 window system are synonymous.
- Wiring up the regular select(2) event loop to Windows messages
- Cleaning up the w32 drag-and-drop receiving code.
- Exposing Cygwin path conversion functions to elisp.
- Unicode file dialog support when compiling for Cygwin.
- Splitting the w32 term lisp initialization code into code
applicable to any w32 window-system and code specific to
system-type windows-nt.
- Integrating the old and new w32 code into the build system.
2012-09-17 03:55:02 -08:00
Chong Yidong
e5c2edf79b
Add a utility function buffer-narrowed-p, and use it.
...
* lisp/subr.el (buffer-narrowed-p): New function.
* lisp/ses.el (ses-widen):
* lisp/simple.el (count-words--buffer-message):
* lisp/net/browse-url.el (browse-url-of-buffer): Use it
* lisp/simple.el (count-words-region): Don't signal an error if there
is a non-nil prefix arg and the mark is not set.
* doc/lispref/positions.texi (Narrowing): Document buffer-narrowed-p.
2012-09-07 16:58:31 +08:00
Chong Yidong
c640e87d07
* lisp/simple.el (count-words--buffer-message): Fix narrowing check.
2012-09-07 16:36:25 +08:00
Glenn Morris
d67d3afd3a
* lisp/simple.el (undo): Tweak message in undo-only case.
...
Fixes: debbugs:12283
2012-09-01 17:56:03 -07:00