aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref/syntax.texi (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-04-19Remove #' and function quoting from lambda forms in manualMattias Engdegård1-3/+3
* doc/lispref/abbrevs.texi (Abbrev Expansion): * doc/lispref/backups.texi (Reverting): * doc/lispref/functions.texi (Mapping Functions): * doc/lispref/help.texi (Accessing Documentation): * doc/lispref/sequences.texi (Char-Tables): * doc/lispref/syntax.texi (Categories): * doc/lispref/text.texi (Sorting): Remove function quoting from lambda in examples where it still occurs, since examples should follow our best style and be consistent.
2020-01-01Update copyright year to 2020Paul Eggert1-1/+1
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2019-12-20Elisp manual: mention parse-partial-sexp as the source of a parser state, etcAlan Mackenzie1-9/+10
* doc/lispref/syntax.texi (Parser State): mention parse-partial-sexp as a function returning a parser state, and the function to which one supplies a parser state as an argument for continued parsing. Refine the documentation of syntax-ppss-context, and correct the text introducing it and another function.
2019-06-24Document syntax-ppss-contextLars Ingebrigtsen1-0/+5
* doc/lispref/syntax.texi (Parser State): Document it. * lisp/emacs-lisp/syntax.el (syntax-ppss-context): Add a doc string (bug#32504).
2019-02-16Fix a typo in lispref/syntax.texiEli Zaretskii1-2/+2
* doc/lispref/syntax.texi (Syntax Table Internals): Fix a typo. (Bug#34495)
2019-02-12Minor fixes in ELisp manual wrt syntax-table propertiesEli Zaretskii1-6/+5
* doc/lispref/syntax.texi (Syntax Properties): Fix reference to syntax-table properties. (Bug#34455) (Control Parsing): Remove redundant @vindex entry.
2019-01-01Update copyright year to 2019Paul Eggert1-1/+1
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
2018-08-21Audit use of lsh and fix glitchesPaul Eggert1-4/+4
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-06-02Improve documentation of comment stylesEli Zaretskii1-5/+7
* doc/lispref/syntax.texi (Syntax Flags): Define the "a" style. (Bug#31624)
2018-04-13Complete documentation of syntax flags by adding `c'Alan Mackenzie1-1/+1
* doc/lispref/syntax.texi ("Syntax Table Internals"): Add entry for `c' as `(1 lsh 23)'.
2018-02-22Document, in the Elisp manual, how to get a character's raw syntax descriptorAlan Mackenzie1-0/+4
* doc/lispref/syntax.texi (Syntax Table internals): mention the use of `aref' to get a character's raw syntax descriptor.
2018-01-01Update copyright year to 2018Paul Eggert1-1/+1
Run admin/update-copyright.
2017-12-22Avoid some overfull lines in PDF lisprefGlenn Morris1-4/+5
* doc/lispref/commands.texi (Reading One Event): * doc/lispref/display.texi (SVG Images): * doc/lispref/frames.texi (Size Parameters): * doc/lispref/syntax.texi (Categories): * doc/lispref/windows.texi (Frame Layouts with Side Windows): Avoid overfull lines.
2017-10-01Doc amendment for syntax-ppss.Alan Mackenzie1-6/+7
* doc/elisp/syntax.texi (Position Parse): Note, twice, that syntax-ppss is equivalent to parse-partial-sexp from the beginning of THE VISIBLE PART OF the buffer. Final part of the fix for bug #22983.
2017-10-01Remove inadvertent changes to syntax.texi in last commit.Alan Mackenzie1-7/+6
* doc/lispref/syntax.texi (Position Parse): revert changes.
2017-10-01Amend documentation for text-quoting-style becoming a user option.Alan Mackenzie1-6/+7
* doc/lispref/control.texi (Signaling Errors): * doc/lispref/display.texi (Displaying Messages): * doc/lispref/strings.texi (Formatting Strings): Edit for brevity, farming out the details to the new Text Quoting Style node. * doc/lispref/help.texi (Text Quoting Style): New section. Move detailed discussion of text-quoting-style here. Add discussion about how to output grave accent and apostrophe in documentation and messages. Adjust xrefs to point to this section when appropriate. * etc/NEWS: text-quoting-style semantics have not changed.
2016-12-31Update copyright year to 2017Paul Eggert1-1/+1
Run admin/update-copyright.
2016-03-20Amend parse-partial-sexp correctly to handle two character comment delimitersAlan Mackenzie1-14/+19
Do this by adding a new field to the parser state: the syntax of the last character scanned, should that be the first char of a (potential) two char construct, nil otherwise. This should make the parser state complete. Also document element 9 of the parser state. Also refactor the code a bit. * src/syntax.c (struct lisp_parse_state): Add a new field. (SYNTAX_FLAGS_COMSTARTEND_FIRST): New function. (internalize_parse_state): New function, extracted from scan_sexps_forward. (back_comment): Call internalize_parse_state. (forw_comment): Return the syntax of the last character scanned to the caller when that character might be the first of a two character construct. (Fforward_comment, scan_lists): New dummy variables, passed to forw_comment. (scan_sexps_forward): Remove a redundant state parameter. Access all `state' information via the address parameter `state'. Remove the code which converts from external to internal form of `state'. Access buffer contents only from `from' onwards. Reformulate code at the top of the main loop correctly to recognize comment openers when starting in the middle of one. Call forw_comment with extra argument (for return of syntax value of possible first char of a two char construct). (Fparse_partial_sexp): Document elements 9, 10 of the parser state in the doc string. Clarify the doc string in general. Call internalize_parse_state. Take account of the new elements when consing up the output parser state. * doc/lispref/syntax.texi: (Parser State): Document element 9 and the new element 10. Minor wording corrections (remove reference to "trivial cases"). (Low Level Parsing): Minor corrections. * etc/NEWS: Note new element 10, and documentation of element 9 of parser state.
2016-03-10Clarify the documentation of nested comments.Alan Mackenzie1-7/+8
* doc/lispref/syntax.texi (Syntax Flags): State that only comments of the same style are recognized inside nestable comments. (Low-Level Parsing): Clarify that parsing will stop after the start or end of UNNESTED comments.
2016-01-10Update documentation for obsoleting 'syntax-begin-function'Eli Zaretskii1-11/+0
* doc/lispref/syntax.texi (Position Parse): Undocument 'syntax-begin-function' that is now obsolete.
2016-01-01Update copyright year to 2016Paul Eggert1-1/+1
Run admin/update-copyright.
2015-12-28Allow line comments ending with escaped NL to be continued to the next line.Alan Mackenzie1-0/+8
Use this in C, C++, and Objective C Modes. Fixes bug#22246 * src/syntax.c (comment-end-can-be-escaped): New buffer local variable. (forw-comment, back-comment): On encountering an end of comment character, test whether it is escaped when `comment-end-can-be-escaped' is non-nil. * doc/lispref/syntax.texi (Control Parsing): Describe `comment-end-can-be-escaped'. * etc/NEWS (Lisp Changes): Describe `comment-end-can-be-escaped'. * lisp/progmodes/cc-langs.el: New c-lang-setvar `comment-end-can-be-escaped'.
2015-09-15Quote less in manualsPaul Eggert1-5/+5
The manuals often used quotes ``...'' when it is better to use @dfn or @code or capitalized words or no quoting at all. For example, there is no need for the `` and '' in “if a variable has one effect for @code{nil} values and another effect for ``non-@code{nil}'' values”. Reword the Emacs, Lisp intro, and Lisp reference manuals to eliminate unnecessary quoting like this, and to use @dfn etc. instead when called for (Bug#21472).
2015-09-10Improve documentation of categoriesEli Zaretskii1-1/+10
* doc/lispref/syntax.texi (Categories): Clarify the example of using define-category and modify-category-entry. (Bug#21448)
2015-09-09Fix indentation of an @example in ELisp manualEli Zaretskii1-3/+3
* doc/lispref/syntax.texi (Categories): Untabify the example. (Bug#21448)
2015-04-10Minor quoting etc. fixes to lispref manualPaul Eggert1-1/+1
* doc/lispref/tips.texi (Documentation Tips): Distinguish more clearly among grave accent, apostrophe, and single quote. * doc/lispref/README, doc/lispref/buffers.texi: * doc/lispref/commands.texi, doc/lispref/control.texi: * doc/lispref/customize.texi, doc/lispref/display.texi: * doc/lispref/elisp.texi, doc/lispref/files.texi: * doc/lispref/frames.texi, doc/lispref/hash.texi: * doc/lispref/help.texi, doc/lispref/internals.texi: * doc/lispref/loading.texi, doc/lispref/makefile.w32-in: * doc/lispref/markers.texi, doc/lispref/modes.texi: * doc/lispref/nonascii.texi, doc/lispref/objects.texi: * doc/lispref/os.texi, doc/lispref/positions.texi: * doc/lispref/strings.texi, doc/lispref/syntax.texi: * doc/lispref/text.texi, doc/lispref/tips.texi: * doc/lispref/two-volume-cross-refs.txt, doc/lispref/windows.texi: Use American-style double quoting in ordinary text, and quote 'like this' when single-quoting in ASCII text. Also, fix some minor spacing issues.
2015-01-01Update copyright year to 2015Paul Eggert1-1/+1
Run admin/update-copyright.
2015-01-01Update copyright year to 2015Paul Eggert1-1/+1
Run admin/update-copyright.
2014-12-23Improve indexing on the chapter/section/subsection levels.Eli Zaretskii1-0/+7
doc/lispref/windows.texi (Recombining Windows): Index subject of sections. doc/lispref/variables.texi (Variables with Restricted Values) (Generalized Variables): Index subject of sections. doc/lispref/text.texi (Buffer Contents, Examining Properties) (Changing Properties, Property Search, Substitution): Index subject of sections. doc/lispref/syntax.texi (Motion and Syntax, Parsing Expressions) (Motion via Parsing, Position Parse, Control Parsing): Index subject of sections. doc/lispref/strings.texi (Predicates for Strings, Creating Strings) (Modifying Strings, Text Comparison): Index subject of sections. doc/lispref/searching.texi (Syntax of Regexps, Regexp Special) (Regexp Functions, Regexp Functions): Index subject of sections. doc/lispref/processes.texi (Subprocess Creation, Process Information): Index subject of sections. doc/lispref/positions.texi (Screen Lines): Index subject of sections. doc/lispref/nonascii.texi (Scanning Charsets, Specifying Coding Systems): Index subject of sections. doc/lispref/minibuf.texi (Text from Minibuffer, Object from Minibuffer) (Multiple Queries, Minibuffer Contents): Index subject of sections. doc/lispref/markers.texi (Predicates on Markers, Creating Markers) (Information from Markers, Moving Markers): Index subject of sections. doc/lispref/macros.texi (Defining Macros, Problems with Macros): Index subject of sections. doc/lispref/loading.texi (Loading Non-ASCII, Where Defined): Index subject of sections. doc/lispref/lists.texi (List-related Predicates, List Variables, Setcar) (Setcdr, Plist Access): Index subject of sections. doc/lispref/keymaps.texi (Controlling Active Maps, Scanning Keymaps) (Modifying Menus): Index subject of sections. doc/lispref/help.texi (Accessing Documentation, Help Functions): Index subject of sections. doc/lispref/hash.texi (Hash Access): Index subject of sections. doc/lispref/functions.texi (Core Advising Primitives) (Advising Named Functions, Porting old advices): Index subject of sections. doc/lispref/frames.texi (Creating Frames, Initial Parameters) (Position Parameters, Buffer Parameters, Minibuffers and Frames) (Pop-Up Menus, Drag and Drop): Index subject of sections. doc/lispref/files.texi (Visiting Functions, Kinds of Files) (Unique File Names): Index subject of sections. doc/lispref/display.texi (Refresh Screen, Echo Area Customization) (Warning Variables, Warning Options, Delayed Warnings) (Temporary Displays, Managing Overlays, Overlay Properties) (Finding Overlays, Size of Displayed Text, Defining Faces) (Attribute Functions, Displaying Faces, Face Remapping) (Basic Faces, Font Lookup, Fontsets, Replacing Specs) (Defining Images, Showing Images): Index subject of sections. doc/lispref/debugging.texi (Debugging, Explicit Debug) (Invoking the Debugger, Excess Open, Excess Close): Index subject of sections. doc/lispref/customize.texi (Defining New Types, Applying Customizations) (Custom Themes): Index subject of sections. doc/lispref/control.texi (Sequencing, Combining Conditions) (Processing of Errors, Cleanups): Index subject of sections. doc/lispref/compile.texi (Eval During Compile): Index subject of sections. doc/lispref/commands.texi (Using Interactive, Distinguish Interactive) (Command Loop Info, Classifying Events, Event Mod) (Invoking the Input Method): Index subject of sections. doc/lispref/buffers.texi (Buffer List, Buffer Gap): Index subject of sections. doc/lispref/backups.texi (Making Backups, Numbered Backups, Backup Names) (Reverting): Index subject of sections. doc/lispref/abbrevs.texi (Abbrev Tables, Defining Abbrevs, Abbrev Files) (Abbrev Expansion, Standard Abbrev Tables, Abbrev Properties) (Abbrev Table Properties): Index subject of sections. doc/lispref/os.texi (Time of Day, Time Conversion, Time Parsing) (Time Calculations, Idle Timers): Index subject of sections.
2014-01-01Update copyright year to 2014 by running admin/update-copyright.Paul Eggert1-1/+1
2013-10-05* doc/lispref/syntax.texi (Categories): Add an index for category sets.Xue Fuqiao1-0/+1
2013-10-03Add an index for modify-syntax-entry.Xue Fuqiao1-0/+1
2013-10-03* doc/lispref/syntax.texi (Syntax Flags): Add an index for comment style.Xue Fuqiao1-0/+1
2013-10-02Add an index for the table of syntax classes.Xue Fuqiao1-0/+1
* doc/lispref/syntax.texi (Syntax Class Table): Add an index for syntax class table.
2013-06-26Manual fixes re describe-syntaxGlenn Morris1-0/+5
* doc/emacs/help.texi (Misc Help): Index describe-syntax. * doc/lispref/syntax.texi (Syntax Table Functions): Mention describe-syntax.
2013-01-02Tweak some lispref line breaksGlenn Morris1-6/+6
* doc/lispref/processes.texi (System Processes): * doc/lispref/syntax.texi (Syntax Table Functions): Tweak some line breaks.
2013-01-01Update copyright notices for 2013.Paul Eggert1-2/+2
2012-12-29Fix bug #13292 with use of @var in @def.. commands in ELisp manual.Eli Zaretskii1-2/+2
doc/lispref/functions.texi (Declare Form): doc/lispref/intro.texi (A Sample Function Description): doc/lispref/syntax.texi (Syntax Table Internals, Syntax Table Functions): doc/lispref/variables.texi (Using Lexical Binding): Don't use @var or CAPS in @def.. commands.
2012-12-05Fix minor whitespace issues after "." in manual.Paul Eggert1-4/+4
Be more systematic about using "@." (not ".") at end of sentence that ends in a capital letter, and about appending "@:" after non-ends of sentences that end in a lower case letter followed by "." followed by whitespace. Omit unnecessary use of "@:" and "@.". Similarly for "?" and "!". Be more consistent about putting a comma after "i.e." and "e.g."; this is the typical American style and it's easier to code in Texinfo. Fixes: debbugs:12973
2012-09-08Introduce "raw syntax descriptor" terminology, and use it.Chong Yidong1-25/+36
* syntax.texi (Syntax Table Internals): Define "raw syntax descriptor" terminology. (Syntax Descriptors): Mention raw syntax descriptors. * lisp/subr.el (syntax-after, syntax-class): Doc fix. * syntax.c (Fstring_to_syntax): Doc fix. Fixes: debbugs:12383
2012-09-07Add a couple of xrefs to the Lisp manual.Chong Yidong1-0/+3
* markers.texi (Moving Markers): Add xref to Point. * syntax.texi (Low-Level Parsing): Add xref to Parser State. Fixes: debbugs:12269
2012-08-04Doc fixes and improvements for syntax tables.Chong Yidong1-175/+130
* src/syntax.c (Fmodify_syntax_entry): Doc fix. * doc/lispref/syntax.texi (Syntax Basics): Rearrange the text for clarity. Fix description of syntax table inheritance. (Syntax Table Functions): Don't refer to internal contents of syntax table, since that is not explained yet. Copyedits. (Standard Syntax Tables): Node deleted. (Syntax Table Internals): Misc clarifications. Improve table formatting. * doc/lispref/keymaps.texi (Inheritance and Keymaps): * doc/lispref/text.texi (Sticky Properties): Tweak index entry.
2012-05-26Nuke hand-written node pointers in doc/lisprefGlenn Morris1-1/+1
Let makeinfo figure them out, as is recommended.
2012-04-25Use Texinfo recommended convention for quotes+punctuation.Glenn Morris1-2/+2
2012-04-13Remove unnecessary @setfilename commands from many doc/lispref/*.texiGlenn Morris1-1/+0
2012-02-17Clarify doc of scan-lists.Chong Yidong1-15/+15
* doc/lispref/syntax.texi (Motion via Parsing): Doc fix for scan-lists. * src/syntax.c (Fscan_lists): Doc fix. Fixes: debbugs:10833
2012-02-16Update Syntax chapter of Lisp manual.Chong Yidong1-240/+257
* doc/lispref/syntax.texi (Syntax Tables, Syntax Descriptors) (Syntax Table Functions): Copyedits. (Syntax Basics): Don't repeat the material in the preceding node. (Syntax Class Table): Use a table. (Syntax Properties): Document syntax-propertize-function and syntax-propertize-extend-region-functions. (Motion via Parsing): Fix indentation. (Parser State): Update for the new "c" comment style. Fix description of item 7 (comment style). * doc/lispref/modes.texi (Syntactic Font Lock): Add xref to Syntactic Font Lock node.
2012-02-16Updates to Font Lock docs in Lisp manual.Chong Yidong1-3/+1
* doc/lispref/modes.texi (Minor Modes): Update how mode commands should treat arguments now. (Mode Line Basics): Clarify force-mode-line-update. (Mode Line Top): Note that the example is not realistic. (Mode Line Variables, Mode Line Data, %-Constructs, Header Lines) (Emulating Mode Line): Use "mode line" instead of "mode-line", and "mode line construct" instead of "mode line specification". (Syntactic Font Lock): Remove mention of obsolete variable font-lock-syntactic-keywords. (Setting Syntax Properties): Node deleted. (Font Lock Mode): Note that Font Lock mode is a minor mode. (Font Lock Basics): Note that syntactic fontification falls back on `syntax-table'. (Search-based Fontification): Emphasize that font-lock-keywords should not be set directly. (Faces for Font Lock): Avoid some confusing terminology. (Syntactic Font Lock): Minor clarifications.
2012-01-31Minor tweaks to the Lisp manual.Chong Yidong1-9/+7
* syntax.texi (Parsing Expressions): Clarify intro. (Parser State): Remove unnecessary statement (Bug#10661). * eval.texi (Intro Eval): Add footnote about "sexp" terminology. Fixes: debbugs:10657
2012-01-29* doc/lispref/syntax.texi (Syntax Class Table): Tweak description of newline ↵Chong Yidong1-4/+4
char syntax. Fixes: debbugs:9619