1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00
emacs/lisp/progmodes
Paul Eggert f18af6cd5c Audit use of lsh and fix glitches
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-08-21 13:44:32 -07:00
..
ada-mode.el
ada-prj.el
ada-stmt.el
ada-xref.el
antlr-mode.el Replace some uses of cl with cl-lib 2018-03-23 16:14:49 -04:00
asm-mode.el
autoconf.el
bat-mode.el
bug-reference.el Optionally add argument description in minor mode DOC (bug#10754) 2018-07-01 23:34:53 -04:00
cc-align.el Implement the C++11 "using" type definition. 2018-06-09 21:39:43 +00:00
cc-awk.el
cc-bytecomp.el
cc-cmds.el
cc-defs.el Audit use of lsh and fix glitches 2018-08-21 13:44:32 -07:00
cc-engine.el Correctly indent C++ brace lists in member init lists. 2018-07-26 19:55:47 +00:00
cc-fonts.el Enhance CC Mode's fontification, etc., of unterminated strings. 2018-05-20 13:28:14 +00:00
cc-guess.el
cc-langs.el Implement the C++11 "using" type definition. 2018-06-09 21:39:43 +00:00
cc-menus.el
cc-mode.el * lisp/progmodes/cc-mode.el: Add version header 2018-08-19 08:47:02 -04:00
cc-styles.el
cc-vars.el * lisp/progmodes/cc-{defs,engine,langs,vars}.el: Comment the use of "a\\`" 2018-04-02 19:53:41 +00:00
cfengine.el
cmacexp.el
compile.el Optionally add argument description in minor mode DOC (bug#10754) 2018-07-01 23:34:53 -04:00
cperl-mode.el Merge from emacs-26 2018-06-10 18:41:47 -04:00
cpp.el
cwarn.el Optionally add argument description in minor mode DOC (bug#10754) 2018-07-01 23:34:53 -04:00
dcl-mode.el
ebnf-abn.el
ebnf-bnf.el
ebnf-dtd.el
ebnf-ebx.el
ebnf-iso.el
ebnf-otz.el
ebnf-yac.el
ebnf2ps.el Audit use of lsh and fix glitches 2018-08-21 13:44:32 -07:00
ebrowse.el Merge from origin/emacs-26 2018-03-28 09:38:22 -07:00
elisp-mode.el Remove menu name from emacs-lisp-mode-map (Bug#27114) 2018-07-17 21:40:59 -04:00
etags.el
executable.el
f90.el
flymake-cc.el Add proper Flymake support to cc-mode.el 2018-06-04 01:47:02 +01:00
flymake-proc.el Obsolete Flymake's flymake-diagnostic-types-alist 2018-06-05 15:22:16 +01:00
flymake.el Optionally add argument description in minor mode DOC (bug#10754) 2018-07-01 23:34:53 -04:00
fortran.el
gdb-mi.el Optionally add argument description in minor mode DOC (bug#10754) 2018-07-01 23:34:53 -04:00
glasses.el Optionally add argument description in minor mode DOC (bug#10754) 2018-07-01 23:34:53 -04:00
grep.el Merge from origin/emacs-26 2018-07-13 09:28:15 -07:00
gud.el Optionally add argument description in minor mode DOC (bug#10754) 2018-07-01 23:34:53 -04:00
hideif.el Audit use of lsh and fix glitches 2018-08-21 13:44:32 -07:00
hideshow.el Optionally add argument description in minor mode DOC (bug#10754) 2018-07-01 23:34:53 -04:00
icon.el
idlw-complete-structtag.el
idlw-help.el
idlw-shell.el Optionally add argument description in minor mode DOC (bug#10754) 2018-07-01 23:34:53 -04:00
idlw-toolbar.el Replace some uses of cl with cl-lib 2018-03-23 16:14:49 -04:00
idlwave.el Replace some uses of cl with cl-lib 2018-03-23 16:14:49 -04:00
inf-lisp.el ; Use GNU not Gnu in docs 2018-03-23 16:01:12 -04:00
js.el
ld-script.el
m4-mode.el
make-mode.el Give '$' punctuation syntax in make-mode (Bug#24477) 2018-05-15 19:33:34 -04:00
mantemp.el
meta-mode.el
mixal-mode.el
modula2.el
octave.el The tedious game of whack-a-mole with compiler warnings continues 2018-04-20 18:34:39 -04:00
opascal.el
pascal.el Optionally add argument description in minor mode DOC (bug#10754) 2018-07-01 23:34:53 -04:00
perl-mode.el
prog-mode.el Optionally add argument description in minor mode DOC (bug#10754) 2018-07-01 23:34:53 -04:00
project.el
prolog.el
ps-mode.el
python.el Add 'font-lock-maximum-decoration' levels for Python 2018-07-19 22:06:07 +02:00
ruby-mode.el Fix a docstring 2018-06-16 23:00:50 +03:00
scheme.el
sh-script.el
simula.el
sql.el Fix Bug#32107 2018-07-11 05:30:10 +03:00
subword.el Merge from origin/emacs-26 2018-07-24 06:40:58 -07:00
tcl.el Fix Tcl indentation in a namespace 2018-07-03 22:13:27 -06:00
vera-mode.el
verilog-mode.el
vhdl-mode.el Optionally add argument description in minor mode DOC (bug#10754) 2018-07-01 23:34:53 -04:00
which-func.el Optionally add argument description in minor mode DOC (bug#10754) 2018-07-01 23:34:53 -04:00
xref.el Merge from origin/emacs-26 2018-08-10 11:28:40 -07:00
xscheme.el