summaryrefslogtreecommitdiff
path: root/lisp/progmodes/hideif.el
AgeCommit message (Collapse)Author
2021-06-16; * lisp/progmodes/hideif.el (hif-unicode-prefix-regexp): Stray `\`.Mattias Engdegård
2021-06-03Fix up previous hideif change to avoid a compilation warningLars Ingebrigtsen
* lisp/progmodes/hideif.el (hide-ifdef-expand-reinclusion-protection): Move to avoid a compilation warning.
2021-06-03* lisp/progmodes/hideif.el: Fix initial version for new variablesLuke Lee
(hide-ifdef-verbose, hide-ifdef-evalulate-enter-hook) (hide-ifdef-evalulate-leave-hook): Fix initial version to 28.1. (hide-ifdef-expand-reinclusion-protection): Obsolete since 28.1, rename to `hide-ifdef-expand-reinclusion-guard' instead.
2021-06-02* lisp/progmodes/hideif.el: update for new C++ standards and extensionsLuke Lee
Matching gcc/clang behavior on stringification including keeping the same number of white spaces. C++11, C++14, C++17 and GCC literals extension are supported. Preprocessing time floating point operation supported but limited to Emacs internal representation which is C data type "double". Also support some frequently used keywords like __LINE__, __TIME__, __DATE__ and so on. (hif-clear-all-ifdef-defined, hif-show-all, hif-after-revert-function) (hide-ifdef-define, hide-ifdefs, show-ifdefs): interactive behavior changes, mainly to allow operation within the marked region. (hif-eval, hif-__LINE__, hif-__FILE__, hif-__COUNTER__, hif-__cplusplus) (hif-__DATE__, hif-__TIME__, hif-__STDC__, hif-__STDC_VERSION__) (hif-__STDC_HOST__, hif-__FILE__, hif-full-match, hif-is-number, hif-is-float) (hif-delete-char-in-string, hif-string-to-decfloat, hif-string-to-hexfloat) (hif-strtok, hif-is-white, hif-backward-comment, hif-split-signed-token) (hif-keep-single, hif-display-macro): new functions. (hide-ifdef-verbose, hide-ifdef-evalulate-enter-hook) (hide-ifdef-evalulate-leave-hook, hide-ifdef-evaluator, hif-predefine-alist) (hif-numtype-suffix-regexp, hif-bin-regexp, hif-hex-regexp, hif-oct-regexp) (hif-dec-regexp, hif-decfloat-regexp, hif-hexfloat-regexp) (hif-unicode-prefix-regexp, hif-verbose-define-count): new constants or variables. (hif-macroref-regexp, hif-token-alist, hif-token-regexp) (hif-string-literal-regexp): modified constants for faster regexp processing. (hide-ifdef-expand-reinclusion-guard): renamed from `hide-ifdef-expand-reinclusion-protection' to match commonly used term. (hif-lookup, hif-defined, hif-string-to-number, hif-tokenize, hif-nextoken) (hif-if-valid-identifier-p, hif-define-operator, hif-expand-token-list) (hif-parse-exp, hif-math, hif-factor, hif-get-argument-list, hif-stringify) (hif-token-concat, hif-mathify, hif-comma, hif-token-stringification) (hif-token-concatenation, hif-macro-supply-arguments, hif-evaluate-macro) (hif-find-define, hif-add-new-defines, hide-ifdef-guts, hif-undefine-symbol) (hide-ifdef-set-define-alist, hide-ifdef-use-define-alist): modified functions for new internal data representation, mainly for stringification and white space preservation. Also better error handling to report source line number and more informative error messages.
2021-03-31Fix incorrect regular expression for more general text replacements.Luke Lee
* lisp/progmodes/hideif.el (hif-evaluate-macro): fix regexp to trim off leading/trailing spaces, but not within.
2021-03-21Allow hide-ifdef-guts to work in buffers not visiting filesZhiwei Chen
* lisp/progmodes/hideif.el (hide-ifdef-guts): Allow working in buffers not visiting files (bug#47279). Copyright-paperwork-exempt: yes
2021-01-01Update copyright year to 2021Paul Eggert
Run "TZ=UTC0 admin/update-copyright".
2020-12-19Shorten over-wide docstrings in defcustomsStefan Kangas
* lisp/calc/calc.el (calc-embedded-announce-formula-alist) (calc-embedded-open-formula, calc-embedded-close-formula) (calc-matrix-mode): * lisp/cedet/semantic/imenu.el (semantic-imenu-sort-bucket-function): * lisp/emacs-lisp/find-func.el (find-feature-regexp): * lisp/emulation/cua-base.el (cua-paste-pop-rotate-temporarily): * lisp/emulation/viper-init.el (viper-fast-keyseq-timeout) (viper-related-files-and-buffers-ring): * lisp/emulation/viper-keym.el (viper-want-ctl-h-help): * lisp/gnus/gnus-art.el (gnus-article-banner-alist): * lisp/gnus/gnus-group.el (gnus-keep-same-level): * lisp/gnus/gnus-score.el (gnus-adaptive-word-length-limit): * lisp/gnus/gnus-sum.el (gnus-inhibit-user-auto-expire): * lisp/gnus/gnus-uu.el (gnus-uu-ignore-files-by-type) (gnus-uu-do-not-unpack-archives) (gnus-uu-unmark-articles-not-decoded) (gnus-uu-correct-stripped-uucode, gnus-uu-save-in-digest) (gnus-uu-post-include-before-composing): * lisp/gnus/gnus.el (gnus-use-long-file-name) (gnus-install-group-spam-parameters): * lisp/gnus/message.el (message-cite-style): * lisp/gnus/nnmail.el (nnmail-split-fancy-with-parent-ignore-groups) (nnmail-cache-ignore-groups): * lisp/ido.el (ido-rewrite-file-prompt-functions): * lisp/mail/feedmail.el (feedmail-fiddle-plex-user-list) (feedmail-spray-address-fiddle-plex-list): * lisp/mh-e/mh-e.el (mh-annotate-msg-hook): * lisp/net/imap.el (imap-process-connection-type): * lisp/net/rcirc.el (rcirc-omit-threshold): * lisp/net/tramp-sh.el (tramp-copy-size-limit): * lisp/nxml/nxml-mode.el (nxml-default-buffer-file-coding-system): * lisp/obsolete/landmark.el (landmark-max-stall-time): * lisp/obsolete/tls.el (tls-checktrust): * lisp/org/org-indent.el (org-indent-mode-turns-off-org-adapt-indentation) (org-indent-mode-turns-on-hiding-stars): * lisp/org/org-protocol.el (org-protocol-project-alist): * lisp/progmodes/cc-vars.el (c-doc-comment-style): * lisp/progmodes/cperl-mode.el (cperl-indent-subs-specially): * lisp/progmodes/flymake-proc.el (flymake-proc-allowed-file-name-masks): * lisp/progmodes/hideif.el (hide-ifdef-expand-reinclusion-protection): * lisp/simple.el (minibuffer-history-case-insensitive-variables): * lisp/tab-bar.el (tab-bar-close-last-tab-choice): * lisp/textmodes/reftex-vars.el (reftex-special-environment-functions): * lisp/vc/ediff-init.el (ediff-startup-hook, ediff-cleanup-hook) (ediff-metachars): * lisp/vc/ediff-merg.el (ediff-show-clashes-only): * lisp/vc/ediff-mult.el (ediff-default-filtering-regexp): Shorten doc strings to not exceed 80-column limits. (Bug#44858)
2020-12-14Prefer setq to set+quoteStefan Kangas
* lisp/cedet/semantic/senator.el (senator-lazy-highlight-update): * lisp/emulation/edt.el (edt-find, edt-restore-key) (edt-remember): * lisp/eshell/em-ls.el (eshell-ls--insert-directory): * lisp/net/tramp-sh.el (tramp-sh-handle-write-region): * lisp/progmodes/hideif.el (hide-ifdef-mode): * test/lisp/url/url-future-tests.el (url-future-tests): Prefer setq to set+quote.
2020-12-09Prefer setq-local in some remaining progmodesStefan Kangas
* lisp/progmodes/dcl-mode.el (dcl-mode): * lisp/progmodes/hideif.el (hide-ifdef-mode) (hide-ifdef-toggle-shadowing): * lisp/progmodes/ps-mode.el (ps-mode, ps-run-mode): * lisp/progmodes/xscheme.el (xscheme-start) (local-set-scheme-interaction-buffer, scheme-interaction-mode): Prefer setq-local.
2020-10-02Merge from origin/emacs-27Glenn Morris
78eacf31e8 ; Fix many typos in symbols in docs and comments d5d12707d6 * doc/misc/flymake.texi (Using Flymake): Fix a typo. (Bug... # Conflicts: # lisp/allout.el # lisp/progmodes/ebrowse.el
2020-10-02; Fix many typos in symbols in docs and commentsStefan Kangas
2020-09-21; Fix typosStefan Kangas
2020-01-01Merge from origin/emacs-27Paul Eggert
186152ba40 Pacify gcc -Wunused-function on Ubuntu 18.04.3 4cd143aded Fix copyright years by hand 365e01cc9f Update copyright year to 2020 cd2c156163 ; * etc/NEWS: Make the description of XDG fallback more ac... # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex
2020-01-01Update copyright year to 2020Paul Eggert
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2019-12-26Use regexp type for regexps in defcustom declarationsMattias Engdegård
* lisp/calendar/diary-lib.el (diary-face-attrs): * lisp/cedet/semantic/db-ebrowse.el (semanticdb-ebrowse-file-match): * lisp/cedet/srecode/document.el (srecode-document-autocomment-common-nouns-abbrevs) (srecode-document-autocomment-function-alist) (srecode-document-autocomment-return-first-alist) (srecode-document-autocomment-return-last-alist) (srecode-document-autocomment-param-alist) (srecode-document-autocomment-param-type-alist): * lisp/desktop.el (desktop-clear-preserve-buffers): * lisp/elide-head.el (elide-head-headers-to-hide): * lisp/erc/erc-backend.el (erc-encoding-coding-alist): * lisp/erc/erc-ezbounce.el (erc-ezb-regexp): * lisp/files.el (auto-save-file-name-transforms): * lisp/gnus/deuglify.el (gnus-outlook-deuglify-attrib-cut-regexp) (gnus-outlook-deuglify-attrib-verb-regexp) (gnus-outlook-deuglify-attrib-end-regexp): * lisp/gnus/gnus-fun.el (gnus-x-face-omit-files, gnus-face-omit-files): * lisp/gnus/spam.el (spam-spamassassin-positive-spam-flag-header): * lisp/htmlfontify.el (hfy-src-doc-link-unstyle): * lisp/info-look.el (info-lookup-file-name-alist): * lisp/international/rfc1843.el (rfc1843-newsgroups-regexp): * lisp/mail/feedmail.el (feedmail-queue-slug-suspect-regexp): * lisp/mail/rmail-spam-filter.el (rsf-white-list, rsf-definitions-alist): * lisp/man.el (Man-name-local-regexp): * lisp/net/ange-ftp.el (ange-ftp-dumb-unix-host-regexp): * lisp/net/newst-backend.el (newsticker-auto-mark-filter-list): * lisp/net/rcirc.el (rcirc-authinfo, rcirc-coding-system-alist): * lisp/net/tramp-adb.el (tramp-adb-prompt): * lisp/org/org-agenda.el (org-agenda-hide-tags-regexp) (org-agenda-category-icon-alist): * lisp/org/org-protocol.el (org-protocol-data-separator): * lisp/org/org-table.el (org-table-number-regexp): * lisp/org/ox-latex.el (org-latex-known-warnings): * lisp/progmodes/bug-reference.el (bug-reference-bug-regexp): * lisp/progmodes/hideif.el (hide-ifdef-header-regexp): * lisp/progmodes/idlw-help.el (idlwave-help-doclib-name) (idlwave-help-doclib-keyword): * lisp/progmodes/idlwave.el (idlwave-no-change-comment): * lisp/progmodes/python.el (python-shell-prompt-input-regexps) (python-shell-prompt-output-regexps, python-shell-prompt-regexp) (python-shell-prompt-block-regexp, python-shell-prompt-output-regexp) (python-shell-prompt-pdb-regexp, python-shell-compilation-regexp-alist) (python-pdbtrack-stacktrace-info-regexp): * lisp/progmodes/sql.el (sql-send-terminator, sql-ansi-statement-starters): * lisp/speedbar.el (speedbar-directory-unshown-regexp) (speedbar-file-unshown-regexp): * lisp/textmodes/flyspell.el (flyspell-mark-duplications-exceptions) (flyspell-tex-command-regexp): * lisp/textmodes/paragraphs.el (sentence-end-base): * lisp/textmodes/tildify.el (tildify-pattern, tildify-space-pattern): * lisp/vc/ediff-init.el (ediff-metachars): * lisp/vc/vc-git.el (vc-git-root-log-format): * lisp/vc/vc-hg.el (vc-hg-root-log-format): * lisp/whitespace.el (whitespace-indentation-regexp) (whitespace-space-after-tab-regexp): * lisp/woman.el (woman-manpath-man-regexp) (woman-imenu-generic-expression): Use 'regexp' instead of 'string' as type for values that are regexps in defcustom declarations.
2019-08-21Make hide-ifdef-mode-prefix-key customisableLars Ingebrigtsen
* lisp/progmodes/hideif.el (hide-ifdef-mode-prefix-key): Make into a defcustom since it seems like this is something that should be user-customisable (bug#8922).
2019-07-06Replace manually crafted hex regexes with [:xdigit:]Konstantin Kharlamov
* admin/charsets/mapconv: * build-aux/gitlog-to-changelog (parse_amend_file, git_dir_option): * lisp/progmodes/verilog-mode.el (verilog-delay-re): (verilog-type-font-keywords, verilog-read-always-signals-recurse): (verilog-is-number): * lisp/progmodes/vera-mode.el (vera-font-lock-keywords): * test/src/emacs-module-tests.el (mod-test-sum-test): * lisp/xml.el: (xml--entity-replacement-text): * lisp/version.el (emacs-repository-version-git): * lisp/textmodes/sgml-mode.el (sgml-quote): * lisp/textmodes/css-mode.el (css-escapes-re) (css--colors-regexp): * lisp/progmodes/prolog.el (prolog-syntax-propertize-function): * lisp/progmodes/hideif.el (hif-token-regexp, hif-tokenize): * lisp/progmodes/ebnf-dtd.el: (ebnf-dtd-attlistdecl) (ebnf-dtd-entitydecl, ebnf-dtd-lex): * lisp/progmodes/ebnf-ebx.el (ebnf-ebx-hex-character): * lisp/progmodes/ebnf-abn.el (ebnf-abn-character): * lisp/progmodes/cperl-mode.el (cperl-highlight-charclass) (cperl-find-pods-heres): * lisp/progmodes/cc-mode.el (c-maybe-quoted-number-head) (c-maybe-quoted-number, c-parse-quotes-before-change) (c-parse-quotes-after-change, c-quoted-number-head-before-point) (c-quoted-number-straddling-point): * lisp/progmodes/ada-mode.el (featurep, ada-in-numeric-literal-p) (ada-font-lock-keywords): * lisp/org/org-mobile.el (org-mobile-copy-agenda-files) * lisp/org/org-table.el (org-table-number-regexp): (org-mobile-update-checksum-for-capture-file): * lisp/nxml/xsd-regexp.el (xsdre-gen-categories): * lisp/nxml/xmltok.el (let*): * lisp/nxml/rng-xsd.el (rng-xsd-convert-hex-binary) (rng-xsd-convert-any-uri): * lisp/nxml/rng-uri.el (rng-uri-file-name-1) (rng-uri-unescape-multibyte, rng-uri-unescape-unibyte) (rng-uri-unescape-unibyte-match) (rng-uri-unescape-unibyte-replace): * lisp/nxml/rng-cmpct.el (rng-c-process-escapes): * lisp/nxml/nxml-maint.el (nxml-insert-target-repertoire-glyph-set): * lisp/net/shr-color.el (shr-color->hexadecimal): * lisp/mail/rfc2231.el (rfc2231-decode-encoded-string): * lisp/international/mule-cmds.el (read-char-by-name): * lisp/htmlfontify.el (hfy-hex-regex): * lisp/gnus/nneething.el (nneething-decode-file-name): * lisp/gnus/mml-sec.el (mml-secure-find-usable-keys): * lisp/gnus/gnus-art.el (gnus-button-mid-or-mail-heuristic-alist): * lisp/faces.el (read-color): * lisp/epg.el (epg--status-ERRSIG, epg--status-VALIDSIG) (epg--status-SIG_CREATED, epg--decode-percent-escape) (epg--decode-hexstring, epg--decode-quotedstring) (epg-dn-from-string): * lisp/emulation/cua-rect.el (cua-incr-rectangle): * lisp/dnd.el (dnd-unescape-uri): * lisp/cedet/semantic/lex.el (semantic-lex-number-expression): * lisp/cedet/semantic/java.el (semantic-java-number-regexp): * lisp/calc/calc-lang.el (pascal): * lisp/calc/calc-ext.el (math-read-number-fancy): * lisp/calc/calc-aent.el (math-read-token): Replace various combinations of [0-9a-fA-F] with [[:xdigit:]]. (Bug#36167)
2018-12-31Merge from origin/emacs-26Paul Eggert
2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
2019-01-01Update copyright year to 2019Paul Eggert
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
2018-12-17Some more flatten-tree aliasesPaul Eggert
* lisp/allout.el (allout-flatten): * lisp/progmodes/hideif.el (hif-flatten): Now an obsolete alias for flatten-tree. All callers changed. * lisp/org/org-protocol.el (org-protocol-flatten): Make it an alias for flatten-tree if available. * lisp/progmodes/js.el (js--flatten-list): Remove alias. We shouldn’t need obsolete function aliases for private functions.
2018-08-21Audit use of lsh and fix glitchesPaul Eggert
I audited use of lsh in the Lisp source code, and fixed the glitches that I found. While I was at it, I replaced uses of lsh with ash when either will do. Replacement is OK when either argument is known to be nonnegative, or when only the low-order bits of the result matter, and is a (minor) win since ash is a bit more solid than lsh nowadays, and is a bit faster. * lisp/calc/calc-ext.el (math-check-fixnum): Prefer most-positive-fixnum to (lsh -1 -1). * lisp/vc/vc-hg.el (vc-hg-state-fast): When testing fixnum width, prefer (zerop (ash most-positive-fixnum -32)) to (zerop (lsh -1 32)) (Bug#32485#11). * lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode): Tighten sanity-check for bytecode overflow, by checking that the result of (ash pc -8) is nonnegative. Formerly this check was not needed since lsh was used and the number overflowed differently. * lisp/net/dns.el (dns-write): Fix some obvious sign typos in shift counts. Evidently this part of the code has never been exercised. * lisp/progmodes/hideif.el (hif-shiftleft, hif-shiftright): * lisp/term/common-win.el (x-setup-function-keys): Simplify. * admin/unidata/unidata-gen.el, admin/unidata/uvs.el: * doc/lispref/keymaps.texi, doc/lispref/syntax.texi: * doc/misc/calc.texi, doc/misc/cl.texi, etc/NEWS.19: * lisp/arc-mode.el, lisp/calc/calc-bin.el, lisp/calc/calc-comb.el: * lisp/calc/calc-ext.el, lisp/calc/calc-math.el: * lisp/cedet/semantic/wisent/comp.el, lisp/composite.el: * lisp/disp-table.el, lisp/dos-fns.el, lisp/edmacro.el: * lisp/emacs-lisp/bindat.el, lisp/emacs-lisp/byte-opt.el: * lisp/emacs-lisp/bytecomp.el, lisp/emacs-lisp/cl-extra.el: * lisp/erc/erc-dcc.el, lisp/facemenu.el, lisp/gnus/message.el: * lisp/gnus/nndoc.el, lisp/gnus/nnmaildir.el, lisp/image.el: * lisp/international/ccl.el, lisp/international/fontset.el: * lisp/international/mule-cmds.el, lisp/international/mule.el: * lisp/json.el, lisp/mail/binhex.el, lisp/mail/rmail.el: * lisp/mail/uudecode.el, lisp/md4.el, lisp/net/dns.el: * lisp/net/ntlm.el, lisp/net/sasl.el, lisp/net/socks.el: * lisp/net/tramp.el, lisp/obsolete/levents.el: * lisp/obsolete/pgg-parse.el, lisp/org/org.el: * lisp/org/ox-publish.el, lisp/progmodes/cc-defs.el: * lisp/progmodes/ebnf2ps.el, lisp/progmodes/hideif.el: * lisp/ps-bdf.el, lisp/ps-print.el, lisp/simple.el: * lisp/tar-mode.el, lisp/term/common-win.el: * lisp/term/tty-colors.el, lisp/term/xterm.el, lisp/vc/vc-git.el: * lisp/vc/vc-hg.el, lisp/x-dnd.el, test/src/data-tests.el: Prefer ash to lsh when either will do.
2018-07-230x%x → %#x in elisp formatsPaul Eggert
* lisp/emacs-lisp/cl-print.el (cl-print-object): * lisp/profiler.el (profiler-format-entry): * lisp/progmodes/hideif.el (hif-evaluate-macro): Prefer %#x to 0x%x in elisp formats when formatting arbitrary integers, as it’ll produce more-readable output with negative args should we change how negative values are printed with %x.
2018-07-01Optionally add argument description in minor mode DOC (bug#10754)John Shahid
Add a paragraph to minor mode's docstring documenting the mode's ARG usage if the supplied docstring doesn't already contain the word "ARG". * easy-mmode.el (easy-mmode--arg-docstring): New const. (easy-mmode--arg-docstring): New function. (define-minor-mode): Use them. Remove argument documentation from all minor modes.
2018-01-01Update copyright year to 2018Paul Eggert
Run admin/update-copyright.
2017-10-27Fix some duplicate words typosGlenn Morris
* lisp/erc/erc.el (erc-hide-current-message-p): * lisp/progmodes/flymake-proc.el (flymake-proc-diagnostic-type-pred): * doc/lispref/display.texi (Bidirectional Display, Delayed Warnings): * doc/lispref/functions.texi (Defining Functions): * doc/lispref/os.texi (Terminal-Specific): * doc/misc/sem-user.texi (Analyzer Debug): * doc/misc/srecode.texi (Special Variables): Fix typos.
2017-09-13Prefer HTTPS to FTP and HTTP in documentationPaul Eggert
Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
2017-01-01Merge from origin/emacs-25Paul Eggert
2e2a806 Fix copyright years by hand 5badc81 Update copyright year to 2017
2016-12-31Update copyright year to 2017Paul Eggert
Run admin/update-copyright.
2016-07-10An efficient built-in mapcanMario Lang
A built-in version of `mapcan' avoids consing up (and GC'ing) the intermediate list. * src/fns.c (Fmapcan): New built-in. (syms_of_fns): Define. * lisp/emacs-lisp/cl.el (mapcan): Remove defalias. * lisp/emacs-lisp/cl-extra.el (cl-mapcan): Use built-in `mapcan' if only one sequence is provided. * lisp/progmodes/hideif.el (hif-delimit): * lisp/dired-aux.el (dired-do-find-regexp): * lisp/woman.el (woman-parse-colon-path): Use `mapcan' instead of `cl-mapcan'. * lisp/woman.el (eval-when-compile): Require 'cl-lib only when compiling. * lisp/mouse.el (mouse-buffer-menu-map): * lisp/net/pop3.el (pop3-uidl-dele): * lisp/progmodes/gud.el (gud-jdb-build-source-files-list): * lisp/cedet/semantic/db-find.el (semanticdb-fast-strip-find-results): * lisp/cedet/semantic/symref/grep.el (semantic-symref-derive-find-filepatterns): * lisp/gnus/nnmail.el (nnmail-split-it): * lisp/gnus/gnus-sum.el (gnus-articles-in-thread): * lisp/gnus/gnus-registry.el (gnus-registry-sort-addresses): * lisp/gnus/gnus-util.el (gnus-mapcar): Use `mapcan'.
2016-03-21Fix problems caused by new implementation of sub-word modeEli Zaretskii
* lisp/subr.el (forward-word-strictly, backward-word-strictly): New functions. (word-move-empty-char-table): New variable. * etc/NEWS: Mention 'forward-word-strictly' and 'backward-word-strictly'. * doc/lispref/positions.texi (Word Motion): Document 'find-word-boundary-function-table', 'forward-word-strictly', and 'backward-word-strictly'. (Bug#22560) * src/syntax.c (syms_of_syntax) <find-word-boundary-function-table>: Doc fix. * lisp/wdired.el (wdired-xcase-word): * lisp/textmodes/texnfo-upd.el (texinfo-copy-node-name) (texinfo-copy-section-title, texinfo-start-menu-description) (texinfo-copy-menu-title, texinfo-specific-section-type) (texinfo-insert-node-lines, texinfo-copy-next-section-title): * lisp/textmodes/texinfo.el (texinfo-clone-environment) (texinfo-insert-@end): * lisp/textmodes/texinfmt.el (texinfo-format-scan) (texinfo-anchor, texinfo-multitable-widths) (texinfo-multitable-item): * lisp/textmodes/tex-mode.el (latex-env-before-change): * lisp/textmodes/flyspell.el (texinfo-mode-flyspell-verify): * lisp/skeleton.el (skeleton-insert): * lisp/simple.el (count-words): * lisp/progmodes/vhdl-mode.el (vhdl-beginning-of-libunit) (vhdl-beginning-of-defun, vhdl-beginning-of-statement-1) (vhdl-update-sensitivity-list, vhdl-template-block) (vhdl-template-break, vhdl-template-case, vhdl-template-default) (vhdl-template-default-indent, vhdl-template-for-loop) (vhdl-template-if-then-use, vhdl-template-bare-loop) (vhdl-template-nature, vhdl-template-procedural) (vhdl-template-process, vhdl-template-selected-signal-asst) (vhdl-template-type, vhdl-template-variable) (vhdl-template-while-loop, vhdl-beginning-of-block) (vhdl-hooked-abbrev, vhdl-port-copy, vhdl-hs-forward-sexp-func): * lisp/progmodes/verilog-mode.el (verilog-backward-sexp) (verilog-forward-sexp, verilog-beg-of-statement) (verilog-set-auto-endcomments, verilog-backward-token) (verilog-do-indent): * lisp/progmodes/vera-mode.el (vera-guess-basic-syntax) (vera-indent-block-closing): * lisp/progmodes/simula.el (simula-context) (simula-backward-up-level, simula-forward-down-level) (simula-previous-statement, simula-next-statement) (simula-skip-comment-backward, simula-calculate-indent) (simula-find-if, simula-electric-keyword): * lisp/progmodes/sh-script.el (sh-smie--rc-newline-semi-p): * lisp/progmodes/ruby-mode.el (ruby-smie--redundant-do-p) (ruby-smie--forward-token, ruby-smie--backward-token) (ruby-singleton-class-p, ruby-calculate-indent) (ruby-forward-sexp, ruby-backward-sexp): * lisp/progmodes/ps-mode.el (ps-run-goto-error): * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function) (perl-syntax-propertize-special-constructs) (perl-backward-to-start-of-continued-exp): * lisp/progmodes/pascal.el (pascal-indent-declaration): * lisp/progmodes/octave.el (octave-function-file-p): * lisp/progmodes/mantemp.el (mantemp-insert-cxx-syntax): * lisp/progmodes/js.el (js--forward-function-decl): * lisp/progmodes/idlwave.el (idlwave-show-begin-check) (idlwave-beginning-of-block, idlwave-end-of-block) (idlwave-block-jump-out, idlwave-determine-class): * lisp/progmodes/icon.el (icon-is-continuation-line) (icon-backward-to-start-of-continued-exp, end-of-icon-defun): * lisp/progmodes/hideif.el (hide-ifdef-define): * lisp/progmodes/f90.el (f90-change-keywords): * lisp/progmodes/cperl-mode.el (cperl-electric-pod) (cperl-linefeed, cperl-electric-terminator) (cperl-find-pods-heres, cperl-fix-line-spacing) (cperl-invert-if-unless): * lisp/progmodes/cc-engine.el (c-forward-<>-arglist-recur): * lisp/progmodes/cc-align.el (c-lineup-java-inher): * lisp/progmodes/ada-mode.el (ada-compile-goto-error) (ada-adjust-case-skeleton, ada-create-case-exception) (ada-create-case-exception-substring) (ada-case-read-exceptions-from-file, ada-after-keyword-p) (ada-scan-paramlist, ada-get-current-indent, ada-get-indent-end) (ada-get-indent-if, ada-get-indent-block-start) (ada-get-indent-loop, ada-get-indent-type) (ada-search-prev-end-stmt, ada-check-defun-name) (ada-goto-decl-start, ada-goto-matching-start) (ada-goto-matching-end, ada-looking-at-semi-or) (ada-looking-at-semi-private, ada-in-paramlist-p) (ada-search-ignore-complex-boolean, ada-move-to-start) (ada-move-to-end, ada-which-function, ada-gen-treat-proc): * lisp/net/quickurl.el (quickurl-grab-url): * lisp/mail/sendmail.el (mail-do-fcc): * lisp/mail/rmail.el (rmail-resend): * lisp/mail/mailabbrev.el (mail-abbrev-complete-alias): * lisp/mail/mail-extr.el (mail-extract-address-components): * lisp/json.el (json-read-keyword): * lisp/files.el (insert-directory): * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): * lisp/completion.el (symbol-under-point, symbol-before-point) (symbol-before-point-for-complete, next-cdabbrev) (add-completions-from-c-buffer): * lisp/cedet/semantic/texi.el (semantic-up-context) (semantic-beginning-of-context): * lisp/cedet/semantic/bovine/el.el (semantic-get-local-variables): use 'forward-word-strictly' and 'backward-word-strictly' instead of 'forward-word' and 'backward-word'. [This reapplies commit c1d32a65372c72d7de4808d620eefd3214a8e92a, which was inadvertently lost by merge commit c71e7cc113ed0d5f01aaa2e441a3e3c9fbeb9fa5.]
2016-02-05Fix problems caused by new implementation of sub-word modeEli Zaretskii
* lisp/subr.el (forward-word-strictly, backward-word-strictly): New functions. (word-move-empty-char-table): New variable. * etc/NEWS: Mention 'forward-word-strictly' and 'backward-word-strictly'. * doc/lispref/positions.texi (Word Motion): Document 'find-word-boundary-function-table', 'forward-word-strictly', and 'backward-word-strictly'. (Bug#22560) * src/syntax.c (syms_of_syntax) <find-word-boundary-function-table>: Doc fix. * lisp/wdired.el (wdired-xcase-word): * lisp/textmodes/texnfo-upd.el (texinfo-copy-node-name) (texinfo-copy-section-title, texinfo-start-menu-description) (texinfo-copy-menu-title, texinfo-specific-section-type) (texinfo-insert-node-lines, texinfo-copy-next-section-title): * lisp/textmodes/texinfo.el (texinfo-clone-environment) (texinfo-insert-@end): * lisp/textmodes/texinfmt.el (texinfo-format-scan) (texinfo-anchor, texinfo-multitable-widths) (texinfo-multitable-item): * lisp/textmodes/tex-mode.el (latex-env-before-change): * lisp/textmodes/flyspell.el (texinfo-mode-flyspell-verify): * lisp/skeleton.el (skeleton-insert): * lisp/simple.el (count-words): * lisp/progmodes/vhdl-mode.el (vhdl-beginning-of-libunit) (vhdl-beginning-of-defun, vhdl-beginning-of-statement-1) (vhdl-update-sensitivity-list, vhdl-template-block) (vhdl-template-break, vhdl-template-case, vhdl-template-default) (vhdl-template-default-indent, vhdl-template-for-loop) (vhdl-template-if-then-use, vhdl-template-bare-loop) (vhdl-template-nature, vhdl-template-procedural) (vhdl-template-process, vhdl-template-selected-signal-asst) (vhdl-template-type, vhdl-template-variable) (vhdl-template-while-loop, vhdl-beginning-of-block) (vhdl-hooked-abbrev, vhdl-port-copy, vhdl-hs-forward-sexp-func): * lisp/progmodes/verilog-mode.el (verilog-backward-sexp) (verilog-forward-sexp, verilog-beg-of-statement) (verilog-set-auto-endcomments, verilog-backward-token) (verilog-do-indent): * lisp/progmodes/vera-mode.el (vera-guess-basic-syntax) (vera-indent-block-closing): * lisp/progmodes/simula.el (simula-context) (simula-backward-up-level, simula-forward-down-level) (simula-previous-statement, simula-next-statement) (simula-skip-comment-backward, simula-calculate-indent) (simula-find-if, simula-electric-keyword): * lisp/progmodes/sh-script.el (sh-smie--rc-newline-semi-p): * lisp/progmodes/ruby-mode.el (ruby-smie--redundant-do-p) (ruby-smie--forward-token, ruby-smie--backward-token) (ruby-singleton-class-p, ruby-calculate-indent) (ruby-forward-sexp, ruby-backward-sexp): * lisp/progmodes/ps-mode.el (ps-run-goto-error): * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function) (perl-syntax-propertize-special-constructs) (perl-backward-to-start-of-continued-exp): * lisp/progmodes/pascal.el (pascal-indent-declaration): * lisp/progmodes/octave.el (octave-function-file-p): * lisp/progmodes/mantemp.el (mantemp-insert-cxx-syntax): * lisp/progmodes/js.el (js--forward-function-decl): * lisp/progmodes/idlwave.el (idlwave-show-begin-check) (idlwave-beginning-of-block, idlwave-end-of-block) (idlwave-block-jump-out, idlwave-determine-class): * lisp/progmodes/icon.el (icon-is-continuation-line) (icon-backward-to-start-of-continued-exp, end-of-icon-defun): * lisp/progmodes/hideif.el (hide-ifdef-define): * lisp/progmodes/f90.el (f90-change-keywords): * lisp/progmodes/cperl-mode.el (cperl-electric-pod) (cperl-linefeed, cperl-electric-terminator) (cperl-find-pods-heres, cperl-fix-line-spacing) (cperl-invert-if-unless): * lisp/progmodes/cc-engine.el (c-forward-<>-arglist-recur): * lisp/progmodes/cc-align.el (c-lineup-java-inher): * lisp/progmodes/ada-mode.el (ada-compile-goto-error) (ada-adjust-case-skeleton, ada-create-case-exception) (ada-create-case-exception-substring) (ada-case-read-exceptions-from-file, ada-after-keyword-p) (ada-scan-paramlist, ada-get-current-indent, ada-get-indent-end) (ada-get-indent-if, ada-get-indent-block-start) (ada-get-indent-loop, ada-get-indent-type) (ada-search-prev-end-stmt, ada-check-defun-name) (ada-goto-decl-start, ada-goto-matching-start) (ada-goto-matching-end, ada-looking-at-semi-or) (ada-looking-at-semi-private, ada-in-paramlist-p) (ada-search-ignore-complex-boolean, ada-move-to-start) (ada-move-to-end, ada-which-function, ada-gen-treat-proc): * lisp/net/quickurl.el (quickurl-grab-url): * lisp/mail/sendmail.el (mail-do-fcc): * lisp/mail/rmail.el (rmail-resend): * lisp/mail/mailabbrev.el (mail-abbrev-complete-alias): * lisp/mail/mail-extr.el (mail-extract-address-components): * lisp/json.el (json-read-keyword): * lisp/files.el (insert-directory): * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): * lisp/completion.el (symbol-under-point, symbol-before-point) (symbol-before-point-for-complete, next-cdabbrev) (add-completions-from-c-buffer): * lisp/cedet/semantic/texi.el (semantic-up-context) (semantic-beginning-of-context): * lisp/cedet/semantic/bovine/el.el (semantic-get-local-variables): use 'forward-word-strictly' and 'backward-word-strictly' instead of 'forward-word' and 'backward-word'.
2016-01-16Fix tests for active region in hideif.elEli Zaretskii
* lisp/progmodes/hideif.el (hif-evaluate-macro, hide-ifdef-block): Use 'use-region-p' to test whether to operate on region, instead of testing 'mark-active'.
2016-01-16Fix interactive specs in some hideif.el commandsEli Zaretskii
* lisp/progmodes/hideif.el (hif-evaluate-macro) (hide-ifdef-undef, show-ifdef-block): Don't use '(interactive "r")' in commands that should only act on the region if it's active.
2016-01-12Fix some custom types.Glenn Morris
* lisp/gnus/gnus-fun.el (gnus-x-face-omit-files, gnus-face-omit-files): * lisp/gnus/gnus.el (gnus-valid-select-methods): * lisp/mail/rmail.el (rmail-get-coding-function): * lisp/net/newst-treeview.el (newsticker-groups-filename): * lisp/progmodes/hideif.el (hide-ifdef-exclude-define-regexp): * lisp/textmodes/tildify.el (tildify-space-predicates): * lisp/url/url-tramp.el (url-tramp-protocols): Fix custom types.
2016-01-01Update copyright year to 2016Paul Eggert
Run admin/update-copyright.
2015-11-17Fix docstring quoting problems with ‘ '’Paul Eggert
Problem reported by Artur Malabarba in: http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01513.html Most of these fixes are to documentation; many involve fixing longstanding quoting glitches that are independent of the recent substitute-command-keys changes. The changes to code are: * lisp/cedet/mode-local.el (mode-local-augment-function-help) (describe-mode-local-overload): Substitute docstrings before displaying them. * lisp/emacs-lisp/cl-macs.el (cl--transform-lambda): Quote the generated docstring for later substitution.
2015-09-01hideif.el: Recognize .h++ as C++ header.Rüdiger Sonderfeld
* lisp/progmodes/hideif.el (hide-ifdef-header-regexp): Add .h++.
2015-04-10cl-lib.el: Partial revert of "2015-04-05 Rationalize c[ad]+r"Stefan Monnier
* lisp/emacs-lisp/cl-lib.el: Partial revert of "2015-04-05 Rationalize use of c[ad]+r", so as to keep the "cl-" prefix on all cl-lib definitions.
2015-04-05Rationalize use of c[ad]+r, expunging cl-c[ad]\{3,4\}r.Alan Mackenzie
Also expunge eudc-c[ad]+r. * subr.el (internal--compiler-macro-cXXr): "New" function, copied from cl--compiler-macro-cXXr. (caar, cadr, cdar, cddr): Change from defsubsts to defuns with the above compiler-macro. * net/eudc.el (eudc-cadr, eudc-cdar, eudc-caar, eudc-cdaar): Remove. * emacs-lisp/cl.el (Top level dolist doing defaliases): Remove caaar, etc., from list of new alias functions. * emacs-lisp/cl-lib.el (cl-caaar, etc): Rename to caaar, etc. (gen-cXXr--rawname, gen-cXXr-all-cl-aliases): New function/macro which generate obsolete cl- aliases for caaar, etc. Invoke them. * desktop.el: * edmacro.el: * emacs-lisp/cl-macs.el: * frameset.el: * ibuffer.el: * mail/footnote.el: * net/dbus.el: * net/eudc-export.el: * net/eudc.el: * net/eudcb-ph.el: * net/rcirc.el: * net/secrets.el: * play/5x5.el: * play/decipher.el: * play/hanoi.el: * progmodes/hideif.el: * ses.el: Replace cl-caaar, eudc-cadr, etc. with caaar and cadr, etc.
2015-01-01Update copyright year to 2015Paul Eggert
Run admin/update-copyright.
2014-09-29Rename 24.5 to 25.1Stefan Monnier
Except where we expect to backport the corresponding change.
2014-09-11Spelling fixes.Paul Eggert
* lisp/ses.el (ses-file-format-extend-parameter-list): Rename from ses-file-format-extend-paramter-list. All uses changed. * lisp/gnus-cloud.el (gnus-cloud-parse-version-1): Fix misspelling of ":delete".
2014-07-21Merge from emacs-24; up to 2014-06-25T10:17:41Z!rgm@gnu.orgGlenn Morris
2014-07-21Small fixes re toggle-read-only, mainly docGlenn Morris
* progmodes/hideif.el (hide-ifdef-mode-submap): Also substitute read-only-mode. * bindings.el (mode-line-toggle-read-only): * bs.el (bs-toggle-readonly): * buff-menu.el (Buffer-menu-toggle-read-only): * dired.el (dired-toggle-read-only): * files.el (view-read-only, find-file-read-only) (find-file-read-only-other-window) (find-file-read-only-other-frame): * progmodes/hideif.el (hide-ifdef-toggle-outside-read-only): Doc fixes re toggle-read-only. * view.el: Comment updates.
2014-07-07HideIfDef mode bug fixes and enhancements. This is #3 of 3 patches basedLuke Lee
on the completed work posted on http://www.emacswiki.org/emacs/HideIfDef. - Add macro evaluation function and key binding for a marked region. - Merge continuous "..." lines into one. - Fix old hideif bugs that fail to hide the correct #elif regions - Support hide/show commands in a marked region. - Expand top level for .h files to prevent re-inclusion protection. - Change maintainer. * lisp/progmodes/hideif.el (hide-ifdef-env): Change to global. (hide-ifdef-env-backup): New variable. (hide-ifdef-expand-reinclusion-protection, hide-ifdef-header-regexp): New customizable variables. (hif-clear-all-ifdef-defined): New defun. (hif-merge-ifdef-region, hide-ifdef-region-internal, hide-ifdef-region) (hif-show-ifdef-region): Merge hidden regions to prevent continuous "...". (hif-tokenize): Fix for MS-DOS/Win EOL style. (hif-endif-to-ifdef, hif-make-range, hif-find-range, hif-possibly-hide): Fix bug to hide the correct #elif region(s). (hif-range-elif): New defun. (hif-recurse-level): New var. (hif-evaluate-region, hif-evaluate-macro): New defun. (hide-ifdef-guts): Prevent reinclusion protected C/C++ headers from fully hidden. (hide-ifdef-define, hide-ifdefs, hide-ifdef-block, show-ifdef-block): Better interaction.
2014-07-02* lisp/progmodes/hideif.el (hide-ifdef-exclude-define-regexp): Add theLuke Lee
forgotten :version "24.5".
2014-06-27* lisp/progmodes/hideif.el: Use lexical-binding. Fix up cl-lib usage.Stefan Monnier
2014-06-27* lisp/progmodes/hideif.el: Style fixes. Fix doc-strings and comment style,Luke Lee
also add a change log entry for the latest hideif.el changes.
2014-06-26* lisp/progmodes/hideif.el: Undo last change which should only go to trunkStefan Monnier
(do not merge).